diff --git a/auth/auth.pb.go b/auth/auth.pb.go index ecf96ab..2d7adec 100644 --- a/auth/auth.pb.go +++ b/auth/auth.pb.go @@ -351,6 +351,155 @@ func (x *AuthMetadataResponse) GetAccountURL() string { return "" } +type AvatarListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserIDs []uint64 `protobuf:"varint,1,rep,packed,name=UserIDs,proto3" json:"UserIDs,omitempty"` +} + +func (x *AvatarListRequest) Reset() { + *x = AvatarListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_auth_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AvatarListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AvatarListRequest) ProtoMessage() {} + +func (x *AvatarListRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[6] + 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 AvatarListRequest.ProtoReflect.Descriptor instead. +func (*AvatarListRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{6} +} + +func (x *AvatarListRequest) GetUserIDs() []uint64 { + if x != nil { + return x.UserIDs + } + return nil +} + +type AvatarItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserID uint64 `protobuf:"varint,1,opt,name=UserID,proto3" json:"UserID,omitempty"` + AvatarURL string `protobuf:"bytes,2,opt,name=AvatarURL,proto3" json:"AvatarURL,omitempty"` +} + +func (x *AvatarItem) Reset() { + *x = AvatarItem{} + if protoimpl.UnsafeEnabled { + mi := &file_auth_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AvatarItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AvatarItem) ProtoMessage() {} + +func (x *AvatarItem) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[7] + 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 AvatarItem.ProtoReflect.Descriptor instead. +func (*AvatarItem) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{7} +} + +func (x *AvatarItem) GetUserID() uint64 { + if x != nil { + return x.UserID + } + return 0 +} + +func (x *AvatarItem) GetAvatarURL() string { + if x != nil { + return x.AvatarURL + } + return "" +} + +type AvatarListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Avatars []*AvatarItem `protobuf:"bytes,1,rep,name=Avatars,proto3" json:"Avatars,omitempty"` +} + +func (x *AvatarListResponse) Reset() { + *x = AvatarListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_auth_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AvatarListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AvatarListResponse) ProtoMessage() {} + +func (x *AvatarListResponse) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[8] + 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 AvatarListResponse.ProtoReflect.Descriptor instead. +func (*AvatarListResponse) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{8} +} + +func (x *AvatarListResponse) GetAvatars() []*AvatarItem { + if x != nil { + return x.Avatars + } + return nil +} + var File_auth_proto protoreflect.FileDescriptor var file_auth_proto_rawDesc = []byte{ @@ -384,26 +533,42 @@ var file_auth_proto_rawDesc = []byte{ 0x75, 0x74, 0x55, 0x52, 0x4c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x55, 0x52, 0x4c, 0x12, 0x1e, 0x0a, 0x0a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x52, 0x4c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x55, 0x52, 0x4c, 0x32, 0x82, 0x02, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x49, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x19, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x49, 0x64, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x11, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x52, 0x6f, 0x6c, - 0x65, 0x52, 0x65, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x16, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, - 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, - 0x69, 0x74, 0x2e, 0x69, 0x74, 0x7a, 0x61, 0x6e, 0x61, 0x2e, 0x6d, 0x65, 0x2f, 0x73, 0x74, 0x72, - 0x61, 0x66, 0x65, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x6e, 0x74, 0x55, 0x52, 0x4c, 0x22, 0x2d, 0x0a, 0x11, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x07, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0x42, 0x0a, 0x0a, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x49, + 0x74, 0x65, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x41, + 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x52, 0x4c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x52, 0x4c, 0x22, 0x40, 0x0a, 0x12, 0x41, 0x76, 0x61, + 0x74, 0x61, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2a, 0x0a, 0x07, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x49, 0x74, + 0x65, 0x6d, 0x52, 0x07, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x73, 0x32, 0xc3, 0x02, 0x0a, 0x0b, + 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0f, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x19, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0c, 0x47, 0x65, 0x74, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0f, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x11, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, + 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x0f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x1a, 0x16, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0f, 0x47, 0x65, 0x74, + 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x41, 0x75, 0x74, 0x68, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x73, 0x12, 0x17, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x41, + 0x76, 0x61, 0x74, 0x61, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x2e, 0x69, 0x74, 0x7a, 0x61, 0x6e, 0x61, 0x2e, + 0x6d, 0x65, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x66, 0x65, 0x73, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, + 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -418,7 +583,7 @@ func file_auth_proto_rawDescGZIP() []byte { return file_auth_proto_rawDescData } -var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_auth_proto_goTypes = []interface{}{ (*IdMessage)(nil), // 0: auth.IdMessage (*SessionUserResponse)(nil), // 1: auth.SessionUserResponse @@ -426,23 +591,29 @@ var file_auth_proto_goTypes = []interface{}{ (*RoleItem)(nil), // 3: auth.RoleItem (*ValidateResponse)(nil), // 4: auth.ValidateResponse (*AuthMetadataResponse)(nil), // 5: auth.AuthMetadataResponse - (*emptypb.Empty)(nil), // 6: google.protobuf.Empty + (*AvatarListRequest)(nil), // 6: auth.AvatarListRequest + (*AvatarItem)(nil), // 7: auth.AvatarItem + (*AvatarListResponse)(nil), // 8: auth.AvatarListResponse + (*emptypb.Empty)(nil), // 9: google.protobuf.Empty } var file_auth_proto_depIdxs = []int32{ 3, // 0: auth.RoleReponse.Roles:type_name -> auth.RoleItem - 0, // 1: auth.AuthService.GetSessionUser:input_type -> auth.IdMessage - 0, // 2: auth.AuthService.GetGroupRole:input_type -> auth.IdMessage - 0, // 3: auth.AuthService.ValidateSession:input_type -> auth.IdMessage - 6, // 4: auth.AuthService.GetAuthMetadata:input_type -> google.protobuf.Empty - 1, // 5: auth.AuthService.GetSessionUser:output_type -> auth.SessionUserResponse - 2, // 6: auth.AuthService.GetGroupRole:output_type -> auth.RoleReponse - 4, // 7: auth.AuthService.ValidateSession:output_type -> auth.ValidateResponse - 5, // 8: auth.AuthService.GetAuthMetadata:output_type -> auth.AuthMetadataResponse - 5, // [5:9] is the sub-list for method output_type - 1, // [1:5] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 7, // 1: auth.AvatarListResponse.Avatars:type_name -> auth.AvatarItem + 0, // 2: auth.AuthService.GetSessionUser:input_type -> auth.IdMessage + 0, // 3: auth.AuthService.GetGroupRole:input_type -> auth.IdMessage + 0, // 4: auth.AuthService.ValidateSession:input_type -> auth.IdMessage + 9, // 5: auth.AuthService.GetAuthMetadata:input_type -> google.protobuf.Empty + 6, // 6: auth.AuthService.GetAvatars:input_type -> auth.AvatarListRequest + 1, // 7: auth.AuthService.GetSessionUser:output_type -> auth.SessionUserResponse + 2, // 8: auth.AuthService.GetGroupRole:output_type -> auth.RoleReponse + 4, // 9: auth.AuthService.ValidateSession:output_type -> auth.ValidateResponse + 5, // 10: auth.AuthService.GetAuthMetadata:output_type -> auth.AuthMetadataResponse + 8, // 11: auth.AuthService.GetAvatars:output_type -> auth.AvatarListResponse + 7, // [7:12] is the sub-list for method output_type + 2, // [2:7] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_auth_proto_init() } @@ -523,6 +694,42 @@ func file_auth_proto_init() { return nil } } + file_auth_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AvatarListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_auth_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AvatarItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_auth_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AvatarListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -530,7 +737,7 @@ func file_auth_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_auth_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 9, NumExtensions: 0, NumServices: 1, }, diff --git a/auth/auth_grpc.pb.go b/auth/auth_grpc.pb.go index 769997a..af07388 100644 --- a/auth/auth_grpc.pb.go +++ b/auth/auth_grpc.pb.go @@ -27,6 +27,7 @@ type AuthServiceClient interface { GetGroupRole(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*RoleReponse, error) ValidateSession(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*ValidateResponse, error) GetAuthMetadata(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*AuthMetadataResponse, error) + GetAvatars(ctx context.Context, in *AvatarListRequest, opts ...grpc.CallOption) (*AvatarListResponse, error) } type authServiceClient struct { @@ -73,6 +74,15 @@ func (c *authServiceClient) GetAuthMetadata(ctx context.Context, in *emptypb.Emp return out, nil } +func (c *authServiceClient) GetAvatars(ctx context.Context, in *AvatarListRequest, opts ...grpc.CallOption) (*AvatarListResponse, error) { + out := new(AvatarListResponse) + err := c.cc.Invoke(ctx, "/auth.AuthService/GetAvatars", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // AuthServiceServer is the server API for AuthService service. // All implementations must embed UnimplementedAuthServiceServer // for forward compatibility @@ -81,6 +91,7 @@ type AuthServiceServer interface { GetGroupRole(context.Context, *IdMessage) (*RoleReponse, error) ValidateSession(context.Context, *IdMessage) (*ValidateResponse, error) GetAuthMetadata(context.Context, *emptypb.Empty) (*AuthMetadataResponse, error) + GetAvatars(context.Context, *AvatarListRequest) (*AvatarListResponse, error) mustEmbedUnimplementedAuthServiceServer() } @@ -100,6 +111,9 @@ func (UnimplementedAuthServiceServer) ValidateSession(context.Context, *IdMessag func (UnimplementedAuthServiceServer) GetAuthMetadata(context.Context, *emptypb.Empty) (*AuthMetadataResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAuthMetadata not implemented") } +func (UnimplementedAuthServiceServer) GetAvatars(context.Context, *AvatarListRequest) (*AvatarListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAvatars not implemented") +} func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {} // UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. @@ -185,6 +199,24 @@ func _AuthService_GetAuthMetadata_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _AuthService_GetAvatars_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AvatarListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).GetAvatars(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/auth.AuthService/GetAvatars", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).GetAvatars(ctx, req.(*AvatarListRequest)) + } + return interceptor(ctx, in, info, handler) +} + // AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -208,6 +240,10 @@ var AuthService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetAuthMetadata", Handler: _AuthService_GetAuthMetadata_Handler, }, + { + MethodName: "GetAvatars", + Handler: _AuthService_GetAvatars_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth.proto", diff --git a/users/users.pb.go b/users/users.pb.go index dc7ac1e..72b7f3f 100644 --- a/users/users.pb.go +++ b/users/users.pb.go @@ -476,6 +476,61 @@ func (x *Pagination) GetNumber() int32 { return 0 } +type SearchByUsernameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Query string `protobuf:"bytes,1,opt,name=Query,proto3" json:"Query,omitempty"` + Page *Pagination `protobuf:"bytes,2,opt,name=Page,proto3" json:"Page,omitempty"` +} + +func (x *SearchByUsernameRequest) Reset() { + *x = SearchByUsernameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchByUsernameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchByUsernameRequest) ProtoMessage() {} + +func (x *SearchByUsernameRequest) ProtoReflect() protoreflect.Message { + mi := &file_users_proto_msgTypes[8] + 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 SearchByUsernameRequest.ProtoReflect.Descriptor instead. +func (*SearchByUsernameRequest) Descriptor() ([]byte, []int) { + return file_users_proto_rawDescGZIP(), []int{8} +} + +func (x *SearchByUsernameRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *SearchByUsernameRequest) GetPage() *Pagination { + if x != nil { + return x.Page + } + return nil +} + type NullResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -485,7 +540,7 @@ type NullResponse struct { func (x *NullResponse) Reset() { *x = NullResponse{} if protoimpl.UnsafeEnabled { - mi := &file_users_proto_msgTypes[8] + mi := &file_users_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -498,7 +553,7 @@ func (x *NullResponse) String() string { func (*NullResponse) ProtoMessage() {} func (x *NullResponse) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[8] + mi := &file_users_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -511,7 +566,7 @@ func (x *NullResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use NullResponse.ProtoReflect.Descriptor instead. func (*NullResponse) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{8} + return file_users_proto_rawDescGZIP(), []int{9} } var File_users_proto protoreflect.FileDescriptor @@ -559,30 +614,40 @@ var file_users_proto_rawDesc = []byte{ 0x65, 0x22, 0x38, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x0e, 0x0a, 0x0c, 0x4e, - 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa8, 0x02, 0x0a, 0x0c, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x03, - 0x47, 0x65, 0x74, 0x12, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x49, 0x64, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x47, 0x65, - 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0d, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x49, 0x64, - 0x4c, 0x69, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, - 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x12, 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x49, - 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x12, 0x10, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x1a, 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x4e, 0x75, 0x6c, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x2e, 0x69, 0x74, - 0x7a, 0x61, 0x6e, 0x61, 0x2e, 0x6d, 0x65, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x66, 0x65, 0x73, 0x6e, - 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x56, 0x0a, 0x17, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x04, + 0x50, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x73, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x50, + 0x61, 0x67, 0x65, 0x22, 0x0e, 0x0a, 0x0c, 0x4e, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x32, 0xed, 0x02, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x73, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x10, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x73, 0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x13, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0d, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x31, 0x0a, + 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x73, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2e, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x12, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x2f, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x10, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x73, 0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x13, 0x2e, 0x75, + 0x73, 0x65, 0x72, 0x73, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, + 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x43, + 0x0a, 0x10, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x2e, 0x69, 0x74, 0x7a, 0x61, 0x6e, + 0x61, 0x2e, 0x6d, 0x65, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x66, 0x65, 0x73, 0x6e, 0x65, 0x74, 0x2f, + 0x67, 0x6f, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -597,39 +662,43 @@ func file_users_proto_rawDescGZIP() []byte { return file_users_proto_rawDescData } -var file_users_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_users_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_users_proto_goTypes = []interface{}{ - (*IdList)(nil), // 0: users.IdList - (*IdMessage)(nil), // 1: users.IdMessage - (*UserResponse)(nil), // 2: users.UserResponse - (*UserRequest)(nil), // 3: users.UserRequest - (*UserFilter)(nil), // 4: users.UserFilter - (*UserList)(nil), // 5: users.UserList - (*ListRequest)(nil), // 6: users.ListRequest - (*Pagination)(nil), // 7: users.Pagination - (*NullResponse)(nil), // 8: users.NullResponse + (*IdList)(nil), // 0: users.IdList + (*IdMessage)(nil), // 1: users.IdMessage + (*UserResponse)(nil), // 2: users.UserResponse + (*UserRequest)(nil), // 3: users.UserRequest + (*UserFilter)(nil), // 4: users.UserFilter + (*UserList)(nil), // 5: users.UserList + (*ListRequest)(nil), // 6: users.ListRequest + (*Pagination)(nil), // 7: users.Pagination + (*SearchByUsernameRequest)(nil), // 8: users.SearchByUsernameRequest + (*NullResponse)(nil), // 9: users.NullResponse } var file_users_proto_depIdxs = []int32{ - 2, // 0: users.UserList.Users:type_name -> users.UserResponse - 4, // 1: users.ListRequest.Filter:type_name -> users.UserFilter - 7, // 2: users.ListRequest.Page:type_name -> users.Pagination - 1, // 3: users.UsersService.Get:input_type -> users.IdMessage - 0, // 4: users.UsersService.GetList:input_type -> users.IdList - 3, // 5: users.UsersService.Update:input_type -> users.UserRequest - 3, // 6: users.UsersService.Create:input_type -> users.UserRequest - 1, // 7: users.UsersService.Delete:input_type -> users.IdMessage - 6, // 8: users.UsersService.List:input_type -> users.ListRequest - 2, // 9: users.UsersService.Get:output_type -> users.UserResponse - 5, // 10: users.UsersService.GetList:output_type -> users.UserList - 8, // 11: users.UsersService.Update:output_type -> users.NullResponse - 1, // 12: users.UsersService.Create:output_type -> users.IdMessage - 8, // 13: users.UsersService.Delete:output_type -> users.NullResponse - 5, // 14: users.UsersService.List:output_type -> users.UserList - 9, // [9:15] is the sub-list for method output_type - 3, // [3:9] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 2, // 0: users.UserList.Users:type_name -> users.UserResponse + 4, // 1: users.ListRequest.Filter:type_name -> users.UserFilter + 7, // 2: users.ListRequest.Page:type_name -> users.Pagination + 7, // 3: users.SearchByUsernameRequest.Page:type_name -> users.Pagination + 1, // 4: users.UsersService.Get:input_type -> users.IdMessage + 0, // 5: users.UsersService.GetList:input_type -> users.IdList + 3, // 6: users.UsersService.Update:input_type -> users.UserRequest + 3, // 7: users.UsersService.Create:input_type -> users.UserRequest + 1, // 8: users.UsersService.Delete:input_type -> users.IdMessage + 6, // 9: users.UsersService.List:input_type -> users.ListRequest + 8, // 10: users.UsersService.SearchByUsername:input_type -> users.SearchByUsernameRequest + 2, // 11: users.UsersService.Get:output_type -> users.UserResponse + 5, // 12: users.UsersService.GetList:output_type -> users.UserList + 9, // 13: users.UsersService.Update:output_type -> users.NullResponse + 1, // 14: users.UsersService.Create:output_type -> users.IdMessage + 9, // 15: users.UsersService.Delete:output_type -> users.NullResponse + 5, // 16: users.UsersService.List:output_type -> users.UserList + 5, // 17: users.UsersService.SearchByUsername:output_type -> users.UserList + 11, // [11:18] is the sub-list for method output_type + 4, // [4:11] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_users_proto_init() } @@ -735,6 +804,18 @@ func file_users_proto_init() { } } file_users_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchByUsernameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NullResponse); i { case 0: return &v.state @@ -755,7 +836,7 @@ func file_users_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_users_proto_rawDesc, NumEnums: 0, - NumMessages: 9, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/users/users_grpc.pb.go b/users/users_grpc.pb.go index 4b1f60d..8870f6e 100644 --- a/users/users_grpc.pb.go +++ b/users/users_grpc.pb.go @@ -28,6 +28,7 @@ type UsersServiceClient interface { Create(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*IdMessage, error) Delete(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*NullResponse, error) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*UserList, error) + SearchByUsername(ctx context.Context, in *SearchByUsernameRequest, opts ...grpc.CallOption) (*UserList, error) } type usersServiceClient struct { @@ -92,6 +93,15 @@ func (c *usersServiceClient) List(ctx context.Context, in *ListRequest, opts ... return out, nil } +func (c *usersServiceClient) SearchByUsername(ctx context.Context, in *SearchByUsernameRequest, opts ...grpc.CallOption) (*UserList, error) { + out := new(UserList) + err := c.cc.Invoke(ctx, "/users.UsersService/SearchByUsername", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // UsersServiceServer is the server API for UsersService service. // All implementations must embed UnimplementedUsersServiceServer // for forward compatibility @@ -102,6 +112,7 @@ type UsersServiceServer interface { Create(context.Context, *UserRequest) (*IdMessage, error) Delete(context.Context, *IdMessage) (*NullResponse, error) List(context.Context, *ListRequest) (*UserList, error) + SearchByUsername(context.Context, *SearchByUsernameRequest) (*UserList, error) mustEmbedUnimplementedUsersServiceServer() } @@ -127,6 +138,9 @@ func (UnimplementedUsersServiceServer) Delete(context.Context, *IdMessage) (*Nul func (UnimplementedUsersServiceServer) List(context.Context, *ListRequest) (*UserList, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } +func (UnimplementedUsersServiceServer) SearchByUsername(context.Context, *SearchByUsernameRequest) (*UserList, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchByUsername not implemented") +} func (UnimplementedUsersServiceServer) mustEmbedUnimplementedUsersServiceServer() {} // UnsafeUsersServiceServer may be embedded to opt out of forward compatibility for this service. @@ -248,6 +262,24 @@ func _UsersService_List_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _UsersService_SearchByUsername_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchByUsernameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UsersServiceServer).SearchByUsername(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/users.UsersService/SearchByUsername", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UsersServiceServer).SearchByUsername(ctx, req.(*SearchByUsernameRequest)) + } + return interceptor(ctx, in, info, handler) +} + // UsersService_ServiceDesc is the grpc.ServiceDesc for UsersService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -279,6 +311,10 @@ var UsersService_ServiceDesc = grpc.ServiceDesc{ MethodName: "List", Handler: _UsersService_List_Handler, }, + { + MethodName: "SearchByUsername", + Handler: _UsersService_SearchByUsername_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "users.proto",