Update protobuf definitions: e1e2515c
By allanger
Commit link: e1e2515c97
Pipeline link: https://ci.badhouseplants.net/repos/34/pipeline/54
This commit is contained in:
@@ -122,8 +122,8 @@ func (x *AccountData) GetEmail() string {
|
||||
|
||||
type SignUpRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Data *AccountData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
||||
Password *AccountPassword `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
||||
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
|
||||
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -158,18 +158,18 @@ func (*SignUpRequest) Descriptor() ([]byte, []int) {
|
||||
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *SignUpRequest) GetData() *AccountData {
|
||||
func (x *SignUpRequest) GetEmail() string {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
return x.Email
|
||||
}
|
||||
return nil
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SignUpRequest) GetPassword() *AccountPassword {
|
||||
func (x *SignUpRequest) GetPassword() string {
|
||||
if x != nil {
|
||||
return x.Password
|
||||
}
|
||||
return nil
|
||||
return ""
|
||||
}
|
||||
|
||||
type SignInRequest struct {
|
||||
@@ -425,10 +425,10 @@ const file_accounts_v1_accounts_v1_proto_rawDesc = "" +
|
||||
"\bpassword\x18\x01 \x01(\tR\bpassword\"7\n" +
|
||||
"\vAccountData\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" +
|
||||
"\x05email\x18\x02 \x01(\tR\x05email\"w\n" +
|
||||
"\rSignUpRequest\x12,\n" +
|
||||
"\x04data\x18\x01 \x01(\v2\x18.accounts.v1.AccountDataR\x04data\x128\n" +
|
||||
"\bpassword\x18\x02 \x01(\v2\x1c.accounts.v1.AccountPasswordR\bpassword\"?\n" +
|
||||
"\x05email\x18\x02 \x01(\tR\x05email\"A\n" +
|
||||
"\rSignUpRequest\x12\x14\n" +
|
||||
"\x05email\x18\x01 \x01(\tR\x05email\x12\x1a\n" +
|
||||
"\bpassword\x18\x02 \x01(\tR\bpassword\"?\n" +
|
||||
"\rSignInRequest\x12\x12\n" +
|
||||
"\x04code\x18\x01 \x01(\tR\x04code\x12\x1a\n" +
|
||||
"\bverifier\x18\x02 \x01(\tR\bverifier\"D\n" +
|
||||
@@ -441,9 +441,10 @@ const file_accounts_v1_accounts_v1_proto_rawDesc = "" +
|
||||
"\x16IsEmailVerifiedRequest\x12,\n" +
|
||||
"\x04data\x18\x01 \x01(\v2\x18.accounts.v1.AccountDataR\x04data\"5\n" +
|
||||
"\x17IsEmailVerifiedResponse\x12\x1a\n" +
|
||||
"\bverified\x18\x01 \x01(\bR\bverified2W\n" +
|
||||
"\bverified\x18\x01 \x01(\bR\bverified2\x97\x01\n" +
|
||||
"\x15AccountsNoAuthService\x12>\n" +
|
||||
"\x06SignIn\x12\x1a.accounts.v1.SignInRequest\x1a\x16.google.protobuf.Empty\"\x002\xb7\x01\n" +
|
||||
"\x06SignIn\x12\x1a.accounts.v1.SignInRequest\x1a\x16.google.protobuf.Empty\"\x00\x12>\n" +
|
||||
"\x06SignUp\x12\x1a.accounts.v1.SignUpRequest\x1a\x16.google.protobuf.Empty\"\x002\xb7\x01\n" +
|
||||
"\x13AccountsAuthService\x12^\n" +
|
||||
"\x0fIsEmailVerified\x12#.accounts.v1.IsEmailVerifiedRequest\x1a$.accounts.v1.IsEmailVerifiedResponse\"\x00\x12@\n" +
|
||||
"\fRefreshToken\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x00BIZGgitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/accounts/v1b\x06proto3"
|
||||
@@ -473,23 +474,23 @@ var file_accounts_v1_accounts_v1_proto_goTypes = []any{
|
||||
(*emptypb.Empty)(nil), // 8: google.protobuf.Empty
|
||||
}
|
||||
var file_accounts_v1_accounts_v1_proto_depIdxs = []int32{
|
||||
1, // 0: accounts.v1.SignUpRequest.data:type_name -> accounts.v1.AccountData
|
||||
0, // 1: accounts.v1.SignUpRequest.password:type_name -> accounts.v1.AccountPassword
|
||||
1, // 2: accounts.v1.ResetPasswordRequest.data:type_name -> accounts.v1.AccountData
|
||||
1, // 3: accounts.v1.NewPasswordRequest.data:type_name -> accounts.v1.AccountData
|
||||
0, // 4: accounts.v1.NewPasswordRequest.password:type_name -> accounts.v1.AccountPassword
|
||||
1, // 5: accounts.v1.IsEmailVerifiedRequest.data:type_name -> accounts.v1.AccountData
|
||||
3, // 6: accounts.v1.AccountsNoAuthService.SignIn:input_type -> accounts.v1.SignInRequest
|
||||
6, // 7: accounts.v1.AccountsAuthService.IsEmailVerified:input_type -> accounts.v1.IsEmailVerifiedRequest
|
||||
8, // 8: accounts.v1.AccountsAuthService.RefreshToken:input_type -> google.protobuf.Empty
|
||||
8, // 9: accounts.v1.AccountsNoAuthService.SignIn:output_type -> google.protobuf.Empty
|
||||
1, // 0: accounts.v1.ResetPasswordRequest.data:type_name -> accounts.v1.AccountData
|
||||
1, // 1: accounts.v1.NewPasswordRequest.data:type_name -> accounts.v1.AccountData
|
||||
0, // 2: accounts.v1.NewPasswordRequest.password:type_name -> accounts.v1.AccountPassword
|
||||
1, // 3: accounts.v1.IsEmailVerifiedRequest.data:type_name -> accounts.v1.AccountData
|
||||
3, // 4: accounts.v1.AccountsNoAuthService.SignIn:input_type -> accounts.v1.SignInRequest
|
||||
2, // 5: accounts.v1.AccountsNoAuthService.SignUp:input_type -> accounts.v1.SignUpRequest
|
||||
6, // 6: accounts.v1.AccountsAuthService.IsEmailVerified:input_type -> accounts.v1.IsEmailVerifiedRequest
|
||||
8, // 7: accounts.v1.AccountsAuthService.RefreshToken:input_type -> google.protobuf.Empty
|
||||
8, // 8: accounts.v1.AccountsNoAuthService.SignIn:output_type -> google.protobuf.Empty
|
||||
8, // 9: accounts.v1.AccountsNoAuthService.SignUp:output_type -> google.protobuf.Empty
|
||||
7, // 10: accounts.v1.AccountsAuthService.IsEmailVerified:output_type -> accounts.v1.IsEmailVerifiedResponse
|
||||
8, // 11: accounts.v1.AccountsAuthService.RefreshToken:output_type -> google.protobuf.Empty
|
||||
9, // [9:12] is the sub-list for method output_type
|
||||
6, // [6:9] 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
|
||||
8, // [8:12] is the sub-list for method output_type
|
||||
4, // [4:8] 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_accounts_v1_accounts_v1_proto_init() }
|
||||
|
||||
@@ -23,6 +23,7 @@ const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
AccountsNoAuthService_SignIn_FullMethodName = "/accounts.v1.AccountsNoAuthService/SignIn"
|
||||
AccountsNoAuthService_SignUp_FullMethodName = "/accounts.v1.AccountsNoAuthService/SignUp"
|
||||
)
|
||||
|
||||
// AccountsNoAuthServiceClient is the client API for AccountsNoAuthService service.
|
||||
@@ -34,6 +35,8 @@ const (
|
||||
type AccountsNoAuthServiceClient interface {
|
||||
// Sing in into an existing account
|
||||
SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// Create a new account
|
||||
SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
type accountsNoAuthServiceClient struct {
|
||||
@@ -54,6 +57,16 @@ func (c *accountsNoAuthServiceClient) SignIn(ctx context.Context, in *SignInRequ
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountsNoAuthServiceClient) SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, AccountsNoAuthService_SignUp_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AccountsNoAuthServiceServer is the server API for AccountsNoAuthService service.
|
||||
// All implementations should embed UnimplementedAccountsNoAuthServiceServer
|
||||
// for forward compatibility.
|
||||
@@ -63,6 +76,8 @@ func (c *accountsNoAuthServiceClient) SignIn(ctx context.Context, in *SignInRequ
|
||||
type AccountsNoAuthServiceServer interface {
|
||||
// Sing in into an existing account
|
||||
SignIn(context.Context, *SignInRequest) (*emptypb.Empty, error)
|
||||
// Create a new account
|
||||
SignUp(context.Context, *SignUpRequest) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
// UnimplementedAccountsNoAuthServiceServer should be embedded to have
|
||||
@@ -75,6 +90,9 @@ type UnimplementedAccountsNoAuthServiceServer struct{}
|
||||
func (UnimplementedAccountsNoAuthServiceServer) SignIn(context.Context, *SignInRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SignIn not implemented")
|
||||
}
|
||||
func (UnimplementedAccountsNoAuthServiceServer) SignUp(context.Context, *SignUpRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SignUp not implemented")
|
||||
}
|
||||
func (UnimplementedAccountsNoAuthServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAccountsNoAuthServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
@@ -113,6 +131,24 @@ func _AccountsNoAuthService_SignIn_Handler(srv interface{}, ctx context.Context,
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountsNoAuthService_SignUp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SignUpRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountsNoAuthServiceServer).SignUp(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AccountsNoAuthService_SignUp_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountsNoAuthServiceServer).SignUp(ctx, req.(*SignUpRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// AccountsNoAuthService_ServiceDesc is the grpc.ServiceDesc for AccountsNoAuthService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -124,6 +160,10 @@ var AccountsNoAuthService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "SignIn",
|
||||
Handler: _AccountsNoAuthService_SignIn_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SignUp",
|
||||
Handler: _AccountsNoAuthService_SignUp_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "accounts/v1/accounts_v1.proto",
|
||||
|
||||
Reference in New Issue
Block a user