自动生成 protobuf 代码 (tag: v1.5.0)
This commit is contained in:
@@ -499,7 +499,8 @@ func (*GetAvatarUploadURLRequest) Descriptor() ([]byte, []int) {
|
||||
|
||||
type GetAvatarUploadURLResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -534,6 +535,13 @@ func (*GetAvatarUploadURLResponse) Descriptor() ([]byte, []int) {
|
||||
return file_account_v1_account_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *GetAvatarUploadURLResponse) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetAvatarUploadURLResponse) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
@@ -543,7 +551,7 @@ func (x *GetAvatarUploadURLResponse) GetUrl() string {
|
||||
|
||||
type SetAvatarRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -578,9 +586,9 @@ func (*SetAvatarRequest) Descriptor() ([]byte, []int) {
|
||||
return file_account_v1_account_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *SetAvatarRequest) GetUrl() string {
|
||||
func (x *SetAvatarRequest) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -621,6 +629,86 @@ func (*SetAvatarResponse) Descriptor() ([]byte, []int) {
|
||||
return file_account_v1_account_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
type SetDescriptionRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SetDescriptionRequest) Reset() {
|
||||
*x = SetDescriptionRequest{}
|
||||
mi := &file_account_v1_account_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SetDescriptionRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SetDescriptionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SetDescriptionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_account_v1_account_proto_msgTypes[12]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SetDescriptionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SetDescriptionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_account_v1_account_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *SetDescriptionRequest) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SetDescriptionResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SetDescriptionResponse) Reset() {
|
||||
*x = SetDescriptionResponse{}
|
||||
mi := &file_account_v1_account_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SetDescriptionResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SetDescriptionResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SetDescriptionResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_account_v1_account_proto_msgTypes[13]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SetDescriptionResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SetDescriptionResponse) Descriptor() ([]byte, []int) {
|
||||
return file_account_v1_account_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
type GetUserInfoRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@@ -629,7 +717,7 @@ type GetUserInfoRequest struct {
|
||||
|
||||
func (x *GetUserInfoRequest) Reset() {
|
||||
*x = GetUserInfoRequest{}
|
||||
mi := &file_account_v1_account_proto_msgTypes[12]
|
||||
mi := &file_account_v1_account_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -641,7 +729,7 @@ func (x *GetUserInfoRequest) String() string {
|
||||
func (*GetUserInfoRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserInfoRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_account_v1_account_proto_msgTypes[12]
|
||||
mi := &file_account_v1_account_proto_msgTypes[14]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -654,7 +742,7 @@ func (x *GetUserInfoRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetUserInfoRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetUserInfoRequest) Descriptor() ([]byte, []int) {
|
||||
return file_account_v1_account_proto_rawDescGZIP(), []int{12}
|
||||
return file_account_v1_account_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
type GetUserInfoResponse struct {
|
||||
@@ -662,16 +750,17 @@ type GetUserInfoResponse struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Avatar string `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"`
|
||||
InvitationCode string `protobuf:"bytes,3,opt,name=invitation_code,json=invitationCode,proto3" json:"invitation_code,omitempty"`
|
||||
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"`
|
||||
Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"`
|
||||
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
|
||||
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Phone string `protobuf:"bytes,6,opt,name=phone,proto3" json:"phone,omitempty"`
|
||||
Email string `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) Reset() {
|
||||
*x = GetUserInfoResponse{}
|
||||
mi := &file_account_v1_account_proto_msgTypes[13]
|
||||
mi := &file_account_v1_account_proto_msgTypes[15]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -683,7 +772,7 @@ func (x *GetUserInfoResponse) String() string {
|
||||
func (*GetUserInfoResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserInfoResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_account_v1_account_proto_msgTypes[13]
|
||||
mi := &file_account_v1_account_proto_msgTypes[15]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -696,7 +785,7 @@ func (x *GetUserInfoResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetUserInfoResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetUserInfoResponse) Descriptor() ([]byte, []int) {
|
||||
return file_account_v1_account_proto_rawDescGZIP(), []int{13}
|
||||
return file_account_v1_account_proto_rawDescGZIP(), []int{15}
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetId() string {
|
||||
@@ -720,6 +809,13 @@ func (x *GetUserInfoResponse) GetInvitationCode() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
@@ -771,33 +867,39 @@ const file_account_v1_account_proto_rawDesc = "" +
|
||||
"\x0eSetNameRequest\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\"\x11\n" +
|
||||
"\x0fSetNameResponse\"\x1b\n" +
|
||||
"\x19GetAvatarUploadURLRequest\".\n" +
|
||||
"\x19GetAvatarUploadURLRequest\"@\n" +
|
||||
"\x1aGetAvatarUploadURLResponse\x12\x10\n" +
|
||||
"\x03url\x18\x01 \x01(\tR\x03url\"$\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x10\n" +
|
||||
"\x03url\x18\x02 \x01(\tR\x03url\"$\n" +
|
||||
"\x10SetAvatarRequest\x12\x10\n" +
|
||||
"\x03url\x18\x01 \x01(\tR\x03url\"\x13\n" +
|
||||
"\x11SetAvatarResponse\"\x14\n" +
|
||||
"\x12GetUserInfoRequest\"\xa6\x01\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\"\x13\n" +
|
||||
"\x11SetAvatarResponse\"9\n" +
|
||||
"\x15SetDescriptionRequest\x12 \n" +
|
||||
"\vdescription\x18\x01 \x01(\tR\vdescription\"\x18\n" +
|
||||
"\x16SetDescriptionResponse\"\x14\n" +
|
||||
"\x12GetUserInfoRequest\"\xc8\x01\n" +
|
||||
"\x13GetUserInfoResponse\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" +
|
||||
"\x06avatar\x18\x02 \x01(\tR\x06avatar\x12'\n" +
|
||||
"\x0finvitation_code\x18\x03 \x01(\tR\x0einvitationCode\x12\x12\n" +
|
||||
"\x04name\x18\x04 \x01(\tR\x04name\x12\x14\n" +
|
||||
"\x05phone\x18\x05 \x01(\tR\x05phone\x12\x14\n" +
|
||||
"\x05email\x18\x06 \x01(\tR\x05email*\xb5\x01\n" +
|
||||
"\x0finvitation_code\x18\x03 \x01(\tR\x0einvitationCode\x12 \n" +
|
||||
"\vdescription\x18\x04 \x01(\tR\vdescription\x12\x12\n" +
|
||||
"\x04name\x18\x05 \x01(\tR\x04name\x12\x14\n" +
|
||||
"\x05phone\x18\x06 \x01(\tR\x05phone\x12\x14\n" +
|
||||
"\x05email\x18\a \x01(\tR\x05email*\xb5\x01\n" +
|
||||
"\x12AuthenticationType\x12#\n" +
|
||||
"\x1fAUTHENTICATION_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n" +
|
||||
"\x18AUTHENTICATION_TYPE_NAME\x10\x01\x12\x1d\n" +
|
||||
"\x19AUTHENTICATION_TYPE_PHONE\x10\x02\x12\x1d\n" +
|
||||
"\x19AUTHENTICATION_TYPE_EMAIL\x10\x03\x12\x1e\n" +
|
||||
"\x1aAUTHENTICATION_TYPE_WECHAT\x10\x042\xb7\x04\n" +
|
||||
"\x1aAUTHENTICATION_TYPE_WECHAT\x10\x042\x90\x05\n" +
|
||||
"\x0eAccountService\x12W\n" +
|
||||
"\x0eSendCredential\x12!.account.v1.SendCredentialRequest\x1a\".account.v1.SendCredentialResponse\x129\n" +
|
||||
"\x04Auth\x12\x17.account.v1.AuthRequest\x1a\x18.account.v1.AuthResponse\x12N\n" +
|
||||
"\vSetPassword\x12\x1e.account.v1.SetPasswordRequest\x1a\x1f.account.v1.SetPasswordResponse\x12B\n" +
|
||||
"\aSetName\x12\x1a.account.v1.SetNameRequest\x1a\x1b.account.v1.SetNameResponse\x12c\n" +
|
||||
"\x12GetAvatarUploadURL\x12%.account.v1.GetAvatarUploadURLRequest\x1a&.account.v1.GetAvatarUploadURLResponse\x12H\n" +
|
||||
"\tSetAvatar\x12\x1c.account.v1.SetAvatarRequest\x1a\x1d.account.v1.SetAvatarResponse\x12N\n" +
|
||||
"\tSetAvatar\x12\x1c.account.v1.SetAvatarRequest\x1a\x1d.account.v1.SetAvatarResponse\x12W\n" +
|
||||
"\x0eSetDescription\x12!.account.v1.SetDescriptionRequest\x1a\".account.v1.SetDescriptionResponse\x12N\n" +
|
||||
"\vGetUserInfo\x12\x1e.account.v1.GetUserInfoRequest\x1a\x1f.account.v1.GetUserInfoResponseB7Z5git.shenxianhe.cn/shenxianhe/sdk/account/v1;accountv1b\x06proto3"
|
||||
|
||||
var (
|
||||
@@ -813,7 +915,7 @@ func file_account_v1_account_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_account_v1_account_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_account_v1_account_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
|
||||
var file_account_v1_account_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
|
||||
var file_account_v1_account_proto_goTypes = []any{
|
||||
(AuthenticationType)(0), // 0: account.v1.AuthenticationType
|
||||
(*SendCredentialRequest)(nil), // 1: account.v1.SendCredentialRequest
|
||||
@@ -828,8 +930,10 @@ var file_account_v1_account_proto_goTypes = []any{
|
||||
(*GetAvatarUploadURLResponse)(nil), // 10: account.v1.GetAvatarUploadURLResponse
|
||||
(*SetAvatarRequest)(nil), // 11: account.v1.SetAvatarRequest
|
||||
(*SetAvatarResponse)(nil), // 12: account.v1.SetAvatarResponse
|
||||
(*GetUserInfoRequest)(nil), // 13: account.v1.GetUserInfoRequest
|
||||
(*GetUserInfoResponse)(nil), // 14: account.v1.GetUserInfoResponse
|
||||
(*SetDescriptionRequest)(nil), // 13: account.v1.SetDescriptionRequest
|
||||
(*SetDescriptionResponse)(nil), // 14: account.v1.SetDescriptionResponse
|
||||
(*GetUserInfoRequest)(nil), // 15: account.v1.GetUserInfoRequest
|
||||
(*GetUserInfoResponse)(nil), // 16: account.v1.GetUserInfoResponse
|
||||
}
|
||||
var file_account_v1_account_proto_depIdxs = []int32{
|
||||
0, // 0: account.v1.SendCredentialRequest.auth_type:type_name -> account.v1.AuthenticationType
|
||||
@@ -841,16 +945,18 @@ var file_account_v1_account_proto_depIdxs = []int32{
|
||||
7, // 6: account.v1.AccountService.SetName:input_type -> account.v1.SetNameRequest
|
||||
9, // 7: account.v1.AccountService.GetAvatarUploadURL:input_type -> account.v1.GetAvatarUploadURLRequest
|
||||
11, // 8: account.v1.AccountService.SetAvatar:input_type -> account.v1.SetAvatarRequest
|
||||
13, // 9: account.v1.AccountService.GetUserInfo:input_type -> account.v1.GetUserInfoRequest
|
||||
2, // 10: account.v1.AccountService.SendCredential:output_type -> account.v1.SendCredentialResponse
|
||||
4, // 11: account.v1.AccountService.Auth:output_type -> account.v1.AuthResponse
|
||||
6, // 12: account.v1.AccountService.SetPassword:output_type -> account.v1.SetPasswordResponse
|
||||
8, // 13: account.v1.AccountService.SetName:output_type -> account.v1.SetNameResponse
|
||||
10, // 14: account.v1.AccountService.GetAvatarUploadURL:output_type -> account.v1.GetAvatarUploadURLResponse
|
||||
12, // 15: account.v1.AccountService.SetAvatar:output_type -> account.v1.SetAvatarResponse
|
||||
14, // 16: account.v1.AccountService.GetUserInfo:output_type -> account.v1.GetUserInfoResponse
|
||||
10, // [10:17] is the sub-list for method output_type
|
||||
3, // [3:10] is the sub-list for method input_type
|
||||
13, // 9: account.v1.AccountService.SetDescription:input_type -> account.v1.SetDescriptionRequest
|
||||
15, // 10: account.v1.AccountService.GetUserInfo:input_type -> account.v1.GetUserInfoRequest
|
||||
2, // 11: account.v1.AccountService.SendCredential:output_type -> account.v1.SendCredentialResponse
|
||||
4, // 12: account.v1.AccountService.Auth:output_type -> account.v1.AuthResponse
|
||||
6, // 13: account.v1.AccountService.SetPassword:output_type -> account.v1.SetPasswordResponse
|
||||
8, // 14: account.v1.AccountService.SetName:output_type -> account.v1.SetNameResponse
|
||||
10, // 15: account.v1.AccountService.GetAvatarUploadURL:output_type -> account.v1.GetAvatarUploadURLResponse
|
||||
12, // 16: account.v1.AccountService.SetAvatar:output_type -> account.v1.SetAvatarResponse
|
||||
14, // 17: account.v1.AccountService.SetDescription:output_type -> account.v1.SetDescriptionResponse
|
||||
16, // 18: account.v1.AccountService.GetUserInfo:output_type -> account.v1.GetUserInfoResponse
|
||||
11, // [11:19] is the sub-list for method output_type
|
||||
3, // [3:11] 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
|
||||
@@ -867,7 +973,7 @@ func file_account_v1_account_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_account_v1_account_proto_rawDesc), len(file_account_v1_account_proto_rawDesc)),
|
||||
NumEnums: 1,
|
||||
NumMessages: 14,
|
||||
NumMessages: 16,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
@@ -49,6 +49,9 @@ const (
|
||||
// AccountServiceSetAvatarProcedure is the fully-qualified name of the AccountService's SetAvatar
|
||||
// RPC.
|
||||
AccountServiceSetAvatarProcedure = "/account.v1.AccountService/SetAvatar"
|
||||
// AccountServiceSetDescriptionProcedure is the fully-qualified name of the AccountService's
|
||||
// SetDescription RPC.
|
||||
AccountServiceSetDescriptionProcedure = "/account.v1.AccountService/SetDescription"
|
||||
// AccountServiceGetUserInfoProcedure is the fully-qualified name of the AccountService's
|
||||
// GetUserInfo RPC.
|
||||
AccountServiceGetUserInfoProcedure = "/account.v1.AccountService/GetUserInfo"
|
||||
@@ -62,6 +65,7 @@ type AccountServiceClient interface {
|
||||
SetName(context.Context, *connect.Request[v1.SetNameRequest]) (*connect.Response[v1.SetNameResponse], error)
|
||||
GetAvatarUploadURL(context.Context, *connect.Request[v1.GetAvatarUploadURLRequest]) (*connect.Response[v1.GetAvatarUploadURLResponse], error)
|
||||
SetAvatar(context.Context, *connect.Request[v1.SetAvatarRequest]) (*connect.Response[v1.SetAvatarResponse], error)
|
||||
SetDescription(context.Context, *connect.Request[v1.SetDescriptionRequest]) (*connect.Response[v1.SetDescriptionResponse], error)
|
||||
GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error)
|
||||
}
|
||||
|
||||
@@ -112,6 +116,12 @@ func NewAccountServiceClient(httpClient connect.HTTPClient, baseURL string, opts
|
||||
connect.WithSchema(accountServiceMethods.ByName("SetAvatar")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
setDescription: connect.NewClient[v1.SetDescriptionRequest, v1.SetDescriptionResponse](
|
||||
httpClient,
|
||||
baseURL+AccountServiceSetDescriptionProcedure,
|
||||
connect.WithSchema(accountServiceMethods.ByName("SetDescription")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
getUserInfo: connect.NewClient[v1.GetUserInfoRequest, v1.GetUserInfoResponse](
|
||||
httpClient,
|
||||
baseURL+AccountServiceGetUserInfoProcedure,
|
||||
@@ -129,6 +139,7 @@ type accountServiceClient struct {
|
||||
setName *connect.Client[v1.SetNameRequest, v1.SetNameResponse]
|
||||
getAvatarUploadURL *connect.Client[v1.GetAvatarUploadURLRequest, v1.GetAvatarUploadURLResponse]
|
||||
setAvatar *connect.Client[v1.SetAvatarRequest, v1.SetAvatarResponse]
|
||||
setDescription *connect.Client[v1.SetDescriptionRequest, v1.SetDescriptionResponse]
|
||||
getUserInfo *connect.Client[v1.GetUserInfoRequest, v1.GetUserInfoResponse]
|
||||
}
|
||||
|
||||
@@ -162,6 +173,11 @@ func (c *accountServiceClient) SetAvatar(ctx context.Context, req *connect.Reque
|
||||
return c.setAvatar.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// SetDescription calls account.v1.AccountService.SetDescription.
|
||||
func (c *accountServiceClient) SetDescription(ctx context.Context, req *connect.Request[v1.SetDescriptionRequest]) (*connect.Response[v1.SetDescriptionResponse], error) {
|
||||
return c.setDescription.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// GetUserInfo calls account.v1.AccountService.GetUserInfo.
|
||||
func (c *accountServiceClient) GetUserInfo(ctx context.Context, req *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) {
|
||||
return c.getUserInfo.CallUnary(ctx, req)
|
||||
@@ -175,6 +191,7 @@ type AccountServiceHandler interface {
|
||||
SetName(context.Context, *connect.Request[v1.SetNameRequest]) (*connect.Response[v1.SetNameResponse], error)
|
||||
GetAvatarUploadURL(context.Context, *connect.Request[v1.GetAvatarUploadURLRequest]) (*connect.Response[v1.GetAvatarUploadURLResponse], error)
|
||||
SetAvatar(context.Context, *connect.Request[v1.SetAvatarRequest]) (*connect.Response[v1.SetAvatarResponse], error)
|
||||
SetDescription(context.Context, *connect.Request[v1.SetDescriptionRequest]) (*connect.Response[v1.SetDescriptionResponse], error)
|
||||
GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error)
|
||||
}
|
||||
|
||||
@@ -221,6 +238,12 @@ func NewAccountServiceHandler(svc AccountServiceHandler, opts ...connect.Handler
|
||||
connect.WithSchema(accountServiceMethods.ByName("SetAvatar")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
accountServiceSetDescriptionHandler := connect.NewUnaryHandler(
|
||||
AccountServiceSetDescriptionProcedure,
|
||||
svc.SetDescription,
|
||||
connect.WithSchema(accountServiceMethods.ByName("SetDescription")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
accountServiceGetUserInfoHandler := connect.NewUnaryHandler(
|
||||
AccountServiceGetUserInfoProcedure,
|
||||
svc.GetUserInfo,
|
||||
@@ -241,6 +264,8 @@ func NewAccountServiceHandler(svc AccountServiceHandler, opts ...connect.Handler
|
||||
accountServiceGetAvatarUploadURLHandler.ServeHTTP(w, r)
|
||||
case AccountServiceSetAvatarProcedure:
|
||||
accountServiceSetAvatarHandler.ServeHTTP(w, r)
|
||||
case AccountServiceSetDescriptionProcedure:
|
||||
accountServiceSetDescriptionHandler.ServeHTTP(w, r)
|
||||
case AccountServiceGetUserInfoProcedure:
|
||||
accountServiceGetUserInfoHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
@@ -276,6 +301,10 @@ func (UnimplementedAccountServiceHandler) SetAvatar(context.Context, *connect.Re
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("account.v1.AccountService.SetAvatar is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedAccountServiceHandler) SetDescription(context.Context, *connect.Request[v1.SetDescriptionRequest]) (*connect.Response[v1.SetDescriptionResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("account.v1.AccountService.SetDescription is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedAccountServiceHandler) GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("account.v1.AccountService.GetUserInfo is not implemented"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user