From 20bca4a9be08e7a8f11eefff9a104b1cca10699b Mon Sep 17 00:00:00 2001 From: Piyush Kumar Date: Thu, 8 Feb 2024 19:19:09 +0530 Subject: [PATCH 1/2] fix(infra): added grpc api for cluster existance fix(console): implement project deletion even when cluster is deleted --- apps/console/internal/domain/project.go | 45 +++- apps/infra/internal/app/grpc-server.go | 19 ++ grpc-interfaces/infra.proto | 16 ++ .../kloudlite.io/rpc/accounts/accounts.pb.go | 2 +- .../rpc/accounts/accounts_grpc.pb.go | 10 +- .../kloudlite.io/rpc/agent/kubeagent.pb.go | 2 +- .../rpc/agent/kubeagent_grpc.pb.go | 10 +- .../kloudlite.io/rpc/auth/auth.pb.go | 2 +- .../kloudlite.io/rpc/auth/auth_grpc.pb.go | 20 +- grpc-interfaces/kloudlite.io/rpc/ci/ci.pb.go | 2 +- .../kloudlite.io/rpc/ci/ci_grpc.pb.go | 15 +- .../kloudlite.io/rpc/comms/comms.pb.go | 2 +- .../kloudlite.io/rpc/comms/comms_grpc.pb.go | 30 +-- .../kloudlite.io/rpc/console/console.pb.go | 2 +- .../rpc/console/console_grpc.pb.go | 25 +-- .../container-registry.pb.go | 2 +- .../container-registry_grpc.pb.go | 15 +- .../kloudlite.io/rpc/dns/dns.pb.go | 2 +- .../kloudlite.io/rpc/dns/dns_grpc.pb.go | 10 +- .../rpc/finance/finance-infra.pb.go | 2 +- .../rpc/finance/finance-infra_grpc.pb.go | 55 ++--- .../kloudlite.io/rpc/finance/finance.pb.go | 2 +- .../rpc/finance/finance_grpc.pb.go | 20 +- .../kloudlite.io/rpc/iam/iam.pb.go | 2 +- .../kloudlite.io/rpc/iam/iam_grpc.pb.go | 50 ++--- .../kloudlite.io/rpc/infra/infra.pb.go | 211 ++++++++++++++++-- .../kloudlite.io/rpc/infra/infra_grpc.pb.go | 51 ++++- .../kloudlite.io/rpc/jseval/jseval.pb.go | 2 +- .../kloudlite.io/rpc/jseval/jseval_grpc.pb.go | 10 +- .../message-office-internal.pb.go | 2 +- .../message-office-internal_grpc.pb.go | 10 +- 31 files changed, 422 insertions(+), 226 deletions(-) diff --git a/apps/console/internal/domain/project.go b/apps/console/internal/domain/project.go index f20e86b61..5f91bcd7a 100644 --- a/apps/console/internal/domain/project.go +++ b/apps/console/internal/domain/project.go @@ -5,6 +5,7 @@ import ( "crypto/md5" "encoding/hex" "fmt" + "github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/infra" "github.com/kloudlite/api/common/fields" "github.com/kloudlite/api/pkg/errors" @@ -59,6 +60,26 @@ func (d *domain) getClusterAttachedToProject(ctx K8sContext, projectName string) return fn.New(string(clusterName)), nil } +func (d *domain) clusterStatus(ctx ConsoleContext, projectName string) (*infra.ClusterExistsOut, error) { + prj, err := d.findProject(ctx, projectName) + if err != nil { + return nil, errors.NewE(err) + } + + clusterExistStatus, err := d.infraClient.ClusterExists(ctx, &infra.ClusterExistsIn{ + UserId: string(ctx.UserId), + UserName: ctx.UserName, + UserEmail: ctx.UserEmail, + AccountName: ctx.AccountName, + ClusterName: *prj.ClusterName, + }) + if err != nil { + return nil, errors.NewE(err) + } + + return clusterExistStatus, nil +} + func (d *domain) ListProjects(ctx context.Context, userId repos.ID, accountName string, search map[string]repos.MatchFilter, pagination repos.CursorPagination) (*repos.PaginatedRecord[*entities.Project], error) { co, err := d.iamClient.Can(ctx, &iam.CanIn{ UserId: string(userId), @@ -223,6 +244,26 @@ func (d *domain) DeleteProject(ctx ConsoleContext, name string) error { return errors.Newf("unauthorized to delete project") } + cluster, err := d.clusterStatus(ctx, name) + if err != nil { + return errors.NewE(err) + } + + if !cluster.Exists { + err := d.projectRepo.DeleteOne( + ctx, + repos.Filter{ + fields.AccountName: ctx.AccountName, + fields.MetadataName: name, + }, + ) + if err != nil { + return errors.NewE(err) + } + d.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeProject, name, PublishDelete) + return nil + } + uproj, err := d.projectRepo.Patch( ctx, repos.Filter{ @@ -302,7 +343,7 @@ func (d *domain) OnProjectDeleteMessage(ctx ConsoleContext, project entities.Pro if err != nil { return errors.NewE(err) } - d.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeApp, project.Name, PublishDelete) + d.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeProject, project.Name, PublishDelete) return nil } @@ -358,7 +399,7 @@ func (d *domain) OnProjectApplyError(ctx ConsoleContext, errMsg string, name str return errors.NewE(err) } - d.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeApp, uproject.Name, PublishDelete) + d.resourceEventPublisher.PublishConsoleEvent(ctx, entities.ResourceTypeProject, uproject.Name, PublishDelete) return errors.NewE(err) } diff --git a/apps/infra/internal/app/grpc-server.go b/apps/infra/internal/app/grpc-server.go index 1ed0e085c..39aa8c05a 100644 --- a/apps/infra/internal/app/grpc-server.go +++ b/apps/infra/internal/app/grpc-server.go @@ -86,6 +86,25 @@ func (g *grpcServer) GetNodepool(ctx context.Context, in *infra.GetNodepoolIn) ( }, nil } +func (g *grpcServer) ClusterExists(ctx context.Context, in *infra.ClusterExistsIn) (*infra.ClusterExistsOut, error) { + infraCtx := domain.InfraContext{ + Context: ctx, + UserId: repos.ID(in.UserId), + UserEmail: in.UserEmail, + UserName: in.UserName, + AccountName: in.AccountName, + } + cluster, err := g.d.GetCluster(infraCtx, in.ClusterName) + if err != nil { + return nil, errors.NewE(err) + } + if cluster == nil { + return &infra.ClusterExistsOut{Exists: false}, nil + } + + return &infra.ClusterExistsOut{Exists: true}, nil +} + func newGrpcServer(d domain.Domain) infra.InfraServer { return &grpcServer{ d: d, diff --git a/grpc-interfaces/infra.proto b/grpc-interfaces/infra.proto index 93f3b567a..ec3e46e1a 100644 --- a/grpc-interfaces/infra.proto +++ b/grpc-interfaces/infra.proto @@ -5,6 +5,7 @@ option go_package = "kloudlite.io/rpc/infra"; service Infra { rpc GetCluster(GetClusterIn) returns (GetClusterOut); rpc GetNodepool(GetNodepoolIn) returns (GetNodepoolOut); + rpc ClusterExists(ClusterExistsIn) returns (ClusterExistsOut); } message GetClusterIn { @@ -38,3 +39,18 @@ message GetNodepoolOut { string IACJobName = 1; string IACJobNamespace = 2; } + +message ClusterExistsIn { + string userId = 1; + string userName = 2; + string userEmail = 3; + + string accountName = 4; + string clusterName = 5; +} + +message ClusterExistsOut { + bool exists = 1; +} + + diff --git a/grpc-interfaces/kloudlite.io/rpc/accounts/accounts.pb.go b/grpc-interfaces/kloudlite.io/rpc/accounts/accounts.pb.go index f84d0eadb..f56956db4 100644 --- a/grpc-interfaces/kloudlite.io/rpc/accounts/accounts.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/accounts/accounts.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc v4.24.4 // source: accounts.proto diff --git a/grpc-interfaces/kloudlite.io/rpc/accounts/accounts_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/accounts/accounts_grpc.pb.go index 91b0b817c..beca1a899 100644 --- a/grpc-interfaces/kloudlite.io/rpc/accounts/accounts_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/accounts/accounts_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.2.0 // - protoc v4.24.4 // source: accounts.proto @@ -18,10 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - Accounts_GetAccount_FullMethodName = "/Accounts/GetAccount" -) - // AccountsClient is the client API for Accounts 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. @@ -39,7 +35,7 @@ func NewAccountsClient(cc grpc.ClientConnInterface) AccountsClient { func (c *accountsClient) GetAccount(ctx context.Context, in *GetAccountIn, opts ...grpc.CallOption) (*GetAccountOut, error) { out := new(GetAccountOut) - err := c.cc.Invoke(ctx, Accounts_GetAccount_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Accounts/GetAccount", in, out, opts...) if err != nil { return nil, err } @@ -84,7 +80,7 @@ func _Accounts_GetAccount_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Accounts_GetAccount_FullMethodName, + FullMethod: "/Accounts/GetAccount", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AccountsServer).GetAccount(ctx, req.(*GetAccountIn)) diff --git a/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent.pb.go b/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent.pb.go index b69a7602d..df0445227 100644 --- a/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc v4.24.4 // source: kubeagent.proto diff --git a/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent_grpc.pb.go index 0d761c0bd..28fa37624 100644 --- a/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/agent/kubeagent_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.2.0 // - protoc v4.24.4 // source: kubeagent.proto @@ -18,10 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - KubeAgent_KubeApply_FullMethodName = "/KubeAgent/KubeApply" -) - // KubeAgentClient is the client API for KubeAgent 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. @@ -39,7 +35,7 @@ func NewKubeAgentClient(cc grpc.ClientConnInterface) KubeAgentClient { func (c *kubeAgentClient) KubeApply(ctx context.Context, in *PayloadIn, opts ...grpc.CallOption) (*PayloadOut, error) { out := new(PayloadOut) - err := c.cc.Invoke(ctx, KubeAgent_KubeApply_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/KubeAgent/KubeApply", in, out, opts...) if err != nil { return nil, err } @@ -84,7 +80,7 @@ func _KubeAgent_KubeApply_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: KubeAgent_KubeApply_FullMethodName, + FullMethod: "/KubeAgent/KubeApply", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(KubeAgentServer).KubeApply(ctx, req.(*PayloadIn)) diff --git a/grpc-interfaces/kloudlite.io/rpc/auth/auth.pb.go b/grpc-interfaces/kloudlite.io/rpc/auth/auth.pb.go index e732090d6..bc0102096 100644 --- a/grpc-interfaces/kloudlite.io/rpc/auth/auth.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/auth/auth.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc v4.24.4 // source: auth.proto diff --git a/grpc-interfaces/kloudlite.io/rpc/auth/auth_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/auth/auth_grpc.pb.go index d7b047468..0a3d22c95 100644 --- a/grpc-interfaces/kloudlite.io/rpc/auth/auth_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/auth/auth_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.2.0 // - protoc v4.24.4 // source: auth.proto @@ -18,12 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - Auth_GetAccessToken_FullMethodName = "/Auth/GetAccessToken" - Auth_EnsureUserByEmail_FullMethodName = "/Auth/EnsureUserByEmail" - Auth_GetUser_FullMethodName = "/Auth/GetUser" -) - // AuthClient is the client API for Auth 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. @@ -43,7 +37,7 @@ func NewAuthClient(cc grpc.ClientConnInterface) AuthClient { func (c *authClient) GetAccessToken(ctx context.Context, in *GetAccessTokenRequest, opts ...grpc.CallOption) (*AccessTokenOut, error) { out := new(AccessTokenOut) - err := c.cc.Invoke(ctx, Auth_GetAccessToken_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Auth/GetAccessToken", in, out, opts...) if err != nil { return nil, err } @@ -52,7 +46,7 @@ func (c *authClient) GetAccessToken(ctx context.Context, in *GetAccessTokenReque func (c *authClient) EnsureUserByEmail(ctx context.Context, in *GetUserByEmailRequest, opts ...grpc.CallOption) (*GetUserByEmailOut, error) { out := new(GetUserByEmailOut) - err := c.cc.Invoke(ctx, Auth_EnsureUserByEmail_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Auth/EnsureUserByEmail", in, out, opts...) if err != nil { return nil, err } @@ -61,7 +55,7 @@ func (c *authClient) EnsureUserByEmail(ctx context.Context, in *GetUserByEmailRe func (c *authClient) GetUser(ctx context.Context, in *GetUserIn, opts ...grpc.CallOption) (*GetUserOut, error) { out := new(GetUserOut) - err := c.cc.Invoke(ctx, Auth_GetUser_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Auth/GetUser", in, out, opts...) if err != nil { return nil, err } @@ -114,7 +108,7 @@ func _Auth_GetAccessToken_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Auth_GetAccessToken_FullMethodName, + FullMethod: "/Auth/GetAccessToken", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AuthServer).GetAccessToken(ctx, req.(*GetAccessTokenRequest)) @@ -132,7 +126,7 @@ func _Auth_EnsureUserByEmail_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Auth_EnsureUserByEmail_FullMethodName, + FullMethod: "/Auth/EnsureUserByEmail", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AuthServer).EnsureUserByEmail(ctx, req.(*GetUserByEmailRequest)) @@ -150,7 +144,7 @@ func _Auth_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Auth_GetUser_FullMethodName, + FullMethod: "/Auth/GetUser", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AuthServer).GetUser(ctx, req.(*GetUserIn)) diff --git a/grpc-interfaces/kloudlite.io/rpc/ci/ci.pb.go b/grpc-interfaces/kloudlite.io/rpc/ci/ci.pb.go index 956a394a4..7a6f793b5 100644 --- a/grpc-interfaces/kloudlite.io/rpc/ci/ci.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/ci/ci.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc v4.24.4 // source: ci.proto diff --git a/grpc-interfaces/kloudlite.io/rpc/ci/ci_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/ci/ci_grpc.pb.go index aa4fbd339..5792f1ea0 100644 --- a/grpc-interfaces/kloudlite.io/rpc/ci/ci_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/ci/ci_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.2.0 // - protoc v4.24.4 // source: ci.proto @@ -18,11 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - CI_CreateHarborProject_FullMethodName = "/CI/CreateHarborProject" - CI_DeleteHarborProject_FullMethodName = "/CI/DeleteHarborProject" -) - // CIClient is the client API for CI 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. @@ -41,7 +36,7 @@ func NewCIClient(cc grpc.ClientConnInterface) CIClient { func (c *cIClient) CreateHarborProject(ctx context.Context, in *HarborProjectIn, opts ...grpc.CallOption) (*HarborProjectOut, error) { out := new(HarborProjectOut) - err := c.cc.Invoke(ctx, CI_CreateHarborProject_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/CI/CreateHarborProject", in, out, opts...) if err != nil { return nil, err } @@ -50,7 +45,7 @@ func (c *cIClient) CreateHarborProject(ctx context.Context, in *HarborProjectIn, func (c *cIClient) DeleteHarborProject(ctx context.Context, in *HarborProjectIn, opts ...grpc.CallOption) (*HarborProjectOut, error) { out := new(HarborProjectOut) - err := c.cc.Invoke(ctx, CI_DeleteHarborProject_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/CI/DeleteHarborProject", in, out, opts...) if err != nil { return nil, err } @@ -99,7 +94,7 @@ func _CI_CreateHarborProject_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: CI_CreateHarborProject_FullMethodName, + FullMethod: "/CI/CreateHarborProject", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CIServer).CreateHarborProject(ctx, req.(*HarborProjectIn)) @@ -117,7 +112,7 @@ func _CI_DeleteHarborProject_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: CI_DeleteHarborProject_FullMethodName, + FullMethod: "/CI/DeleteHarborProject", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CIServer).DeleteHarborProject(ctx, req.(*HarborProjectIn)) diff --git a/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go b/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go index 645945bea..1cf5a8d98 100644 --- a/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/comms/comms.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc v4.24.4 // source: comms.proto diff --git a/grpc-interfaces/kloudlite.io/rpc/comms/comms_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/comms/comms_grpc.pb.go index 68f1c675e..922658e32 100644 --- a/grpc-interfaces/kloudlite.io/rpc/comms/comms_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/comms/comms_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.2.0 // - protoc v4.24.4 // source: comms.proto @@ -18,14 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - Comms_SendVerificationEmail_FullMethodName = "/Comms/SendVerificationEmail" - Comms_SendPasswordResetEmail_FullMethodName = "/Comms/SendPasswordResetEmail" - Comms_SendAccountMemberInviteEmail_FullMethodName = "/Comms/SendAccountMemberInviteEmail" - Comms_SendProjectMemberInviteEmail_FullMethodName = "/Comms/SendProjectMemberInviteEmail" - Comms_SendWelcomeEmail_FullMethodName = "/Comms/SendWelcomeEmail" -) - // CommsClient is the client API for Comms 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. @@ -47,7 +39,7 @@ func NewCommsClient(cc grpc.ClientConnInterface) CommsClient { func (c *commsClient) SendVerificationEmail(ctx context.Context, in *VerificationEmailInput, opts ...grpc.CallOption) (*Void, error) { out := new(Void) - err := c.cc.Invoke(ctx, Comms_SendVerificationEmail_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Comms/SendVerificationEmail", in, out, opts...) if err != nil { return nil, err } @@ -56,7 +48,7 @@ func (c *commsClient) SendVerificationEmail(ctx context.Context, in *Verificatio func (c *commsClient) SendPasswordResetEmail(ctx context.Context, in *PasswordResetEmailInput, opts ...grpc.CallOption) (*Void, error) { out := new(Void) - err := c.cc.Invoke(ctx, Comms_SendPasswordResetEmail_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Comms/SendPasswordResetEmail", in, out, opts...) if err != nil { return nil, err } @@ -65,7 +57,7 @@ func (c *commsClient) SendPasswordResetEmail(ctx context.Context, in *PasswordRe func (c *commsClient) SendAccountMemberInviteEmail(ctx context.Context, in *AccountMemberInviteEmailInput, opts ...grpc.CallOption) (*Void, error) { out := new(Void) - err := c.cc.Invoke(ctx, Comms_SendAccountMemberInviteEmail_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Comms/SendAccountMemberInviteEmail", in, out, opts...) if err != nil { return nil, err } @@ -74,7 +66,7 @@ func (c *commsClient) SendAccountMemberInviteEmail(ctx context.Context, in *Acco func (c *commsClient) SendProjectMemberInviteEmail(ctx context.Context, in *ProjectMemberInviteEmailInput, opts ...grpc.CallOption) (*Void, error) { out := new(Void) - err := c.cc.Invoke(ctx, Comms_SendProjectMemberInviteEmail_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Comms/SendProjectMemberInviteEmail", in, out, opts...) if err != nil { return nil, err } @@ -83,7 +75,7 @@ func (c *commsClient) SendProjectMemberInviteEmail(ctx context.Context, in *Proj func (c *commsClient) SendWelcomeEmail(ctx context.Context, in *WelcomeEmailInput, opts ...grpc.CallOption) (*Void, error) { out := new(Void) - err := c.cc.Invoke(ctx, Comms_SendWelcomeEmail_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Comms/SendWelcomeEmail", in, out, opts...) if err != nil { return nil, err } @@ -144,7 +136,7 @@ func _Comms_SendVerificationEmail_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Comms_SendVerificationEmail_FullMethodName, + FullMethod: "/Comms/SendVerificationEmail", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommsServer).SendVerificationEmail(ctx, req.(*VerificationEmailInput)) @@ -162,7 +154,7 @@ func _Comms_SendPasswordResetEmail_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Comms_SendPasswordResetEmail_FullMethodName, + FullMethod: "/Comms/SendPasswordResetEmail", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommsServer).SendPasswordResetEmail(ctx, req.(*PasswordResetEmailInput)) @@ -180,7 +172,7 @@ func _Comms_SendAccountMemberInviteEmail_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Comms_SendAccountMemberInviteEmail_FullMethodName, + FullMethod: "/Comms/SendAccountMemberInviteEmail", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommsServer).SendAccountMemberInviteEmail(ctx, req.(*AccountMemberInviteEmailInput)) @@ -198,7 +190,7 @@ func _Comms_SendProjectMemberInviteEmail_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Comms_SendProjectMemberInviteEmail_FullMethodName, + FullMethod: "/Comms/SendProjectMemberInviteEmail", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommsServer).SendProjectMemberInviteEmail(ctx, req.(*ProjectMemberInviteEmailInput)) @@ -216,7 +208,7 @@ func _Comms_SendWelcomeEmail_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Comms_SendWelcomeEmail_FullMethodName, + FullMethod: "/Comms/SendWelcomeEmail", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommsServer).SendWelcomeEmail(ctx, req.(*WelcomeEmailInput)) diff --git a/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go b/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go index d1b22c3f7..c09616a9b 100644 --- a/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/console/console.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc v4.24.4 // source: console.proto diff --git a/grpc-interfaces/kloudlite.io/rpc/console/console_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/console/console_grpc.pb.go index d1ae92d93..21a48dd8c 100644 --- a/grpc-interfaces/kloudlite.io/rpc/console/console_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/console/console_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.2.0 // - protoc v4.24.4 // source: console.proto @@ -18,13 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - Console_GetProjectName_FullMethodName = "/Console/GetProjectName" - Console_GetApp_FullMethodName = "/Console/GetApp" - Console_GetManagedSvc_FullMethodName = "/Console/GetManagedSvc" - Console_SetupAccount_FullMethodName = "/Console/SetupAccount" -) - // ConsoleClient is the client API for Console 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. @@ -45,7 +38,7 @@ func NewConsoleClient(cc grpc.ClientConnInterface) ConsoleClient { func (c *consoleClient) GetProjectName(ctx context.Context, in *ProjectIn, opts ...grpc.CallOption) (*ProjectOut, error) { out := new(ProjectOut) - err := c.cc.Invoke(ctx, Console_GetProjectName_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Console/GetProjectName", in, out, opts...) if err != nil { return nil, err } @@ -54,7 +47,7 @@ func (c *consoleClient) GetProjectName(ctx context.Context, in *ProjectIn, opts func (c *consoleClient) GetApp(ctx context.Context, in *AppIn, opts ...grpc.CallOption) (*AppOut, error) { out := new(AppOut) - err := c.cc.Invoke(ctx, Console_GetApp_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Console/GetApp", in, out, opts...) if err != nil { return nil, err } @@ -63,7 +56,7 @@ func (c *consoleClient) GetApp(ctx context.Context, in *AppIn, opts ...grpc.Call func (c *consoleClient) GetManagedSvc(ctx context.Context, in *MSvcIn, opts ...grpc.CallOption) (*MSvcOut, error) { out := new(MSvcOut) - err := c.cc.Invoke(ctx, Console_GetManagedSvc_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Console/GetManagedSvc", in, out, opts...) if err != nil { return nil, err } @@ -72,7 +65,7 @@ func (c *consoleClient) GetManagedSvc(ctx context.Context, in *MSvcIn, opts ...g func (c *consoleClient) SetupAccount(ctx context.Context, in *AccountSetupIn, opts ...grpc.CallOption) (*AccountSetupVoid, error) { out := new(AccountSetupVoid) - err := c.cc.Invoke(ctx, Console_SetupAccount_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Console/SetupAccount", in, out, opts...) if err != nil { return nil, err } @@ -129,7 +122,7 @@ func _Console_GetProjectName_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Console_GetProjectName_FullMethodName, + FullMethod: "/Console/GetProjectName", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ConsoleServer).GetProjectName(ctx, req.(*ProjectIn)) @@ -147,7 +140,7 @@ func _Console_GetApp_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Console_GetApp_FullMethodName, + FullMethod: "/Console/GetApp", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ConsoleServer).GetApp(ctx, req.(*AppIn)) @@ -165,7 +158,7 @@ func _Console_GetManagedSvc_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Console_GetManagedSvc_FullMethodName, + FullMethod: "/Console/GetManagedSvc", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ConsoleServer).GetManagedSvc(ctx, req.(*MSvcIn)) @@ -183,7 +176,7 @@ func _Console_SetupAccount_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Console_SetupAccount_FullMethodName, + FullMethod: "/Console/SetupAccount", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ConsoleServer).SetupAccount(ctx, req.(*AccountSetupIn)) diff --git a/grpc-interfaces/kloudlite.io/rpc/container_registry/container-registry.pb.go b/grpc-interfaces/kloudlite.io/rpc/container_registry/container-registry.pb.go index 30582ea80..c3578853a 100644 --- a/grpc-interfaces/kloudlite.io/rpc/container_registry/container-registry.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/container_registry/container-registry.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc v4.24.4 // source: container-registry.proto diff --git a/grpc-interfaces/kloudlite.io/rpc/container_registry/container-registry_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/container_registry/container-registry_grpc.pb.go index d43d00396..5a88a6ba2 100644 --- a/grpc-interfaces/kloudlite.io/rpc/container_registry/container-registry_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/container_registry/container-registry_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.2.0 // - protoc v4.24.4 // source: container-registry.proto @@ -18,11 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - ContainerRegistry_CreateProjectForAccount_FullMethodName = "/ContainerRegistry/CreateProjectForAccount" - ContainerRegistry_GetSvcCredentials_FullMethodName = "/ContainerRegistry/GetSvcCredentials" -) - // ContainerRegistryClient is the client API for ContainerRegistry 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. @@ -41,7 +36,7 @@ func NewContainerRegistryClient(cc grpc.ClientConnInterface) ContainerRegistryCl func (c *containerRegistryClient) CreateProjectForAccount(ctx context.Context, in *CreateProjectIn, opts ...grpc.CallOption) (*CreateProjectOut, error) { out := new(CreateProjectOut) - err := c.cc.Invoke(ctx, ContainerRegistry_CreateProjectForAccount_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/ContainerRegistry/CreateProjectForAccount", in, out, opts...) if err != nil { return nil, err } @@ -50,7 +45,7 @@ func (c *containerRegistryClient) CreateProjectForAccount(ctx context.Context, i func (c *containerRegistryClient) GetSvcCredentials(ctx context.Context, in *GetSvcCredentialsIn, opts ...grpc.CallOption) (*GetSvcCredentialsOut, error) { out := new(GetSvcCredentialsOut) - err := c.cc.Invoke(ctx, ContainerRegistry_GetSvcCredentials_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/ContainerRegistry/GetSvcCredentials", in, out, opts...) if err != nil { return nil, err } @@ -99,7 +94,7 @@ func _ContainerRegistry_CreateProjectForAccount_Handler(srv interface{}, ctx con } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: ContainerRegistry_CreateProjectForAccount_FullMethodName, + FullMethod: "/ContainerRegistry/CreateProjectForAccount", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContainerRegistryServer).CreateProjectForAccount(ctx, req.(*CreateProjectIn)) @@ -117,7 +112,7 @@ func _ContainerRegistry_GetSvcCredentials_Handler(srv interface{}, ctx context.C } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: ContainerRegistry_GetSvcCredentials_FullMethodName, + FullMethod: "/ContainerRegistry/GetSvcCredentials", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContainerRegistryServer).GetSvcCredentials(ctx, req.(*GetSvcCredentialsIn)) diff --git a/grpc-interfaces/kloudlite.io/rpc/dns/dns.pb.go b/grpc-interfaces/kloudlite.io/rpc/dns/dns.pb.go index 5f6a66af9..a8931df2e 100644 --- a/grpc-interfaces/kloudlite.io/rpc/dns/dns.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/dns/dns.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc v4.24.4 // source: dns.proto diff --git a/grpc-interfaces/kloudlite.io/rpc/dns/dns_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/dns/dns_grpc.pb.go index 079d66d82..1ca73d5a7 100644 --- a/grpc-interfaces/kloudlite.io/rpc/dns/dns_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/dns/dns_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.2.0 // - protoc v4.24.4 // source: dns.proto @@ -18,10 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - DNS_GetAccountDomains_FullMethodName = "/DNS/GetAccountDomains" -) - // DNSClient is the client API for DNS 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. @@ -39,7 +35,7 @@ func NewDNSClient(cc grpc.ClientConnInterface) DNSClient { func (c *dNSClient) GetAccountDomains(ctx context.Context, in *GetAccountDomainsIn, opts ...grpc.CallOption) (*GetAccountDomainsOut, error) { out := new(GetAccountDomainsOut) - err := c.cc.Invoke(ctx, DNS_GetAccountDomains_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/DNS/GetAccountDomains", in, out, opts...) if err != nil { return nil, err } @@ -84,7 +80,7 @@ func _DNS_GetAccountDomains_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: DNS_GetAccountDomains_FullMethodName, + FullMethod: "/DNS/GetAccountDomains", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DNSServer).GetAccountDomains(ctx, req.(*GetAccountDomainsIn)) diff --git a/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra.pb.go b/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra.pb.go index 5683406ee..9cf2a27a6 100644 --- a/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc v4.24.4 // source: finance-infra.proto diff --git a/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra_grpc.pb.go index 417b15177..e5471555c 100644 --- a/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/finance/finance-infra_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.2.0 // - protoc v4.24.4 // source: finance-infra.proto @@ -18,19 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - FinanceInfra_ComputeStart_FullMethodName = "/FinanceInfra/ComputeStart" - FinanceInfra_ComputeEnd_FullMethodName = "/FinanceInfra/ComputeEnd" - FinanceInfra_LambdaStart_FullMethodName = "/FinanceInfra/LambdaStart" - FinanceInfra_LambdaEnd_FullMethodName = "/FinanceInfra/LambdaEnd" - FinanceInfra_BlockStorageStart_FullMethodName = "/FinanceInfra/BlockStorageStart" - FinanceInfra_BlockStorageEnd_FullMethodName = "/FinanceInfra/BlockStorageEnd" - FinanceInfra_ObjectStorageStart_FullMethodName = "/FinanceInfra/ObjectStorageStart" - FinanceInfra_ObjectStorageEnd_FullMethodName = "/FinanceInfra/ObjectStorageEnd" - FinanceInfra_CIStart_FullMethodName = "/FinanceInfra/CIStart" - FinanceInfra_CIEnd_FullMethodName = "/FinanceInfra/CIEnd" -) - // FinanceInfraClient is the client API for FinanceInfra 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. @@ -57,7 +44,7 @@ func NewFinanceInfraClient(cc grpc.ClientConnInterface) FinanceInfraClient { func (c *financeInfraClient) ComputeStart(ctx context.Context, in *ComputeStartIn, opts ...grpc.CallOption) (*FinanceInfraVoid, error) { out := new(FinanceInfraVoid) - err := c.cc.Invoke(ctx, FinanceInfra_ComputeStart_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/FinanceInfra/ComputeStart", in, out, opts...) if err != nil { return nil, err } @@ -66,7 +53,7 @@ func (c *financeInfraClient) ComputeStart(ctx context.Context, in *ComputeStartI func (c *financeInfraClient) ComputeEnd(ctx context.Context, in *ComputeEndIn, opts ...grpc.CallOption) (*FinanceInfraVoid, error) { out := new(FinanceInfraVoid) - err := c.cc.Invoke(ctx, FinanceInfra_ComputeEnd_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/FinanceInfra/ComputeEnd", in, out, opts...) if err != nil { return nil, err } @@ -75,7 +62,7 @@ func (c *financeInfraClient) ComputeEnd(ctx context.Context, in *ComputeEndIn, o func (c *financeInfraClient) LambdaStart(ctx context.Context, in *LambdaStartIn, opts ...grpc.CallOption) (*FinanceInfraVoid, error) { out := new(FinanceInfraVoid) - err := c.cc.Invoke(ctx, FinanceInfra_LambdaStart_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/FinanceInfra/LambdaStart", in, out, opts...) if err != nil { return nil, err } @@ -84,7 +71,7 @@ func (c *financeInfraClient) LambdaStart(ctx context.Context, in *LambdaStartIn, func (c *financeInfraClient) LambdaEnd(ctx context.Context, in *LambdaEndIn, opts ...grpc.CallOption) (*FinanceInfraVoid, error) { out := new(FinanceInfraVoid) - err := c.cc.Invoke(ctx, FinanceInfra_LambdaEnd_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/FinanceInfra/LambdaEnd", in, out, opts...) if err != nil { return nil, err } @@ -93,7 +80,7 @@ func (c *financeInfraClient) LambdaEnd(ctx context.Context, in *LambdaEndIn, opt func (c *financeInfraClient) BlockStorageStart(ctx context.Context, in *BlockStorageStartIn, opts ...grpc.CallOption) (*FinanceInfraVoid, error) { out := new(FinanceInfraVoid) - err := c.cc.Invoke(ctx, FinanceInfra_BlockStorageStart_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/FinanceInfra/BlockStorageStart", in, out, opts...) if err != nil { return nil, err } @@ -102,7 +89,7 @@ func (c *financeInfraClient) BlockStorageStart(ctx context.Context, in *BlockSto func (c *financeInfraClient) BlockStorageEnd(ctx context.Context, in *BlockStorageEndIn, opts ...grpc.CallOption) (*FinanceInfraVoid, error) { out := new(FinanceInfraVoid) - err := c.cc.Invoke(ctx, FinanceInfra_BlockStorageEnd_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/FinanceInfra/BlockStorageEnd", in, out, opts...) if err != nil { return nil, err } @@ -111,7 +98,7 @@ func (c *financeInfraClient) BlockStorageEnd(ctx context.Context, in *BlockStora func (c *financeInfraClient) ObjectStorageStart(ctx context.Context, in *ObjectStorageStartIn, opts ...grpc.CallOption) (*FinanceInfraVoid, error) { out := new(FinanceInfraVoid) - err := c.cc.Invoke(ctx, FinanceInfra_ObjectStorageStart_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/FinanceInfra/ObjectStorageStart", in, out, opts...) if err != nil { return nil, err } @@ -120,7 +107,7 @@ func (c *financeInfraClient) ObjectStorageStart(ctx context.Context, in *ObjectS func (c *financeInfraClient) ObjectStorageEnd(ctx context.Context, in *ObjectStorageEndIn, opts ...grpc.CallOption) (*FinanceInfraVoid, error) { out := new(FinanceInfraVoid) - err := c.cc.Invoke(ctx, FinanceInfra_ObjectStorageEnd_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/FinanceInfra/ObjectStorageEnd", in, out, opts...) if err != nil { return nil, err } @@ -129,7 +116,7 @@ func (c *financeInfraClient) ObjectStorageEnd(ctx context.Context, in *ObjectSto func (c *financeInfraClient) CIStart(ctx context.Context, in *CIStartIn, opts ...grpc.CallOption) (*FinanceInfraVoid, error) { out := new(FinanceInfraVoid) - err := c.cc.Invoke(ctx, FinanceInfra_CIStart_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/FinanceInfra/CIStart", in, out, opts...) if err != nil { return nil, err } @@ -138,7 +125,7 @@ func (c *financeInfraClient) CIStart(ctx context.Context, in *CIStartIn, opts .. func (c *financeInfraClient) CIEnd(ctx context.Context, in *CIEndIn, opts ...grpc.CallOption) (*FinanceInfraVoid, error) { out := new(FinanceInfraVoid) - err := c.cc.Invoke(ctx, FinanceInfra_CIEnd_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/FinanceInfra/CIEnd", in, out, opts...) if err != nil { return nil, err } @@ -219,7 +206,7 @@ func _FinanceInfra_ComputeStart_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: FinanceInfra_ComputeStart_FullMethodName, + FullMethod: "/FinanceInfra/ComputeStart", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FinanceInfraServer).ComputeStart(ctx, req.(*ComputeStartIn)) @@ -237,7 +224,7 @@ func _FinanceInfra_ComputeEnd_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: FinanceInfra_ComputeEnd_FullMethodName, + FullMethod: "/FinanceInfra/ComputeEnd", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FinanceInfraServer).ComputeEnd(ctx, req.(*ComputeEndIn)) @@ -255,7 +242,7 @@ func _FinanceInfra_LambdaStart_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: FinanceInfra_LambdaStart_FullMethodName, + FullMethod: "/FinanceInfra/LambdaStart", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FinanceInfraServer).LambdaStart(ctx, req.(*LambdaStartIn)) @@ -273,7 +260,7 @@ func _FinanceInfra_LambdaEnd_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: FinanceInfra_LambdaEnd_FullMethodName, + FullMethod: "/FinanceInfra/LambdaEnd", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FinanceInfraServer).LambdaEnd(ctx, req.(*LambdaEndIn)) @@ -291,7 +278,7 @@ func _FinanceInfra_BlockStorageStart_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: FinanceInfra_BlockStorageStart_FullMethodName, + FullMethod: "/FinanceInfra/BlockStorageStart", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FinanceInfraServer).BlockStorageStart(ctx, req.(*BlockStorageStartIn)) @@ -309,7 +296,7 @@ func _FinanceInfra_BlockStorageEnd_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: FinanceInfra_BlockStorageEnd_FullMethodName, + FullMethod: "/FinanceInfra/BlockStorageEnd", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FinanceInfraServer).BlockStorageEnd(ctx, req.(*BlockStorageEndIn)) @@ -327,7 +314,7 @@ func _FinanceInfra_ObjectStorageStart_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: FinanceInfra_ObjectStorageStart_FullMethodName, + FullMethod: "/FinanceInfra/ObjectStorageStart", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FinanceInfraServer).ObjectStorageStart(ctx, req.(*ObjectStorageStartIn)) @@ -345,7 +332,7 @@ func _FinanceInfra_ObjectStorageEnd_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: FinanceInfra_ObjectStorageEnd_FullMethodName, + FullMethod: "/FinanceInfra/ObjectStorageEnd", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FinanceInfraServer).ObjectStorageEnd(ctx, req.(*ObjectStorageEndIn)) @@ -363,7 +350,7 @@ func _FinanceInfra_CIStart_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: FinanceInfra_CIStart_FullMethodName, + FullMethod: "/FinanceInfra/CIStart", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FinanceInfraServer).CIStart(ctx, req.(*CIStartIn)) @@ -381,7 +368,7 @@ func _FinanceInfra_CIEnd_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: FinanceInfra_CIEnd_FullMethodName, + FullMethod: "/FinanceInfra/CIEnd", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FinanceInfraServer).CIEnd(ctx, req.(*CIEndIn)) diff --git a/grpc-interfaces/kloudlite.io/rpc/finance/finance.pb.go b/grpc-interfaces/kloudlite.io/rpc/finance/finance.pb.go index 092912d55..b13d5a015 100644 --- a/grpc-interfaces/kloudlite.io/rpc/finance/finance.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/finance/finance.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc v4.24.4 // source: finance.proto diff --git a/grpc-interfaces/kloudlite.io/rpc/finance/finance_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/finance/finance_grpc.pb.go index 61e0d9dd7..a99d8e8b8 100644 --- a/grpc-interfaces/kloudlite.io/rpc/finance/finance_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/finance/finance_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.2.0 // - protoc v4.24.4 // source: finance.proto @@ -18,12 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - Finance_StartBillable_FullMethodName = "/Finance/startBillable" - Finance_StopBillable_FullMethodName = "/Finance/stopBillable" - Finance_GetAttachedCluster_FullMethodName = "/Finance/getAttachedCluster" -) - // FinanceClient is the client API for Finance 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. @@ -43,7 +37,7 @@ func NewFinanceClient(cc grpc.ClientConnInterface) FinanceClient { func (c *financeClient) StartBillable(ctx context.Context, in *StartBillableIn, opts ...grpc.CallOption) (*StartBillableOut, error) { out := new(StartBillableOut) - err := c.cc.Invoke(ctx, Finance_StartBillable_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Finance/startBillable", in, out, opts...) if err != nil { return nil, err } @@ -52,7 +46,7 @@ func (c *financeClient) StartBillable(ctx context.Context, in *StartBillableIn, func (c *financeClient) StopBillable(ctx context.Context, in *StopBillableIn, opts ...grpc.CallOption) (*StopBillableOut, error) { out := new(StopBillableOut) - err := c.cc.Invoke(ctx, Finance_StopBillable_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Finance/stopBillable", in, out, opts...) if err != nil { return nil, err } @@ -61,7 +55,7 @@ func (c *financeClient) StopBillable(ctx context.Context, in *StopBillableIn, op func (c *financeClient) GetAttachedCluster(ctx context.Context, in *GetAttachedClusterIn, opts ...grpc.CallOption) (*GetAttachedClusterOut, error) { out := new(GetAttachedClusterOut) - err := c.cc.Invoke(ctx, Finance_GetAttachedCluster_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Finance/getAttachedCluster", in, out, opts...) if err != nil { return nil, err } @@ -114,7 +108,7 @@ func _Finance_StartBillable_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Finance_StartBillable_FullMethodName, + FullMethod: "/Finance/startBillable", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FinanceServer).StartBillable(ctx, req.(*StartBillableIn)) @@ -132,7 +126,7 @@ func _Finance_StopBillable_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Finance_StopBillable_FullMethodName, + FullMethod: "/Finance/stopBillable", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FinanceServer).StopBillable(ctx, req.(*StopBillableIn)) @@ -150,7 +144,7 @@ func _Finance_GetAttachedCluster_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Finance_GetAttachedCluster_FullMethodName, + FullMethod: "/Finance/getAttachedCluster", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FinanceServer).GetAttachedCluster(ctx, req.(*GetAttachedClusterIn)) diff --git a/grpc-interfaces/kloudlite.io/rpc/iam/iam.pb.go b/grpc-interfaces/kloudlite.io/rpc/iam/iam.pb.go index 63f51fe3b..e81e5472c 100644 --- a/grpc-interfaces/kloudlite.io/rpc/iam/iam.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/iam/iam.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc v4.24.4 // source: iam.proto diff --git a/grpc-interfaces/kloudlite.io/rpc/iam/iam_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/iam/iam_grpc.pb.go index 1810941e2..45fd8cee4 100644 --- a/grpc-interfaces/kloudlite.io/rpc/iam/iam_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/iam/iam_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.2.0 // - protoc v4.24.4 // source: iam.proto @@ -18,18 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - IAM_Ping_FullMethodName = "/IAM/Ping" - IAM_Can_FullMethodName = "/IAM/Can" - IAM_ListMembershipsForResource_FullMethodName = "/IAM/ListMembershipsForResource" - IAM_ListMembershipsForUser_FullMethodName = "/IAM/ListMembershipsForUser" - IAM_GetMembership_FullMethodName = "/IAM/GetMembership" - IAM_AddMembership_FullMethodName = "/IAM/AddMembership" - IAM_UpdateMembership_FullMethodName = "/IAM/UpdateMembership" - IAM_RemoveMembership_FullMethodName = "/IAM/RemoveMembership" - IAM_RemoveResource_FullMethodName = "/IAM/RemoveResource" -) - // IAMClient is the client API for IAM 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. @@ -57,7 +45,7 @@ func NewIAMClient(cc grpc.ClientConnInterface) IAMClient { func (c *iAMClient) Ping(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) { out := new(Message) - err := c.cc.Invoke(ctx, IAM_Ping_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/IAM/Ping", in, out, opts...) if err != nil { return nil, err } @@ -66,7 +54,7 @@ func (c *iAMClient) Ping(ctx context.Context, in *Message, opts ...grpc.CallOpti func (c *iAMClient) Can(ctx context.Context, in *CanIn, opts ...grpc.CallOption) (*CanOut, error) { out := new(CanOut) - err := c.cc.Invoke(ctx, IAM_Can_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/IAM/Can", in, out, opts...) if err != nil { return nil, err } @@ -75,7 +63,7 @@ func (c *iAMClient) Can(ctx context.Context, in *CanIn, opts ...grpc.CallOption) func (c *iAMClient) ListMembershipsForResource(ctx context.Context, in *MembershipsForResourceIn, opts ...grpc.CallOption) (*ListMembershipsOut, error) { out := new(ListMembershipsOut) - err := c.cc.Invoke(ctx, IAM_ListMembershipsForResource_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/IAM/ListMembershipsForResource", in, out, opts...) if err != nil { return nil, err } @@ -84,7 +72,7 @@ func (c *iAMClient) ListMembershipsForResource(ctx context.Context, in *Membersh func (c *iAMClient) ListMembershipsForUser(ctx context.Context, in *MembershipsForUserIn, opts ...grpc.CallOption) (*ListMembershipsOut, error) { out := new(ListMembershipsOut) - err := c.cc.Invoke(ctx, IAM_ListMembershipsForUser_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/IAM/ListMembershipsForUser", in, out, opts...) if err != nil { return nil, err } @@ -93,7 +81,7 @@ func (c *iAMClient) ListMembershipsForUser(ctx context.Context, in *MembershipsF func (c *iAMClient) GetMembership(ctx context.Context, in *GetMembershipIn, opts ...grpc.CallOption) (*GetMembershipOut, error) { out := new(GetMembershipOut) - err := c.cc.Invoke(ctx, IAM_GetMembership_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/IAM/GetMembership", in, out, opts...) if err != nil { return nil, err } @@ -102,7 +90,7 @@ func (c *iAMClient) GetMembership(ctx context.Context, in *GetMembershipIn, opts func (c *iAMClient) AddMembership(ctx context.Context, in *AddMembershipIn, opts ...grpc.CallOption) (*AddMembershipOut, error) { out := new(AddMembershipOut) - err := c.cc.Invoke(ctx, IAM_AddMembership_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/IAM/AddMembership", in, out, opts...) if err != nil { return nil, err } @@ -111,7 +99,7 @@ func (c *iAMClient) AddMembership(ctx context.Context, in *AddMembershipIn, opts func (c *iAMClient) UpdateMembership(ctx context.Context, in *UpdateMembershipIn, opts ...grpc.CallOption) (*UpdateMembershipOut, error) { out := new(UpdateMembershipOut) - err := c.cc.Invoke(ctx, IAM_UpdateMembership_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/IAM/UpdateMembership", in, out, opts...) if err != nil { return nil, err } @@ -120,7 +108,7 @@ func (c *iAMClient) UpdateMembership(ctx context.Context, in *UpdateMembershipIn func (c *iAMClient) RemoveMembership(ctx context.Context, in *RemoveMembershipIn, opts ...grpc.CallOption) (*RemoveMembershipOut, error) { out := new(RemoveMembershipOut) - err := c.cc.Invoke(ctx, IAM_RemoveMembership_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/IAM/RemoveMembership", in, out, opts...) if err != nil { return nil, err } @@ -129,7 +117,7 @@ func (c *iAMClient) RemoveMembership(ctx context.Context, in *RemoveMembershipIn func (c *iAMClient) RemoveResource(ctx context.Context, in *RemoveResourceIn, opts ...grpc.CallOption) (*RemoveResourceOut, error) { out := new(RemoveResourceOut) - err := c.cc.Invoke(ctx, IAM_RemoveResource_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/IAM/RemoveResource", in, out, opts...) if err != nil { return nil, err } @@ -208,7 +196,7 @@ func _IAM_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{ } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: IAM_Ping_FullMethodName, + FullMethod: "/IAM/Ping", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(IAMServer).Ping(ctx, req.(*Message)) @@ -226,7 +214,7 @@ func _IAM_Can_Handler(srv interface{}, ctx context.Context, dec func(interface{} } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: IAM_Can_FullMethodName, + FullMethod: "/IAM/Can", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(IAMServer).Can(ctx, req.(*CanIn)) @@ -244,7 +232,7 @@ func _IAM_ListMembershipsForResource_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: IAM_ListMembershipsForResource_FullMethodName, + FullMethod: "/IAM/ListMembershipsForResource", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(IAMServer).ListMembershipsForResource(ctx, req.(*MembershipsForResourceIn)) @@ -262,7 +250,7 @@ func _IAM_ListMembershipsForUser_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: IAM_ListMembershipsForUser_FullMethodName, + FullMethod: "/IAM/ListMembershipsForUser", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(IAMServer).ListMembershipsForUser(ctx, req.(*MembershipsForUserIn)) @@ -280,7 +268,7 @@ func _IAM_GetMembership_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: IAM_GetMembership_FullMethodName, + FullMethod: "/IAM/GetMembership", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(IAMServer).GetMembership(ctx, req.(*GetMembershipIn)) @@ -298,7 +286,7 @@ func _IAM_AddMembership_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: IAM_AddMembership_FullMethodName, + FullMethod: "/IAM/AddMembership", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(IAMServer).AddMembership(ctx, req.(*AddMembershipIn)) @@ -316,7 +304,7 @@ func _IAM_UpdateMembership_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: IAM_UpdateMembership_FullMethodName, + FullMethod: "/IAM/UpdateMembership", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(IAMServer).UpdateMembership(ctx, req.(*UpdateMembershipIn)) @@ -334,7 +322,7 @@ func _IAM_RemoveMembership_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: IAM_RemoveMembership_FullMethodName, + FullMethod: "/IAM/RemoveMembership", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(IAMServer).RemoveMembership(ctx, req.(*RemoveMembershipIn)) @@ -352,7 +340,7 @@ func _IAM_RemoveResource_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: IAM_RemoveResource_FullMethodName, + FullMethod: "/IAM/RemoveResource", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(IAMServer).RemoveResource(ctx, req.(*RemoveResourceIn)) diff --git a/grpc-interfaces/kloudlite.io/rpc/infra/infra.pb.go b/grpc-interfaces/kloudlite.io/rpc/infra/infra.pb.go index 5c02906f5..dfcf371a2 100644 --- a/grpc-interfaces/kloudlite.io/rpc/infra/infra.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/infra/infra.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc v4.24.4 // source: infra.proto @@ -312,6 +312,132 @@ func (x *GetNodepoolOut) GetIACJobNamespace() string { return "" } +type ClusterExistsIn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` + UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"` + UserEmail string `protobuf:"bytes,3,opt,name=userEmail,proto3" json:"userEmail,omitempty"` + AccountName string `protobuf:"bytes,4,opt,name=accountName,proto3" json:"accountName,omitempty"` + ClusterName string `protobuf:"bytes,5,opt,name=clusterName,proto3" json:"clusterName,omitempty"` +} + +func (x *ClusterExistsIn) Reset() { + *x = ClusterExistsIn{} + if protoimpl.UnsafeEnabled { + mi := &file_infra_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterExistsIn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterExistsIn) ProtoMessage() {} + +func (x *ClusterExistsIn) ProtoReflect() protoreflect.Message { + mi := &file_infra_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterExistsIn.ProtoReflect.Descriptor instead. +func (*ClusterExistsIn) Descriptor() ([]byte, []int) { + return file_infra_proto_rawDescGZIP(), []int{4} +} + +func (x *ClusterExistsIn) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *ClusterExistsIn) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + +func (x *ClusterExistsIn) GetUserEmail() string { + if x != nil { + return x.UserEmail + } + return "" +} + +func (x *ClusterExistsIn) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +func (x *ClusterExistsIn) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +type ClusterExistsOut struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` +} + +func (x *ClusterExistsOut) Reset() { + *x = ClusterExistsOut{} + if protoimpl.UnsafeEnabled { + mi := &file_infra_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterExistsOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterExistsOut) ProtoMessage() {} + +func (x *ClusterExistsOut) ProtoReflect() protoreflect.Message { + mi := &file_infra_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterExistsOut.ProtoReflect.Descriptor instead. +func (*ClusterExistsOut) Descriptor() ([]byte, []int) { + return file_infra_proto_rawDescGZIP(), []int{5} +} + +func (x *ClusterExistsOut) GetExists() bool { + if x != nil { + return x.Exists + } + return false +} + var File_infra_proto protoreflect.FileDescriptor var file_infra_proto_rawDesc = []byte{ @@ -355,15 +481,32 @@ var file_infra_proto_rawDesc = []byte{ 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x49, 0x41, 0x43, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x49, 0x41, 0x43, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x32, 0x64, 0x0a, 0x05, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x12, 0x2b, 0x0a, 0x0a, 0x47, 0x65, 0x74, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0d, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x2e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, - 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, - 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x1a, 0x0f, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, - 0x6f, 0x6f, 0x6c, 0x4f, 0x75, 0x74, 0x42, 0x18, 0x5a, 0x16, 0x6b, 0x6c, 0x6f, 0x75, 0x64, 0x6c, - 0x69, 0x74, 0x65, 0x2e, 0x69, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0xa7, 0x01, 0x0a, 0x0f, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, + 0x74, 0x73, 0x49, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, + 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2a, 0x0a, 0x10, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x4f, 0x75, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x32, 0x9a, 0x01, 0x0a, 0x05, 0x49, 0x6e, 0x66, 0x72, 0x61, + 0x12, 0x2b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0d, + 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x1a, 0x0e, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x12, 0x2e, 0x0a, + 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0x0e, 0x2e, 0x47, + 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x1a, 0x0f, 0x2e, 0x47, + 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x70, 0x6f, 0x6f, 0x6c, 0x4f, 0x75, 0x74, 0x12, 0x34, 0x0a, + 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x10, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x49, 0x6e, + 0x1a, 0x11, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, + 0x4f, 0x75, 0x74, 0x42, 0x18, 0x5a, 0x16, 0x6b, 0x6c, 0x6f, 0x75, 0x64, 0x6c, 0x69, 0x74, 0x65, + 0x2e, 0x69, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -378,20 +521,24 @@ func file_infra_proto_rawDescGZIP() []byte { return file_infra_proto_rawDescData } -var file_infra_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_infra_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_infra_proto_goTypes = []interface{}{ - (*GetClusterIn)(nil), // 0: GetClusterIn - (*GetClusterOut)(nil), // 1: GetClusterOut - (*GetNodepoolIn)(nil), // 2: GetNodepoolIn - (*GetNodepoolOut)(nil), // 3: GetNodepoolOut + (*GetClusterIn)(nil), // 0: GetClusterIn + (*GetClusterOut)(nil), // 1: GetClusterOut + (*GetNodepoolIn)(nil), // 2: GetNodepoolIn + (*GetNodepoolOut)(nil), // 3: GetNodepoolOut + (*ClusterExistsIn)(nil), // 4: ClusterExistsIn + (*ClusterExistsOut)(nil), // 5: ClusterExistsOut } var file_infra_proto_depIdxs = []int32{ 0, // 0: Infra.GetCluster:input_type -> GetClusterIn 2, // 1: Infra.GetNodepool:input_type -> GetNodepoolIn - 1, // 2: Infra.GetCluster:output_type -> GetClusterOut - 3, // 3: Infra.GetNodepool:output_type -> GetNodepoolOut - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type + 4, // 2: Infra.ClusterExists:input_type -> ClusterExistsIn + 1, // 3: Infra.GetCluster:output_type -> GetClusterOut + 3, // 4: Infra.GetNodepool:output_type -> GetNodepoolOut + 5, // 5: Infra.ClusterExists:output_type -> ClusterExistsOut + 3, // [3:6] is the sub-list for method output_type + 0, // [0:3] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -451,6 +598,30 @@ func file_infra_proto_init() { return nil } } + file_infra_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterExistsIn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_infra_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterExistsOut); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -458,7 +629,7 @@ func file_infra_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_infra_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/grpc-interfaces/kloudlite.io/rpc/infra/infra_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/infra/infra_grpc.pb.go index b2e347c64..82934340f 100644 --- a/grpc-interfaces/kloudlite.io/rpc/infra/infra_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/infra/infra_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.2.0 // - protoc v4.24.4 // source: infra.proto @@ -18,17 +18,13 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - Infra_GetCluster_FullMethodName = "/Infra/GetCluster" - Infra_GetNodepool_FullMethodName = "/Infra/GetNodepool" -) - // InfraClient is the client API for Infra 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. type InfraClient interface { GetCluster(ctx context.Context, in *GetClusterIn, opts ...grpc.CallOption) (*GetClusterOut, error) GetNodepool(ctx context.Context, in *GetNodepoolIn, opts ...grpc.CallOption) (*GetNodepoolOut, error) + ClusterExists(ctx context.Context, in *ClusterExistsIn, opts ...grpc.CallOption) (*ClusterExistsOut, error) } type infraClient struct { @@ -41,7 +37,7 @@ func NewInfraClient(cc grpc.ClientConnInterface) InfraClient { func (c *infraClient) GetCluster(ctx context.Context, in *GetClusterIn, opts ...grpc.CallOption) (*GetClusterOut, error) { out := new(GetClusterOut) - err := c.cc.Invoke(ctx, Infra_GetCluster_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Infra/GetCluster", in, out, opts...) if err != nil { return nil, err } @@ -50,7 +46,16 @@ func (c *infraClient) GetCluster(ctx context.Context, in *GetClusterIn, opts ... func (c *infraClient) GetNodepool(ctx context.Context, in *GetNodepoolIn, opts ...grpc.CallOption) (*GetNodepoolOut, error) { out := new(GetNodepoolOut) - err := c.cc.Invoke(ctx, Infra_GetNodepool_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/Infra/GetNodepool", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *infraClient) ClusterExists(ctx context.Context, in *ClusterExistsIn, opts ...grpc.CallOption) (*ClusterExistsOut, error) { + out := new(ClusterExistsOut) + err := c.cc.Invoke(ctx, "/Infra/ClusterExists", in, out, opts...) if err != nil { return nil, err } @@ -63,6 +68,7 @@ func (c *infraClient) GetNodepool(ctx context.Context, in *GetNodepoolIn, opts . type InfraServer interface { GetCluster(context.Context, *GetClusterIn) (*GetClusterOut, error) GetNodepool(context.Context, *GetNodepoolIn) (*GetNodepoolOut, error) + ClusterExists(context.Context, *ClusterExistsIn) (*ClusterExistsOut, error) mustEmbedUnimplementedInfraServer() } @@ -76,6 +82,9 @@ func (UnimplementedInfraServer) GetCluster(context.Context, *GetClusterIn) (*Get func (UnimplementedInfraServer) GetNodepool(context.Context, *GetNodepoolIn) (*GetNodepoolOut, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNodepool not implemented") } +func (UnimplementedInfraServer) ClusterExists(context.Context, *ClusterExistsIn) (*ClusterExistsOut, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClusterExists not implemented") +} func (UnimplementedInfraServer) mustEmbedUnimplementedInfraServer() {} // UnsafeInfraServer may be embedded to opt out of forward compatibility for this service. @@ -99,7 +108,7 @@ func _Infra_GetCluster_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Infra_GetCluster_FullMethodName, + FullMethod: "/Infra/GetCluster", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InfraServer).GetCluster(ctx, req.(*GetClusterIn)) @@ -117,7 +126,7 @@ func _Infra_GetNodepool_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Infra_GetNodepool_FullMethodName, + FullMethod: "/Infra/GetNodepool", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InfraServer).GetNodepool(ctx, req.(*GetNodepoolIn)) @@ -125,6 +134,24 @@ func _Infra_GetNodepool_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Infra_ClusterExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClusterExistsIn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfraServer).ClusterExists(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Infra/ClusterExists", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfraServer).ClusterExists(ctx, req.(*ClusterExistsIn)) + } + return interceptor(ctx, in, info, handler) +} + // Infra_ServiceDesc is the grpc.ServiceDesc for Infra service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -140,6 +167,10 @@ var Infra_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetNodepool", Handler: _Infra_GetNodepool_Handler, }, + { + MethodName: "ClusterExists", + Handler: _Infra_ClusterExists_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "infra.proto", diff --git a/grpc-interfaces/kloudlite.io/rpc/jseval/jseval.pb.go b/grpc-interfaces/kloudlite.io/rpc/jseval/jseval.pb.go index 14b49384b..bdaa70343 100644 --- a/grpc-interfaces/kloudlite.io/rpc/jseval/jseval.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/jseval/jseval.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc v4.24.4 // source: jseval.proto diff --git a/grpc-interfaces/kloudlite.io/rpc/jseval/jseval_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/jseval/jseval_grpc.pb.go index 8c2cb8221..f818f1903 100644 --- a/grpc-interfaces/kloudlite.io/rpc/jseval/jseval_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/jseval/jseval_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.2.0 // - protoc v4.24.4 // source: jseval.proto @@ -18,10 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - JSEval_Eval_FullMethodName = "/JSEval/Eval" -) - // JSEvalClient is the client API for JSEval 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. @@ -39,7 +35,7 @@ func NewJSEvalClient(cc grpc.ClientConnInterface) JSEvalClient { func (c *jSEvalClient) Eval(ctx context.Context, in *EvalIn, opts ...grpc.CallOption) (*EvalOut, error) { out := new(EvalOut) - err := c.cc.Invoke(ctx, JSEval_Eval_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/JSEval/Eval", in, out, opts...) if err != nil { return nil, err } @@ -84,7 +80,7 @@ func _JSEval_Eval_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: JSEval_Eval_FullMethodName, + FullMethod: "/JSEval/Eval", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(JSEvalServer).Eval(ctx, req.(*EvalIn)) diff --git a/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal.pb.go b/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal.pb.go index 734e85fd4..c383b612e 100644 --- a/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.32.0 // protoc v4.24.4 // source: message-office-internal.proto diff --git a/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal_grpc.pb.go b/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal_grpc.pb.go index 6ba4302d3..852eff2a4 100644 --- a/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal_grpc.pb.go +++ b/grpc-interfaces/kloudlite.io/rpc/message-office-internal/message-office-internal_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.2.0 // - protoc v4.24.4 // source: message-office-internal.proto @@ -18,10 +18,6 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - MessageOfficeInternal_GenerateClusterToken_FullMethodName = "/MessageOfficeInternal/GenerateClusterToken" -) - // MessageOfficeInternalClient is the client API for MessageOfficeInternal 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. @@ -39,7 +35,7 @@ func NewMessageOfficeInternalClient(cc grpc.ClientConnInterface) MessageOfficeIn func (c *messageOfficeInternalClient) GenerateClusterToken(ctx context.Context, in *GenerateClusterTokenIn, opts ...grpc.CallOption) (*GenerateClusterTokenOut, error) { out := new(GenerateClusterTokenOut) - err := c.cc.Invoke(ctx, MessageOfficeInternal_GenerateClusterToken_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/MessageOfficeInternal/GenerateClusterToken", in, out, opts...) if err != nil { return nil, err } @@ -84,7 +80,7 @@ func _MessageOfficeInternal_GenerateClusterToken_Handler(srv interface{}, ctx co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: MessageOfficeInternal_GenerateClusterToken_FullMethodName, + FullMethod: "/MessageOfficeInternal/GenerateClusterToken", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MessageOfficeInternalServer).GenerateClusterToken(ctx, req.(*GenerateClusterTokenIn)) From 682738f1bea1ed967d9bd319e58d1219b53610ae Mon Sep 17 00:00:00 2001 From: nxtcoder17 Date: Thu, 8 Feb 2024 20:11:38 +0530 Subject: [PATCH 2/2] fix(apps/infra): clusterExists GRPC implementation --- apps/infra/internal/app/grpc-server.go | 4 ++++ apps/infra/internal/domain/clusters.go | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/infra/internal/app/grpc-server.go b/apps/infra/internal/app/grpc-server.go index 39aa8c05a..3ef9e636c 100644 --- a/apps/infra/internal/app/grpc-server.go +++ b/apps/infra/internal/app/grpc-server.go @@ -96,8 +96,12 @@ func (g *grpcServer) ClusterExists(ctx context.Context, in *infra.ClusterExistsI } cluster, err := g.d.GetCluster(infraCtx, in.ClusterName) if err != nil { + if !errors.Is(err, domain.ErrClusterNotFound) { + return &infra.ClusterExistsOut{Exists: false}, nil + } return nil, errors.NewE(err) } + if cluster == nil { return &infra.ClusterExistsOut{Exists: false}, nil } diff --git a/apps/infra/internal/domain/clusters.go b/apps/infra/internal/domain/clusters.go index 325688c4a..5b9d1801b 100644 --- a/apps/infra/internal/domain/clusters.go +++ b/apps/infra/internal/domain/clusters.go @@ -35,6 +35,8 @@ type ErrClusterAlreadyExists struct { AccountName string } +var ErrClusterNotFound error = fmt.Errorf("cluster not found") + func (e ErrClusterAlreadyExists) Error() string { return fmt.Sprintf("cluster with name %q already exists for account: %s", e.ClusterName, e.AccountName) } @@ -504,7 +506,7 @@ func (d *domain) findCluster(ctx InfraContext, clusterName string) (*entities.Cl } if cluster == nil { - return nil, errors.Newf("cluster with name %q not found", clusterName) + return nil, ErrClusterNotFound } return cluster, nil }