Update protobuf definitions: cfbe2271
By allanger
Commit link: cfbe2271fe
Pipeline link: https://ci.badhouseplants.net/repos/34/pipeline/55
This commit is contained in:
@@ -416,6 +416,50 @@ func (x *IsEmailVerifiedResponse) GetVerified() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
type RefreshTokenRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *RefreshTokenRequest) Reset() {
|
||||
*x = RefreshTokenRequest{}
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RefreshTokenRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RefreshTokenRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_accounts_v1_accounts_v1_proto_msgTypes[8]
|
||||
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 RefreshTokenRequest.ProtoReflect.Descriptor instead.
|
||||
func (*RefreshTokenRequest) Descriptor() ([]byte, []int) {
|
||||
return file_accounts_v1_accounts_v1_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *RefreshTokenRequest) GetSessionId() string {
|
||||
if x != nil {
|
||||
return x.SessionId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_accounts_v1_accounts_v1_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_accounts_v1_accounts_v1_proto_rawDesc = "" +
|
||||
@@ -441,13 +485,16 @@ 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\bverified2\x97\x01\n" +
|
||||
"\bverified\x18\x01 \x01(\bR\bverified\"4\n" +
|
||||
"\x13RefreshTokenRequest\x12\x1d\n" +
|
||||
"\n" +
|
||||
"session_id\x18\x01 \x01(\tR\tsessionId2\xe3\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" +
|
||||
"\x06SignUp\x12\x1a.accounts.v1.SignUpRequest\x1a\x16.google.protobuf.Empty\"\x00\x12J\n" +
|
||||
"\fRefreshToken\x12 .accounts.v1.RefreshTokenRequest\x1a\x16.google.protobuf.Empty\"\x002u\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"
|
||||
"\x0fIsEmailVerified\x12#.accounts.v1.IsEmailVerifiedRequest\x1a$.accounts.v1.IsEmailVerifiedResponse\"\x00BIZGgitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/accounts/v1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_accounts_v1_accounts_v1_proto_rawDescOnce sync.Once
|
||||
@@ -461,7 +508,7 @@ func file_accounts_v1_accounts_v1_proto_rawDescGZIP() []byte {
|
||||
return file_accounts_v1_accounts_v1_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_accounts_v1_accounts_v1_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_accounts_v1_accounts_v1_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_accounts_v1_accounts_v1_proto_goTypes = []any{
|
||||
(*AccountPassword)(nil), // 0: accounts.v1.AccountPassword
|
||||
(*AccountData)(nil), // 1: accounts.v1.AccountData
|
||||
@@ -471,7 +518,8 @@ var file_accounts_v1_accounts_v1_proto_goTypes = []any{
|
||||
(*NewPasswordRequest)(nil), // 5: accounts.v1.NewPasswordRequest
|
||||
(*IsEmailVerifiedRequest)(nil), // 6: accounts.v1.IsEmailVerifiedRequest
|
||||
(*IsEmailVerifiedResponse)(nil), // 7: accounts.v1.IsEmailVerifiedResponse
|
||||
(*emptypb.Empty)(nil), // 8: google.protobuf.Empty
|
||||
(*RefreshTokenRequest)(nil), // 8: accounts.v1.RefreshTokenRequest
|
||||
(*emptypb.Empty)(nil), // 9: google.protobuf.Empty
|
||||
}
|
||||
var file_accounts_v1_accounts_v1_proto_depIdxs = []int32{
|
||||
1, // 0: accounts.v1.ResetPasswordRequest.data:type_name -> accounts.v1.AccountData
|
||||
@@ -480,12 +528,12 @@ var file_accounts_v1_accounts_v1_proto_depIdxs = []int32{
|
||||
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
|
||||
8, // 6: accounts.v1.AccountsNoAuthService.RefreshToken:input_type -> accounts.v1.RefreshTokenRequest
|
||||
6, // 7: accounts.v1.AccountsAuthService.IsEmailVerified:input_type -> accounts.v1.IsEmailVerifiedRequest
|
||||
9, // 8: accounts.v1.AccountsNoAuthService.SignIn:output_type -> google.protobuf.Empty
|
||||
9, // 9: accounts.v1.AccountsNoAuthService.SignUp:output_type -> google.protobuf.Empty
|
||||
9, // 10: accounts.v1.AccountsNoAuthService.RefreshToken:output_type -> google.protobuf.Empty
|
||||
7, // 11: accounts.v1.AccountsAuthService.IsEmailVerified:output_type -> accounts.v1.IsEmailVerifiedResponse
|
||||
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
|
||||
@@ -504,7 +552,7 @@ func file_accounts_v1_accounts_v1_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_accounts_v1_accounts_v1_proto_rawDesc), len(file_accounts_v1_accounts_v1_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 8,
|
||||
NumMessages: 9,
|
||||
NumExtensions: 0,
|
||||
NumServices: 2,
|
||||
},
|
||||
|
||||
@@ -22,8 +22,9 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
AccountsNoAuthService_SignIn_FullMethodName = "/accounts.v1.AccountsNoAuthService/SignIn"
|
||||
AccountsNoAuthService_SignUp_FullMethodName = "/accounts.v1.AccountsNoAuthService/SignUp"
|
||||
AccountsNoAuthService_SignIn_FullMethodName = "/accounts.v1.AccountsNoAuthService/SignIn"
|
||||
AccountsNoAuthService_SignUp_FullMethodName = "/accounts.v1.AccountsNoAuthService/SignUp"
|
||||
AccountsNoAuthService_RefreshToken_FullMethodName = "/accounts.v1.AccountsNoAuthService/RefreshToken"
|
||||
)
|
||||
|
||||
// AccountsNoAuthServiceClient is the client API for AccountsNoAuthService service.
|
||||
@@ -37,6 +38,8 @@ type AccountsNoAuthServiceClient interface {
|
||||
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)
|
||||
// RefreshToken doesn't use regular auth methods
|
||||
RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
type accountsNoAuthServiceClient struct {
|
||||
@@ -67,6 +70,16 @@ func (c *accountsNoAuthServiceClient) SignUp(ctx context.Context, in *SignUpRequ
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountsNoAuthServiceClient) RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, AccountsNoAuthService_RefreshToken_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.
|
||||
@@ -78,6 +91,8 @@ type AccountsNoAuthServiceServer interface {
|
||||
SignIn(context.Context, *SignInRequest) (*emptypb.Empty, error)
|
||||
// Create a new account
|
||||
SignUp(context.Context, *SignUpRequest) (*emptypb.Empty, error)
|
||||
// RefreshToken doesn't use regular auth methods
|
||||
RefreshToken(context.Context, *RefreshTokenRequest) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
// UnimplementedAccountsNoAuthServiceServer should be embedded to have
|
||||
@@ -93,6 +108,9 @@ func (UnimplementedAccountsNoAuthServiceServer) SignIn(context.Context, *SignInR
|
||||
func (UnimplementedAccountsNoAuthServiceServer) SignUp(context.Context, *SignUpRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SignUp not implemented")
|
||||
}
|
||||
func (UnimplementedAccountsNoAuthServiceServer) RefreshToken(context.Context, *RefreshTokenRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method RefreshToken not implemented")
|
||||
}
|
||||
func (UnimplementedAccountsNoAuthServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeAccountsNoAuthServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
@@ -149,6 +167,24 @@ func _AccountsNoAuthService_SignUp_Handler(srv interface{}, ctx context.Context,
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountsNoAuthService_RefreshToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RefreshTokenRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AccountsNoAuthServiceServer).RefreshToken(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AccountsNoAuthService_RefreshToken_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountsNoAuthServiceServer).RefreshToken(ctx, req.(*RefreshTokenRequest))
|
||||
}
|
||||
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)
|
||||
@@ -164,6 +200,10 @@ var AccountsNoAuthService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "SignUp",
|
||||
Handler: _AccountsNoAuthService_SignUp_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RefreshToken",
|
||||
Handler: _AccountsNoAuthService_RefreshToken_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "accounts/v1/accounts_v1.proto",
|
||||
@@ -171,7 +211,6 @@ var AccountsNoAuthService_ServiceDesc = grpc.ServiceDesc{
|
||||
|
||||
const (
|
||||
AccountsAuthService_IsEmailVerified_FullMethodName = "/accounts.v1.AccountsAuthService/IsEmailVerified"
|
||||
AccountsAuthService_RefreshToken_FullMethodName = "/accounts.v1.AccountsAuthService/RefreshToken"
|
||||
)
|
||||
|
||||
// AccountsAuthServiceClient is the client API for AccountsAuthService service.
|
||||
@@ -184,7 +223,6 @@ const (
|
||||
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 {
|
||||
@@ -205,16 +243,6 @@ func (c *accountsAuthServiceClient) IsEmailVerified(ctx context.Context, in *IsE
|
||||
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.
|
||||
@@ -225,7 +253,6 @@ func (c *accountsAuthServiceClient) RefreshToken(ctx context.Context, in *emptyp
|
||||
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
|
||||
@@ -238,9 +265,6 @@ 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.
|
||||
@@ -279,24 +303,6 @@ func _AccountsAuthService_IsEmailVerified_Handler(srv interface{}, ctx context.C
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AccountsAuthService_RefreshToken_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)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AccountsAuthService_RefreshToken_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountsAuthServiceServer).RefreshToken(ctx, req.(*emptypb.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// AccountsAuthService_ServiceDesc is the grpc.ServiceDesc for AccountsAuthService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -308,10 +314,6 @@ var AccountsAuthService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "IsEmailVerified",
|
||||
Handler: _AccountsAuthService_IsEmailVerified_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RefreshToken",
|
||||
Handler: _AccountsAuthService_RefreshToken_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "accounts/v1/accounts_v1.proto",
|
||||
|
||||
Reference in New Issue
Block a user