1
0
Fork 0

Stick with simple proto

The proto was not well designed in the first place, but it's better to
deal with it as-is, and wait until another major release to fix it.
master
Philip O'Toole 2 years ago
parent 08af993b46
commit 3afa2ce80a

@ -215,8 +215,8 @@ func (c *Client) Execute(er *command.ExecuteRequest, nodeAddr string, username s
return nil, err
}
if a.Error != nil {
return nil, errors.New(a.Error.GetError())
if a.Error != "" {
return nil, errors.New(a.Error)
}
return a.Results, nil
}
@ -298,8 +298,8 @@ func (c *Client) Query(qr *command.QueryRequest, nodeAddr string, username strin
return nil, err
}
if a.Error != nil {
return nil, errors.New(a.Error.GetError())
if a.Error != "" {
return nil, errors.New(a.Error)
}
return a.Rows, nil
}

@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.21.2
// source: cluster/message.proto
// protoc v3.6.1
// source: message.proto
package cluster
@ -57,11 +57,11 @@ func (x Command_Type) String() string {
}
func (Command_Type) Descriptor() protoreflect.EnumDescriptor {
return file_cluster_message_proto_enumTypes[0].Descriptor()
return file_message_proto_enumTypes[0].Descriptor()
}
func (Command_Type) Type() protoreflect.EnumType {
return &file_cluster_message_proto_enumTypes[0]
return &file_message_proto_enumTypes[0]
}
func (x Command_Type) Number() protoreflect.EnumNumber {
@ -70,56 +70,7 @@ func (x Command_Type) Number() protoreflect.EnumNumber {
// Deprecated: Use Command_Type.Descriptor instead.
func (Command_Type) EnumDescriptor() ([]byte, []int) {
return file_cluster_message_proto_rawDescGZIP(), []int{2, 0}
}
type ResultsError_Type int32
const (
ResultsError_RESULTS_ERROR_UNSPECIFIED ResultsError_Type = 0
ResultsError_RESULTS_ERROR_UNAUTHORIZED ResultsError_Type = 1
ResultsError_RESULTS_ERROR_NIL_QUERY_REQUEST ResultsError_Type = 2
)
// Enum value maps for ResultsError_Type.
var (
ResultsError_Type_name = map[int32]string{
0: "RESULTS_ERROR_UNSPECIFIED",
1: "RESULTS_ERROR_UNAUTHORIZED",
2: "RESULTS_ERROR_NIL_QUERY_REQUEST",
}
ResultsError_Type_value = map[string]int32{
"RESULTS_ERROR_UNSPECIFIED": 0,
"RESULTS_ERROR_UNAUTHORIZED": 1,
"RESULTS_ERROR_NIL_QUERY_REQUEST": 2,
}
)
func (x ResultsError_Type) Enum() *ResultsError_Type {
p := new(ResultsError_Type)
*p = x
return p
}
func (x ResultsError_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ResultsError_Type) Descriptor() protoreflect.EnumDescriptor {
return file_cluster_message_proto_enumTypes[1].Descriptor()
}
func (ResultsError_Type) Type() protoreflect.EnumType {
return &file_cluster_message_proto_enumTypes[1]
}
func (x ResultsError_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ResultsError_Type.Descriptor instead.
func (ResultsError_Type) EnumDescriptor() ([]byte, []int) {
return file_cluster_message_proto_rawDescGZIP(), []int{3, 0}
return file_message_proto_rawDescGZIP(), []int{2, 0}
}
type Credentials struct {
@ -134,7 +85,7 @@ type Credentials struct {
func (x *Credentials) Reset() {
*x = Credentials{}
if protoimpl.UnsafeEnabled {
mi := &file_cluster_message_proto_msgTypes[0]
mi := &file_message_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -147,7 +98,7 @@ func (x *Credentials) String() string {
func (*Credentials) ProtoMessage() {}
func (x *Credentials) ProtoReflect() protoreflect.Message {
mi := &file_cluster_message_proto_msgTypes[0]
mi := &file_message_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -160,7 +111,7 @@ func (x *Credentials) ProtoReflect() protoreflect.Message {
// Deprecated: Use Credentials.ProtoReflect.Descriptor instead.
func (*Credentials) Descriptor() ([]byte, []int) {
return file_cluster_message_proto_rawDescGZIP(), []int{0}
return file_message_proto_rawDescGZIP(), []int{0}
}
func (x *Credentials) GetUsername() string {
@ -188,7 +139,7 @@ type Address struct {
func (x *Address) Reset() {
*x = Address{}
if protoimpl.UnsafeEnabled {
mi := &file_cluster_message_proto_msgTypes[1]
mi := &file_message_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -201,7 +152,7 @@ func (x *Address) String() string {
func (*Address) ProtoMessage() {}
func (x *Address) ProtoReflect() protoreflect.Message {
mi := &file_cluster_message_proto_msgTypes[1]
mi := &file_message_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -214,7 +165,7 @@ func (x *Address) ProtoReflect() protoreflect.Message {
// Deprecated: Use Address.ProtoReflect.Descriptor instead.
func (*Address) Descriptor() ([]byte, []int) {
return file_cluster_message_proto_rawDescGZIP(), []int{1}
return file_message_proto_rawDescGZIP(), []int{1}
}
func (x *Address) GetUrl() string {
@ -240,7 +191,7 @@ type Command struct {
func (x *Command) Reset() {
*x = Command{}
if protoimpl.UnsafeEnabled {
mi := &file_cluster_message_proto_msgTypes[2]
mi := &file_message_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -253,7 +204,7 @@ func (x *Command) String() string {
func (*Command) ProtoMessage() {}
func (x *Command) ProtoReflect() protoreflect.Message {
mi := &file_cluster_message_proto_msgTypes[2]
mi := &file_message_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -266,7 +217,7 @@ func (x *Command) ProtoReflect() protoreflect.Message {
// Deprecated: Use Command.ProtoReflect.Descriptor instead.
func (*Command) Descriptor() ([]byte, []int) {
return file_cluster_message_proto_rawDescGZIP(), []int{2}
return file_message_proto_rawDescGZIP(), []int{2}
}
func (x *Command) GetType() Command_Type {
@ -320,74 +271,19 @@ func (*Command_ExecuteRequest) isCommand_Request() {}
func (*Command_QueryRequest) isCommand_Request() {}
type ResultsError struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type ResultsError_Type `protobuf:"varint,1,opt,name=type,proto3,enum=cluster.ResultsError_Type" json:"type,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *ResultsError) Reset() {
*x = ResultsError{}
if protoimpl.UnsafeEnabled {
mi := &file_cluster_message_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ResultsError) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResultsError) ProtoMessage() {}
func (x *ResultsError) ProtoReflect() protoreflect.Message {
mi := &file_cluster_message_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ResultsError.ProtoReflect.Descriptor instead.
func (*ResultsError) Descriptor() ([]byte, []int) {
return file_cluster_message_proto_rawDescGZIP(), []int{3}
}
func (x *ResultsError) GetType() ResultsError_Type {
if x != nil {
return x.Type
}
return ResultsError_RESULTS_ERROR_UNSPECIFIED
}
func (x *ResultsError) GetError() string {
if x != nil {
return x.Error
}
return ""
}
type CommandExecuteResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Error *ResultsError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
Results []*command.ExecuteResult `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"`
}
func (x *CommandExecuteResponse) Reset() {
*x = CommandExecuteResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_cluster_message_proto_msgTypes[4]
mi := &file_message_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -400,7 +296,7 @@ func (x *CommandExecuteResponse) String() string {
func (*CommandExecuteResponse) ProtoMessage() {}
func (x *CommandExecuteResponse) ProtoReflect() protoreflect.Message {
mi := &file_cluster_message_proto_msgTypes[4]
mi := &file_message_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -413,14 +309,14 @@ func (x *CommandExecuteResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use CommandExecuteResponse.ProtoReflect.Descriptor instead.
func (*CommandExecuteResponse) Descriptor() ([]byte, []int) {
return file_cluster_message_proto_rawDescGZIP(), []int{4}
return file_message_proto_rawDescGZIP(), []int{3}
}
func (x *CommandExecuteResponse) GetError() *ResultsError {
func (x *CommandExecuteResponse) GetError() string {
if x != nil {
return x.Error
}
return nil
return ""
}
func (x *CommandExecuteResponse) GetResults() []*command.ExecuteResult {
@ -435,14 +331,14 @@ type CommandQueryResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Error *ResultsError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
Rows []*command.QueryRows `protobuf:"bytes,2,rep,name=rows,proto3" json:"rows,omitempty"`
}
func (x *CommandQueryResponse) Reset() {
*x = CommandQueryResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_cluster_message_proto_msgTypes[5]
mi := &file_message_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -455,7 +351,7 @@ func (x *CommandQueryResponse) String() string {
func (*CommandQueryResponse) ProtoMessage() {}
func (x *CommandQueryResponse) ProtoReflect() protoreflect.Message {
mi := &file_cluster_message_proto_msgTypes[5]
mi := &file_message_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -468,14 +364,14 @@ func (x *CommandQueryResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use CommandQueryResponse.ProtoReflect.Descriptor instead.
func (*CommandQueryResponse) Descriptor() ([]byte, []int) {
return file_cluster_message_proto_rawDescGZIP(), []int{5}
return file_message_proto_rawDescGZIP(), []int{4}
}
func (x *CommandQueryResponse) GetError() *ResultsError {
func (x *CommandQueryResponse) GetError() string {
if x != nil {
return x.Error
}
return nil
return ""
}
func (x *CommandQueryResponse) GetRows() []*command.QueryRows {
@ -485,126 +381,105 @@ func (x *CommandQueryResponse) GetRows() []*command.QueryRows {
return nil
}
var File_cluster_message_proto protoreflect.FileDescriptor
var file_cluster_message_proto_rawDesc = []byte{
0x0a, 0x15, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
0x1a, 0x15, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e,
0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x45, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x64, 0x65,
0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x1b,
0x0a, 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0xf0, 0x02, 0x0a, 0x07,
0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x29, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e,
0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
0x70, 0x65, 0x12, 0x42, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f,
0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f,
0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6c, 0x75, 0x73,
0x74, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52,
0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x22, 0x75, 0x0a, 0x04,
0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x5f,
0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x21,
0x0a, 0x1d, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47,
0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x41, 0x50, 0x49, 0x5f, 0x55, 0x52, 0x4c, 0x10,
0x01, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x54, 0x59, 0x50,
0x45, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x43,
0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x51, 0x55, 0x45, 0x52,
0x59, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xc0,
0x01, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12,
0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e,
0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x45,
0x72, 0x72, 0x6f, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x6a, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a,
0x19, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55,
0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a,
0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e,
0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f,
0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x53, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x49,
0x4c, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10,
0x02, 0x22, 0x77, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x45, 0x78, 0x65, 0x63,
0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x65,
0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6c, 0x75,
0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75,
0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x61, 0x6e, 0x64, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c,
0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x6b, 0x0a, 0x14, 0x43, 0x6f,
0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x75,
0x6c, 0x74, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12,
0x26, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e,
0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x6f, 0x77,
0x73, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x71, 0x6c, 0x69, 0x74, 0x65, 0x2f, 0x72, 0x71, 0x6c,
0x69, 0x74, 0x65, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
var File_message_proto protoreflect.FileDescriptor
var file_message_proto_rawDesc = []byte{
0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x15, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e,
0x64, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x45, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x1a,
0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61,
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61,
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x1b, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x75, 0x72, 0x6c, 0x22, 0xf0, 0x02, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12,
0x29, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e,
0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e,
0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x42, 0x0a, 0x0f, 0x65, 0x78,
0x65, 0x63, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x45, 0x78,
0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0e,
0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c,
0x0a, 0x0d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e,
0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0c,
0x71, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0b,
0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x64,
0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
0x69, 0x61, 0x6c, 0x73, 0x22, 0x75, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14,
0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b,
0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e,
0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f,
0x41, 0x50, 0x49, 0x5f, 0x55, 0x52, 0x4c, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x4f, 0x4d,
0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54,
0x45, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x5f, 0x54,
0x59, 0x50, 0x45, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x03, 0x42, 0x09, 0x0a, 0x07, 0x72,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x60, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e,
0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e,
0x64, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52,
0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x54, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x6d,
0x61, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x26, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x51,
0x75, 0x65, 0x72, 0x79, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x42, 0x22,
0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x71, 0x6c,
0x69, 0x74, 0x65, 0x2f, 0x72, 0x71, 0x6c, 0x69, 0x74, 0x65, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74,
0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_cluster_message_proto_rawDescOnce sync.Once
file_cluster_message_proto_rawDescData = file_cluster_message_proto_rawDesc
file_message_proto_rawDescOnce sync.Once
file_message_proto_rawDescData = file_message_proto_rawDesc
)
func file_cluster_message_proto_rawDescGZIP() []byte {
file_cluster_message_proto_rawDescOnce.Do(func() {
file_cluster_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_cluster_message_proto_rawDescData)
func file_message_proto_rawDescGZIP() []byte {
file_message_proto_rawDescOnce.Do(func() {
file_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_proto_rawDescData)
})
return file_cluster_message_proto_rawDescData
return file_message_proto_rawDescData
}
var file_cluster_message_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_cluster_message_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_cluster_message_proto_goTypes = []interface{}{
var file_message_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_message_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_message_proto_goTypes = []interface{}{
(Command_Type)(0), // 0: cluster.Command.Type
(ResultsError_Type)(0), // 1: cluster.ResultsError.Type
(*Credentials)(nil), // 2: cluster.Credentials
(*Address)(nil), // 3: cluster.Address
(*Command)(nil), // 4: cluster.Command
(*ResultsError)(nil), // 5: cluster.ResultsError
(*CommandExecuteResponse)(nil), // 6: cluster.CommandExecuteResponse
(*CommandQueryResponse)(nil), // 7: cluster.CommandQueryResponse
(*command.ExecuteRequest)(nil), // 8: command.ExecuteRequest
(*command.QueryRequest)(nil), // 9: command.QueryRequest
(*command.ExecuteResult)(nil), // 10: command.ExecuteResult
(*command.QueryRows)(nil), // 11: command.QueryRows
}
var file_cluster_message_proto_depIdxs = []int32{
0, // 0: cluster.Command.type:type_name -> cluster.Command.Type
8, // 1: cluster.Command.execute_request:type_name -> command.ExecuteRequest
9, // 2: cluster.Command.query_request:type_name -> command.QueryRequest
2, // 3: cluster.Command.credentials:type_name -> cluster.Credentials
1, // 4: cluster.ResultsError.type:type_name -> cluster.ResultsError.Type
5, // 5: cluster.CommandExecuteResponse.error:type_name -> cluster.ResultsError
10, // 6: cluster.CommandExecuteResponse.results:type_name -> command.ExecuteResult
5, // 7: cluster.CommandQueryResponse.error:type_name -> cluster.ResultsError
11, // 8: cluster.CommandQueryResponse.rows:type_name -> command.QueryRows
9, // [9:9] is the sub-list for method output_type
9, // [9:9] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
}
func init() { file_cluster_message_proto_init() }
func file_cluster_message_proto_init() {
if File_cluster_message_proto != nil {
(*Credentials)(nil), // 1: cluster.Credentials
(*Address)(nil), // 2: cluster.Address
(*Command)(nil), // 3: cluster.Command
(*CommandExecuteResponse)(nil), // 4: cluster.CommandExecuteResponse
(*CommandQueryResponse)(nil), // 5: cluster.CommandQueryResponse
(*command.ExecuteRequest)(nil), // 6: command.ExecuteRequest
(*command.QueryRequest)(nil), // 7: command.QueryRequest
(*command.ExecuteResult)(nil), // 8: command.ExecuteResult
(*command.QueryRows)(nil), // 9: command.QueryRows
}
var file_message_proto_depIdxs = []int32{
0, // 0: cluster.Command.type:type_name -> cluster.Command.Type
6, // 1: cluster.Command.execute_request:type_name -> command.ExecuteRequest
7, // 2: cluster.Command.query_request:type_name -> command.QueryRequest
1, // 3: cluster.Command.credentials:type_name -> cluster.Credentials
8, // 4: cluster.CommandExecuteResponse.results:type_name -> command.ExecuteResult
9, // 5: cluster.CommandQueryResponse.rows:type_name -> command.QueryRows
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_message_proto_init() }
func file_message_proto_init() {
if File_message_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_cluster_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Credentials); i {
case 0:
return &v.state
@ -616,7 +491,7 @@ func file_cluster_message_proto_init() {
return nil
}
}
file_cluster_message_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
file_message_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Address); i {
case 0:
return &v.state
@ -628,7 +503,7 @@ func file_cluster_message_proto_init() {
return nil
}
}
file_cluster_message_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
file_message_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Command); i {
case 0:
return &v.state
@ -640,19 +515,7 @@ func file_cluster_message_proto_init() {
return nil
}
}
file_cluster_message_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ResultsError); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cluster_message_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
file_message_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CommandExecuteResponse); i {
case 0:
return &v.state
@ -664,7 +527,7 @@ func file_cluster_message_proto_init() {
return nil
}
}
file_cluster_message_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
file_message_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CommandQueryResponse); i {
case 0:
return &v.state
@ -677,7 +540,7 @@ func file_cluster_message_proto_init() {
}
}
}
file_cluster_message_proto_msgTypes[2].OneofWrappers = []interface{}{
file_message_proto_msgTypes[2].OneofWrappers = []interface{}{
(*Command_ExecuteRequest)(nil),
(*Command_QueryRequest)(nil),
}
@ -685,19 +548,19 @@ func file_cluster_message_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_cluster_message_proto_rawDesc,
NumEnums: 2,
NumMessages: 6,
RawDescriptor: file_message_proto_rawDesc,
NumEnums: 1,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_cluster_message_proto_goTypes,
DependencyIndexes: file_cluster_message_proto_depIdxs,
EnumInfos: file_cluster_message_proto_enumTypes,
MessageInfos: file_cluster_message_proto_msgTypes,
GoTypes: file_message_proto_goTypes,
DependencyIndexes: file_message_proto_depIdxs,
EnumInfos: file_message_proto_enumTypes,
MessageInfos: file_message_proto_msgTypes,
}.Build()
File_cluster_message_proto = out.File
file_cluster_message_proto_rawDesc = nil
file_cluster_message_proto_goTypes = nil
file_cluster_message_proto_depIdxs = nil
File_message_proto = out.File
file_message_proto_rawDesc = nil
file_message_proto_goTypes = nil
file_message_proto_depIdxs = nil
}

@ -31,22 +31,12 @@ message Command {
Credentials credentials = 4;
}
message ResultsError {
enum Type {
RESULTS_ERROR_UNSPECIFIED = 0;
RESULTS_ERROR_UNAUTHORIZED = 1;
RESULTS_ERROR_NIL_QUERY_REQUEST =2;
}
Type type = 1;
string error = 2;
}
message CommandExecuteResponse {
ResultsError error = 1;
string error = 1;
repeated command.ExecuteResult results = 2;
}
message CommandQueryResponse {
ResultsError error = 1;
string error = 1;
repeated command.QueryRows rows = 2;
}

@ -237,22 +237,13 @@ func (s *Service) handleConn(conn net.Conn) {
resp := &CommandExecuteResponse{}
er := c.GetExecuteRequest()
if er == nil {
resp.Error = &ResultsError{
Type: ResultsError_RESULTS_ERROR_NIL_QUERY_REQUEST,
Error: "Query Request is nil",
}
resp.Error = "ExecuteRequest is nil"
} else if !s.checkCommandPerm(c, auth.PermExecute) {
resp.Error = &ResultsError{
Type: ResultsError_RESULTS_ERROR_UNAUTHORIZED,
Error: "Unauthorized",
}
resp.Error = "unauthorized"
} else {
res, err := s.db.Execute(er)
if err != nil {
resp.Error = &ResultsError{
Type: ResultsError_RESULTS_ERROR_UNSPECIFIED,
Error: err.Error(),
}
resp.Error = err.Error()
} else {
resp.Results = make([]*command.ExecuteResult, len(res))
for i := range res {
@ -278,22 +269,13 @@ func (s *Service) handleConn(conn net.Conn) {
qr := c.GetQueryRequest()
if qr == nil {
resp.Error = &ResultsError{
Type: ResultsError_RESULTS_ERROR_NIL_QUERY_REQUEST,
Error: "Query Request is nil",
}
resp.Error = "QueryRequest is nil"
} else if !s.checkCommandPerm(c, auth.PermQuery) {
resp.Error = &ResultsError{
Type: ResultsError_RESULTS_ERROR_UNAUTHORIZED,
Error: "Unauthorized",
}
resp.Error = "unauthorized"
} else {
res, err := s.db.Query(qr)
if err != nil {
resp.Error = &ResultsError{
Type: ResultsError_RESULTS_ERROR_UNSPECIFIED,
Error: err.Error(),
}
resp.Error = err.Error()
} else {
resp.Rows = make([]*command.QueryRows, len(res))
for i := range res {

@ -204,15 +204,23 @@ func Test_NewServiceTestExecuteQueryAuthNoCredentials(t *testing.T) {
}
}
// Test_NewServiceTestExecuteQueryAuth tests that for a cluster with a credential
// store, configured users with execute permissions can execute and users with
// query permissions can query, and can't if they don't have those permissions.
func Test_NewServiceTestExecuteQueryAuth(t *testing.T) {
ml := mustNewMockTransport()
db := mustNewMockDatabase()
// Test that for a cluster with a credential store configed
// users with execute permissions can execute and users with
// query permissions can query and can't if they don't have those
// permissions
c := mustNewMockCredentialStoreBob()
f := func(username string, password string, perm string) bool {
if username == "alice" && password == "secret1" && perm == "execute" {
return true
} else if username == "bob" && password == "secret1" && perm == "query" {
return true
}
return false
}
c := &mockCredentialStore{aaFunc: f}
s := New(ml, db, c)
if s == nil {
t.Fatalf("failed to create cluster service")
@ -237,12 +245,12 @@ func Test_NewServiceTestExecuteQueryAuth(t *testing.T) {
}
qr := &command.QueryRequest{}
_, err = cl.Query(qr, s.Addr(), "bob", "secret1", 5*time.Second)
if err != nil {
if err != nil && err.Error() != "unauthorized" {
fmt.Println(err)
t.Fatal("bob improperly unauthorized to query")
}
_, err = cl.Query(qr, s.Addr(), "alice", "secret1", 5*time.Second)
if err == nil {
if err != nil && err.Error() != "unauthorized" {
t.Fatal("alice improperly authorized to query")
}
}
@ -361,16 +369,3 @@ func (m *mockCredentialStore) AA(username, password, perm string) bool {
func mustNewMockCredentialStore() *mockCredentialStore {
return &mockCredentialStore{HasPermOK: true}
}
func mustNewMockCredentialStoreBob() *mockCredentialStore {
f := func(username string, password string, perm string) bool {
fmt.Println(username, password, perm)
if username == "alice" && password == "secret1" && perm == "execute" {
return true
} else if username == "bob" && password == "secret1" && perm == "query" {
return true
}
return false
}
return &mockCredentialStore{aaFunc: f}
}

@ -1108,7 +1108,7 @@ func (s *Service) execute(w http.ResponseWriter, r *http.Request) {
}
results, resultsErr = s.cluster.Execute(er, addr, username, password, timeout)
if resultsErr != nil && resultsErr.Error() == "Unauthorized" {
if resultsErr != nil && resultsErr.Error() == "unauthorized" {
w.WriteHeader(http.StatusUnauthorized)
return
}
@ -1205,7 +1205,7 @@ func (s *Service) handleQuery(w http.ResponseWriter, r *http.Request) {
username = ""
}
results, resultsErr = s.cluster.Query(qr, addr, username, password, timeout)
if resultsErr != nil && resultsErr.Error() == "Unauthorized" {
if resultsErr != nil && resultsErr.Error() == "unauthorized" {
w.WriteHeader(http.StatusUnauthorized)
return
}

Loading…
Cancel
Save