diff --git a/pkg/accounts/accounts_v1.pb.go b/pkg/accounts/accounts_v1.pb.go index ec51d8e..076724e 100644 --- a/pkg/accounts/accounts_v1.pb.go +++ b/pkg/accounts/accounts_v1.pb.go @@ -283,18 +283,18 @@ func (x *AccountFull) GetData() *AccountData { return nil } -type AccountFullWithKubeConfig struct { +type AccountFullWithToken struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id *AccountId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Data *AccountData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Kubeconfig string `protobuf:"bytes,3,opt,name=kubeconfig,proto3" json:"kubeconfig,omitempty"` + Id *AccountId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Data *AccountData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Token string `protobuf:"bytes,3,opt,name=Token,proto3" json:"Token,omitempty"` } -func (x *AccountFullWithKubeConfig) Reset() { - *x = AccountFullWithKubeConfig{} +func (x *AccountFullWithToken) Reset() { + *x = AccountFullWithToken{} if protoimpl.UnsafeEnabled { mi := &file_accounts_accounts_v1_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -302,13 +302,13 @@ func (x *AccountFullWithKubeConfig) Reset() { } } -func (x *AccountFullWithKubeConfig) String() string { +func (x *AccountFullWithToken) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AccountFullWithKubeConfig) ProtoMessage() {} +func (*AccountFullWithToken) ProtoMessage() {} -func (x *AccountFullWithKubeConfig) ProtoReflect() protoreflect.Message { +func (x *AccountFullWithToken) ProtoReflect() protoreflect.Message { mi := &file_accounts_accounts_v1_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -320,28 +320,28 @@ func (x *AccountFullWithKubeConfig) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AccountFullWithKubeConfig.ProtoReflect.Descriptor instead. -func (*AccountFullWithKubeConfig) Descriptor() ([]byte, []int) { +// Deprecated: Use AccountFullWithToken.ProtoReflect.Descriptor instead. +func (*AccountFullWithToken) Descriptor() ([]byte, []int) { return file_accounts_accounts_v1_proto_rawDescGZIP(), []int{5} } -func (x *AccountFullWithKubeConfig) GetId() *AccountId { +func (x *AccountFullWithToken) GetId() *AccountId { if x != nil { return x.Id } return nil } -func (x *AccountFullWithKubeConfig) GetData() *AccountData { +func (x *AccountFullWithToken) GetData() *AccountData { if x != nil { return x.Data } return nil } -func (x *AccountFullWithKubeConfig) GetKubeconfig() string { +func (x *AccountFullWithToken) GetToken() string { if x != nil { - return x.Kubeconfig + return x.Token } return "" } @@ -374,31 +374,30 @@ var file_accounts_accounts_v1_proto_rawDesc = []byte{ 0x74, 0x49, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0x8b, 0x01, 0x0a, 0x19, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x75, - 0x6c, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x4b, 0x75, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x23, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x1e, 0x0a, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x32, 0xaa, 0x01, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x4e, 0x0a, + 0x74, 0x61, 0x22, 0x7c, 0x0a, 0x14, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x75, 0x6c, + 0x6c, 0x57, 0x69, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x32, 0xa0, 0x01, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x49, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x55, 0x70, 0x12, 0x1d, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x50, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x1e, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x57, 0x69, 0x74, - 0x68, 0x4b, 0x75, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x00, 0x12, 0x4e, 0x0a, - 0x06, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x12, 0x1d, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x50, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x23, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x57, 0x69, 0x74, - 0x68, 0x4b, 0x75, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x00, 0x42, 0x44, 0x5a, - 0x42, 0x67, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x64, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x70, 0x6c, 0x61, - 0x6e, 0x74, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x2f, 0x73, 0x6f, 0x66, 0x74, 0x70, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x2f, 0x73, 0x6f, 0x66, 0x74, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2d, 0x67, 0x6f, - 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, + 0x49, 0x6e, 0x12, 0x1d, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x1a, 0x1e, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x00, 0x42, 0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x64, 0x68, 0x6f, + 0x75, 0x73, 0x65, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x2f, 0x73, 0x6f, + 0x66, 0x74, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x73, 0x6f, 0x66, 0x74, 0x70, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x2d, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -415,24 +414,24 @@ func file_accounts_accounts_v1_proto_rawDescGZIP() []byte { var file_accounts_accounts_v1_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_accounts_accounts_v1_proto_goTypes = []interface{}{ - (*AccountId)(nil), // 0: accounts.AccountId - (*AccountPassword)(nil), // 1: accounts.AccountPassword - (*AccountData)(nil), // 2: accounts.AccountData - (*AccountWithPassword)(nil), // 3: accounts.AccountWithPassword - (*AccountFull)(nil), // 4: accounts.AccountFull - (*AccountFullWithKubeConfig)(nil), // 5: accounts.AccountFullWithKubeConfig + (*AccountId)(nil), // 0: accounts.AccountId + (*AccountPassword)(nil), // 1: accounts.AccountPassword + (*AccountData)(nil), // 2: accounts.AccountData + (*AccountWithPassword)(nil), // 3: accounts.AccountWithPassword + (*AccountFull)(nil), // 4: accounts.AccountFull + (*AccountFullWithToken)(nil), // 5: accounts.AccountFullWithToken } var file_accounts_accounts_v1_proto_depIdxs = []int32{ 2, // 0: accounts.AccountWithPassword.data:type_name -> accounts.AccountData 1, // 1: accounts.AccountWithPassword.AccountPassword:type_name -> accounts.AccountPassword 0, // 2: accounts.AccountFull.id:type_name -> accounts.AccountId 2, // 3: accounts.AccountFull.data:type_name -> accounts.AccountData - 0, // 4: accounts.AccountFullWithKubeConfig.id:type_name -> accounts.AccountId - 2, // 5: accounts.AccountFullWithKubeConfig.data:type_name -> accounts.AccountData + 0, // 4: accounts.AccountFullWithToken.id:type_name -> accounts.AccountId + 2, // 5: accounts.AccountFullWithToken.data:type_name -> accounts.AccountData 3, // 6: accounts.Accounts.SignUp:input_type -> accounts.AccountWithPassword 3, // 7: accounts.Accounts.SignIn:input_type -> accounts.AccountWithPassword - 5, // 8: accounts.Accounts.SignUp:output_type -> accounts.AccountFullWithKubeConfig - 5, // 9: accounts.Accounts.SignIn:output_type -> accounts.AccountFullWithKubeConfig + 5, // 8: accounts.Accounts.SignUp:output_type -> accounts.AccountFullWithToken + 5, // 9: accounts.Accounts.SignIn:output_type -> accounts.AccountFullWithToken 8, // [8:10] is the sub-list for method output_type 6, // [6:8] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name @@ -507,7 +506,7 @@ func file_accounts_accounts_v1_proto_init() { } } file_accounts_accounts_v1_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountFullWithKubeConfig); i { + switch v := v.(*AccountFullWithToken); i { case 0: return &v.state case 1: diff --git a/pkg/accounts/accounts_v1_grpc.pb.go b/pkg/accounts/accounts_v1_grpc.pb.go index a25e25f..3c905bc 100644 --- a/pkg/accounts/accounts_v1_grpc.pb.go +++ b/pkg/accounts/accounts_v1_grpc.pb.go @@ -18,8 +18,8 @@ const _ = grpc.SupportPackageIsVersion7 // // 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. type AccountsClient interface { - SignUp(ctx context.Context, in *AccountWithPassword, opts ...grpc.CallOption) (*AccountFullWithKubeConfig, error) - SignIn(ctx context.Context, in *AccountWithPassword, opts ...grpc.CallOption) (*AccountFullWithKubeConfig, error) + SignUp(ctx context.Context, in *AccountWithPassword, opts ...grpc.CallOption) (*AccountFullWithToken, error) + SignIn(ctx context.Context, in *AccountWithPassword, opts ...grpc.CallOption) (*AccountFullWithToken, error) } type accountsClient struct { @@ -30,8 +30,8 @@ func NewAccountsClient(cc grpc.ClientConnInterface) AccountsClient { return &accountsClient{cc} } -func (c *accountsClient) SignUp(ctx context.Context, in *AccountWithPassword, opts ...grpc.CallOption) (*AccountFullWithKubeConfig, error) { - out := new(AccountFullWithKubeConfig) +func (c *accountsClient) SignUp(ctx context.Context, in *AccountWithPassword, opts ...grpc.CallOption) (*AccountFullWithToken, error) { + out := new(AccountFullWithToken) err := c.cc.Invoke(ctx, "/accounts.Accounts/SignUp", in, out, opts...) if err != nil { return nil, err @@ -39,8 +39,8 @@ func (c *accountsClient) SignUp(ctx context.Context, in *AccountWithPassword, op return out, nil } -func (c *accountsClient) SignIn(ctx context.Context, in *AccountWithPassword, opts ...grpc.CallOption) (*AccountFullWithKubeConfig, error) { - out := new(AccountFullWithKubeConfig) +func (c *accountsClient) SignIn(ctx context.Context, in *AccountWithPassword, opts ...grpc.CallOption) (*AccountFullWithToken, error) { + out := new(AccountFullWithToken) err := c.cc.Invoke(ctx, "/accounts.Accounts/SignIn", in, out, opts...) if err != nil { return nil, err @@ -52,8 +52,8 @@ func (c *accountsClient) SignIn(ctx context.Context, in *AccountWithPassword, op // All implementations must embed UnimplementedAccountsServer // for forward compatibility type AccountsServer interface { - SignUp(context.Context, *AccountWithPassword) (*AccountFullWithKubeConfig, error) - SignIn(context.Context, *AccountWithPassword) (*AccountFullWithKubeConfig, error) + SignUp(context.Context, *AccountWithPassword) (*AccountFullWithToken, error) + SignIn(context.Context, *AccountWithPassword) (*AccountFullWithToken, error) mustEmbedUnimplementedAccountsServer() } @@ -61,10 +61,10 @@ type AccountsServer interface { type UnimplementedAccountsServer struct { } -func (UnimplementedAccountsServer) SignUp(context.Context, *AccountWithPassword) (*AccountFullWithKubeConfig, error) { +func (UnimplementedAccountsServer) SignUp(context.Context, *AccountWithPassword) (*AccountFullWithToken, error) { return nil, status.Errorf(codes.Unimplemented, "method SignUp not implemented") } -func (UnimplementedAccountsServer) SignIn(context.Context, *AccountWithPassword) (*AccountFullWithKubeConfig, error) { +func (UnimplementedAccountsServer) SignIn(context.Context, *AccountWithPassword) (*AccountFullWithToken, error) { return nil, status.Errorf(codes.Unimplemented, "method SignIn not implemented") } func (UnimplementedAccountsServer) mustEmbedUnimplementedAccountsServer() {} diff --git a/proto b/proto index 6ecafa3..2bd6034 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 6ecafa3cc8433f4fe44a42cf22c7c53c345ce23a +Subproject commit 2bd603442ae86210a54c8edd14fe66dc111cb839