From c676c470954b6138e924bc1d7558265e3b7601cb Mon Sep 17 00:00:00 2001 From: devops-bot Date: Sun, 10 May 2026 16:42:58 +0000 Subject: [PATCH] Update protobuf definitions: d88ceea9 By allanger Commit link: https://gitea.badhouseplants.net/softplayer/softplayer-proto/commit/d88ceea9ea73f3009f96c06bf05a26e27c283627 Pipeline link: https://ci.badhouseplants.net/repos/34/pipeline/62 --- pkg/accounts/v1/accounts_v1.pb.go | 34 ++-- pkg/accounts/v1/accounts_v1_grpc.pb.go | 254 +++++++++---------------- pkg/options/v1/options_v1.pb.go | 147 ++++++++++++++ 3 files changed, 256 insertions(+), 179 deletions(-) create mode 100644 pkg/options/v1/options_v1.pb.go diff --git a/pkg/accounts/v1/accounts_v1.pb.go b/pkg/accounts/v1/accounts_v1.pb.go index 921357c..2457456 100644 --- a/pkg/accounts/v1/accounts_v1.pb.go +++ b/pkg/accounts/v1/accounts_v1.pb.go @@ -9,6 +9,7 @@ package v1 import ( + _ "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/options/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" @@ -464,7 +465,7 @@ var File_accounts_v1_accounts_v1_proto protoreflect.FileDescriptor const file_accounts_v1_accounts_v1_proto_rawDesc = "" + "\n" + - "\x1daccounts/v1/accounts_v1.proto\x12\vaccounts.v1\x1a\x1bgoogle/protobuf/empty.proto\"-\n" + + "\x1daccounts/v1/accounts_v1.proto\x12\vaccounts.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1boptions/v1/options_v1.proto\"-\n" + "\x0fAccountPassword\x12\x1a\n" + "\bpassword\x18\x01 \x01(\tR\bpassword\"7\n" + "\vAccountData\x12\x12\n" + @@ -488,13 +489,12 @@ const file_accounts_v1_accounts_v1_proto_rawDesc = "" + "\bverified\x18\x01 \x01(\bR\bverified\"4\n" + "\x13RefreshTokenRequest\x12\x1d\n" + "\n" + - "session_id\x18\x01 \x01(\tR\tsessionId2\x97\x01\n" + - "\x15AccountsNoAuthService\x12>\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" + "session_id\x18\x01 \x01(\tR\tsessionId2\xca\x02\n" + + "\x18AccountManagementService\x12D\n" + + "\x06SignIn\x12\x1a.accounts.v1.SignInRequest\x1a\x16.google.protobuf.Empty\"\x06\x8a\xb5\x18\x02\b\x01\x12D\n" + + "\x06SignUp\x12\x1a.accounts.v1.SignUpRequest\x1a\x16.google.protobuf.Empty\"\x06\x8a\xb5\x18\x02\b\x01\x12^\n" + + "\x0fIsEmailVerified\x12#.accounts.v1.IsEmailVerifiedRequest\x1a$.accounts.v1.IsEmailVerifiedResponse\"\x00\x12B\n" + + "\x0eRefreshSession\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x00BIZGgitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/accounts/v1b\x06proto3" var ( file_accounts_v1_accounts_v1_proto_rawDescOnce sync.Once @@ -526,14 +526,14 @@ var file_accounts_v1_accounts_v1_proto_depIdxs = []int32{ 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 - 9, // 7: accounts.v1.AccountsAuthService.RefreshToken:input_type -> google.protobuf.Empty - 9, // 8: accounts.v1.AccountsNoAuthService.SignIn:output_type -> google.protobuf.Empty - 9, // 9: accounts.v1.AccountsNoAuthService.SignUp:output_type -> google.protobuf.Empty - 7, // 10: accounts.v1.AccountsAuthService.IsEmailVerified:output_type -> accounts.v1.IsEmailVerifiedResponse - 9, // 11: accounts.v1.AccountsAuthService.RefreshToken:output_type -> google.protobuf.Empty + 3, // 4: accounts.v1.AccountManagementService.SignIn:input_type -> accounts.v1.SignInRequest + 2, // 5: accounts.v1.AccountManagementService.SignUp:input_type -> accounts.v1.SignUpRequest + 6, // 6: accounts.v1.AccountManagementService.IsEmailVerified:input_type -> accounts.v1.IsEmailVerifiedRequest + 9, // 7: accounts.v1.AccountManagementService.RefreshSession:input_type -> google.protobuf.Empty + 9, // 8: accounts.v1.AccountManagementService.SignIn:output_type -> google.protobuf.Empty + 9, // 9: accounts.v1.AccountManagementService.SignUp:output_type -> google.protobuf.Empty + 7, // 10: accounts.v1.AccountManagementService.IsEmailVerified:output_type -> accounts.v1.IsEmailVerifiedResponse + 9, // 11: accounts.v1.AccountManagementService.RefreshSession:output_type -> google.protobuf.Empty 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 @@ -554,7 +554,7 @@ func file_accounts_v1_accounts_v1_proto_init() { NumEnums: 0, NumMessages: 9, NumExtensions: 0, - NumServices: 2, + NumServices: 1, }, GoTypes: file_accounts_v1_accounts_v1_proto_goTypes, DependencyIndexes: file_accounts_v1_accounts_v1_proto_depIdxs, diff --git a/pkg/accounts/v1/accounts_v1_grpc.pb.go b/pkg/accounts/v1/accounts_v1_grpc.pb.go index 9fe5e0e..7c6ca82 100644 --- a/pkg/accounts/v1/accounts_v1_grpc.pb.go +++ b/pkg/accounts/v1/accounts_v1_grpc.pb.go @@ -22,295 +22,225 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - AccountsNoAuthService_SignIn_FullMethodName = "/accounts.v1.AccountsNoAuthService/SignIn" - AccountsNoAuthService_SignUp_FullMethodName = "/accounts.v1.AccountsNoAuthService/SignUp" + AccountManagementService_SignIn_FullMethodName = "/accounts.v1.AccountManagementService/SignIn" + AccountManagementService_SignUp_FullMethodName = "/accounts.v1.AccountManagementService/SignUp" + AccountManagementService_IsEmailVerified_FullMethodName = "/accounts.v1.AccountManagementService/IsEmailVerified" + AccountManagementService_RefreshSession_FullMethodName = "/accounts.v1.AccountManagementService/RefreshSession" ) -// AccountsNoAuthServiceClient is the client API for AccountsNoAuthService service. +// AccountManagementServiceClient is the client API for AccountManagementService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // // * // Service for handling accounts that do not require authentication -type AccountsNoAuthServiceClient interface { +type AccountManagementServiceClient 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) + // Is email for the current account verified + IsEmailVerified(ctx context.Context, in *IsEmailVerifiedRequest, opts ...grpc.CallOption) (*IsEmailVerifiedResponse, error) + RefreshSession(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) } -type accountsNoAuthServiceClient struct { +type accountManagementServiceClient struct { cc grpc.ClientConnInterface } -func NewAccountsNoAuthServiceClient(cc grpc.ClientConnInterface) AccountsNoAuthServiceClient { - return &accountsNoAuthServiceClient{cc} +func NewAccountManagementServiceClient(cc grpc.ClientConnInterface) AccountManagementServiceClient { + return &accountManagementServiceClient{cc} } -func (c *accountsNoAuthServiceClient) SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *accountManagementServiceClient) SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, AccountsNoAuthService_SignIn_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, AccountManagementService_SignIn_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *accountsNoAuthServiceClient) SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *accountManagementServiceClient) 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...) + err := c.cc.Invoke(ctx, AccountManagementService_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 +func (c *accountManagementServiceClient) IsEmailVerified(ctx context.Context, in *IsEmailVerifiedRequest, opts ...grpc.CallOption) (*IsEmailVerifiedResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(IsEmailVerifiedResponse) + err := c.cc.Invoke(ctx, AccountManagementService_IsEmailVerified_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountManagementServiceClient) RefreshSession(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, AccountManagementService_RefreshSession_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AccountManagementServiceServer is the server API for AccountManagementService service. +// All implementations should embed UnimplementedAccountManagementServiceServer // for forward compatibility. // // * // Service for handling accounts that do not require authentication -type AccountsNoAuthServiceServer interface { +type AccountManagementServiceServer 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) + // Is email for the current account verified + IsEmailVerified(context.Context, *IsEmailVerifiedRequest) (*IsEmailVerifiedResponse, error) + RefreshSession(context.Context, *emptypb.Empty) (*emptypb.Empty, error) } -// UnimplementedAccountsNoAuthServiceServer should be embedded to have +// UnimplementedAccountManagementServiceServer should be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. -type UnimplementedAccountsNoAuthServiceServer struct{} +type UnimplementedAccountManagementServiceServer struct{} -func (UnimplementedAccountsNoAuthServiceServer) SignIn(context.Context, *SignInRequest) (*emptypb.Empty, error) { +func (UnimplementedAccountManagementServiceServer) 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) { +func (UnimplementedAccountManagementServiceServer) SignUp(context.Context, *SignUpRequest) (*emptypb.Empty, error) { return nil, status.Error(codes.Unimplemented, "method SignUp not implemented") } -func (UnimplementedAccountsNoAuthServiceServer) testEmbeddedByValue() {} +func (UnimplementedAccountManagementServiceServer) IsEmailVerified(context.Context, *IsEmailVerifiedRequest) (*IsEmailVerifiedResponse, error) { + return nil, status.Error(codes.Unimplemented, "method IsEmailVerified not implemented") +} +func (UnimplementedAccountManagementServiceServer) RefreshSession(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method RefreshSession not implemented") +} +func (UnimplementedAccountManagementServiceServer) testEmbeddedByValue() {} -// UnsafeAccountsNoAuthServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to AccountsNoAuthServiceServer will +// UnsafeAccountManagementServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AccountManagementServiceServer will // result in compilation errors. -type UnsafeAccountsNoAuthServiceServer interface { - mustEmbedUnimplementedAccountsNoAuthServiceServer() +type UnsafeAccountManagementServiceServer interface { + mustEmbedUnimplementedAccountManagementServiceServer() } -func RegisterAccountsNoAuthServiceServer(s grpc.ServiceRegistrar, srv AccountsNoAuthServiceServer) { - // If the following call panics, it indicates UnimplementedAccountsNoAuthServiceServer was +func RegisterAccountManagementServiceServer(s grpc.ServiceRegistrar, srv AccountManagementServiceServer) { + // If the following call panics, it indicates UnimplementedAccountManagementServiceServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } - s.RegisterService(&AccountsNoAuthService_ServiceDesc, srv) + s.RegisterService(&AccountManagementService_ServiceDesc, srv) } -func _AccountsNoAuthService_SignIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AccountManagementService_SignIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SignInRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AccountsNoAuthServiceServer).SignIn(ctx, in) + return srv.(AccountManagementServiceServer).SignIn(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AccountsNoAuthService_SignIn_FullMethodName, + FullMethod: AccountManagementService_SignIn_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsNoAuthServiceServer).SignIn(ctx, req.(*SignInRequest)) + return srv.(AccountManagementServiceServer).SignIn(ctx, req.(*SignInRequest)) } return interceptor(ctx, in, info, handler) } -func _AccountsNoAuthService_SignUp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AccountManagementService_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) + return srv.(AccountManagementServiceServer).SignUp(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AccountsNoAuthService_SignUp_FullMethodName, + FullMethod: AccountManagementService_SignUp_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsNoAuthServiceServer).SignUp(ctx, req.(*SignUpRequest)) + return srv.(AccountManagementServiceServer).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) -var AccountsNoAuthService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "accounts.v1.AccountsNoAuthService", - HandlerType: (*AccountsNoAuthServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SignIn", - Handler: _AccountsNoAuthService_SignIn_Handler, - }, - { - MethodName: "SignUp", - Handler: _AccountsNoAuthService_SignUp_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "accounts/v1/accounts_v1.proto", -} - -const ( - AccountsAuthService_IsEmailVerified_FullMethodName = "/accounts.v1.AccountsAuthService/IsEmailVerified" - AccountsAuthService_RefreshToken_FullMethodName = "/accounts.v1.AccountsAuthService/RefreshToken" -) - -// AccountsAuthServiceClient is the client API for AccountsAuthService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// * -// Service for handling accounts that do require authentication -// Tokens should be sent via metadata, so the service is able to authenticate a user for a request -type AccountsAuthServiceClient interface { - // Is email for the current account verified - IsEmailVerified(ctx context.Context, in *IsEmailVerifiedRequest, opts ...grpc.CallOption) (*IsEmailVerifiedResponse, error) - RefreshToken(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type accountsAuthServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewAccountsAuthServiceClient(cc grpc.ClientConnInterface) AccountsAuthServiceClient { - return &accountsAuthServiceClient{cc} -} - -func (c *accountsAuthServiceClient) IsEmailVerified(ctx context.Context, in *IsEmailVerifiedRequest, opts ...grpc.CallOption) (*IsEmailVerifiedResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(IsEmailVerifiedResponse) - err := c.cc.Invoke(ctx, AccountsAuthService_IsEmailVerified_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsAuthServiceClient) RefreshToken(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, AccountsAuthService_RefreshToken_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AccountsAuthServiceServer is the server API for AccountsAuthService service. -// All implementations should embed UnimplementedAccountsAuthServiceServer -// for forward compatibility. -// -// * -// Service for handling accounts that do require authentication -// Tokens should be sent via metadata, so the service is able to authenticate a user for a request -type AccountsAuthServiceServer interface { - // Is email for the current account verified - IsEmailVerified(context.Context, *IsEmailVerifiedRequest) (*IsEmailVerifiedResponse, error) - RefreshToken(context.Context, *emptypb.Empty) (*emptypb.Empty, error) -} - -// UnimplementedAccountsAuthServiceServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedAccountsAuthServiceServer struct{} - -func (UnimplementedAccountsAuthServiceServer) IsEmailVerified(context.Context, *IsEmailVerifiedRequest) (*IsEmailVerifiedResponse, error) { - return nil, status.Error(codes.Unimplemented, "method IsEmailVerified not implemented") -} -func (UnimplementedAccountsAuthServiceServer) RefreshToken(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { - return nil, status.Error(codes.Unimplemented, "method RefreshToken not implemented") -} -func (UnimplementedAccountsAuthServiceServer) testEmbeddedByValue() {} - -// UnsafeAccountsAuthServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to AccountsAuthServiceServer will -// result in compilation errors. -type UnsafeAccountsAuthServiceServer interface { - mustEmbedUnimplementedAccountsAuthServiceServer() -} - -func RegisterAccountsAuthServiceServer(s grpc.ServiceRegistrar, srv AccountsAuthServiceServer) { - // If the following call panics, it indicates UnimplementedAccountsAuthServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&AccountsAuthService_ServiceDesc, srv) -} - -func _AccountsAuthService_IsEmailVerified_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AccountManagementService_IsEmailVerified_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(IsEmailVerifiedRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AccountsAuthServiceServer).IsEmailVerified(ctx, in) + return srv.(AccountManagementServiceServer).IsEmailVerified(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AccountsAuthService_IsEmailVerified_FullMethodName, + FullMethod: AccountManagementService_IsEmailVerified_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsAuthServiceServer).IsEmailVerified(ctx, req.(*IsEmailVerifiedRequest)) + return srv.(AccountManagementServiceServer).IsEmailVerified(ctx, req.(*IsEmailVerifiedRequest)) } return interceptor(ctx, in, info, handler) } -func _AccountsAuthService_RefreshToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AccountManagementService_RefreshSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(emptypb.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AccountsAuthServiceServer).RefreshToken(ctx, in) + return srv.(AccountManagementServiceServer).RefreshSession(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AccountsAuthService_RefreshToken_FullMethodName, + FullMethod: AccountManagementService_RefreshSession_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsAuthServiceServer).RefreshToken(ctx, req.(*emptypb.Empty)) + return srv.(AccountManagementServiceServer).RefreshSession(ctx, req.(*emptypb.Empty)) } return interceptor(ctx, in, info, handler) } -// AccountsAuthService_ServiceDesc is the grpc.ServiceDesc for AccountsAuthService service. +// AccountManagementService_ServiceDesc is the grpc.ServiceDesc for AccountManagementService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var AccountsAuthService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "accounts.v1.AccountsAuthService", - HandlerType: (*AccountsAuthServiceServer)(nil), +var AccountManagementService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "accounts.v1.AccountManagementService", + HandlerType: (*AccountManagementServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "IsEmailVerified", - Handler: _AccountsAuthService_IsEmailVerified_Handler, + MethodName: "SignIn", + Handler: _AccountManagementService_SignIn_Handler, }, { - MethodName: "RefreshToken", - Handler: _AccountsAuthService_RefreshToken_Handler, + MethodName: "SignUp", + Handler: _AccountManagementService_SignUp_Handler, + }, + { + MethodName: "IsEmailVerified", + Handler: _AccountManagementService_IsEmailVerified_Handler, + }, + { + MethodName: "RefreshSession", + Handler: _AccountManagementService_RefreshSession_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/pkg/options/v1/options_v1.pb.go b/pkg/options/v1/options_v1.pb.go new file mode 100644 index 0000000..4f0cf03 --- /dev/null +++ b/pkg/options/v1/options_v1.pb.go @@ -0,0 +1,147 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: options/v1/options_v1.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AuthOptions struct { + state protoimpl.MessageState `protogen:"open.v1"` + // When set to false, the auth interceptor will be skiped on the backend + Auth bool `protobuf:"varint,1,opt,name=auth,proto3" json:"auth,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AuthOptions) Reset() { + *x = AuthOptions{} + mi := &file_options_v1_options_v1_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuthOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthOptions) ProtoMessage() {} + +func (x *AuthOptions) ProtoReflect() protoreflect.Message { + mi := &file_options_v1_options_v1_proto_msgTypes[0] + 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 AuthOptions.ProtoReflect.Descriptor instead. +func (*AuthOptions) Descriptor() ([]byte, []int) { + return file_options_v1_options_v1_proto_rawDescGZIP(), []int{0} +} + +func (x *AuthOptions) GetAuth() bool { + if x != nil { + return x.Auth + } + return false +} + +var file_options_v1_options_v1_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*AuthOptions)(nil), + Field: 50001, + Name: "options.v1.auth_options", + Tag: "bytes,50001,opt,name=auth_options", + Filename: "options/v1/options_v1.proto", + }, +} + +// Extension fields to descriptorpb.MethodOptions. +var ( + // optional options.v1.AuthOptions auth_options = 50001; + E_AuthOptions = &file_options_v1_options_v1_proto_extTypes[0] +) + +var File_options_v1_options_v1_proto protoreflect.FileDescriptor + +const file_options_v1_options_v1_proto_rawDesc = "" + + "\n" + + "\x1boptions/v1/options_v1.proto\x12\n" + + "options.v1\x1a google/protobuf/descriptor.proto\"!\n" + + "\vAuthOptions\x12\x12\n" + + "\x04auth\x18\x01 \x01(\bR\x04auth:\\\n" + + "\fauth_options\x12\x1e.google.protobuf.MethodOptions\x18ц\x03 \x01(\v2\x17.options.v1.AuthOptionsR\vauthOptionsBHZFgitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/options/v1b\x06proto3" + +var ( + file_options_v1_options_v1_proto_rawDescOnce sync.Once + file_options_v1_options_v1_proto_rawDescData []byte +) + +func file_options_v1_options_v1_proto_rawDescGZIP() []byte { + file_options_v1_options_v1_proto_rawDescOnce.Do(func() { + file_options_v1_options_v1_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_options_v1_options_v1_proto_rawDesc), len(file_options_v1_options_v1_proto_rawDesc))) + }) + return file_options_v1_options_v1_proto_rawDescData +} + +var file_options_v1_options_v1_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_options_v1_options_v1_proto_goTypes = []any{ + (*AuthOptions)(nil), // 0: options.v1.AuthOptions + (*descriptorpb.MethodOptions)(nil), // 1: google.protobuf.MethodOptions +} +var file_options_v1_options_v1_proto_depIdxs = []int32{ + 1, // 0: options.v1.auth_options:extendee -> google.protobuf.MethodOptions + 0, // 1: options.v1.auth_options:type_name -> options.v1.AuthOptions + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 1, // [1:2] is the sub-list for extension type_name + 0, // [0:1] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_options_v1_options_v1_proto_init() } +func file_options_v1_options_v1_proto_init() { + if File_options_v1_options_v1_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_options_v1_options_v1_proto_rawDesc), len(file_options_v1_options_v1_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 1, + NumServices: 0, + }, + GoTypes: file_options_v1_options_v1_proto_goTypes, + DependencyIndexes: file_options_v1_options_v1_proto_depIdxs, + MessageInfos: file_options_v1_options_v1_proto_msgTypes, + ExtensionInfos: file_options_v1_options_v1_proto_extTypes, + }.Build() + File_options_v1_options_v1_proto = out.File + file_options_v1_options_v1_proto_goTypes = nil + file_options_v1_options_v1_proto_depIdxs = nil +}