From cdd7ffdd3ae5960734584d7d24c0c1577c4d5815 Mon Sep 17 00:00:00 2001 From: jannfis Date: Fri, 31 Jan 2020 23:17:46 +0100 Subject: [PATCH 1/5] Deprecate ambiguous API methods in ApplicationService --- assets/swagger.json | 60 +- cmd/argocd/commands/app.go | 32 +- pkg/apiclient/application/application.pb.go | 669 ++++++++++++++---- .../application/application.pb.gw.go | 554 +++++++++++++++ .../application/forwarder_overwrite.go | 4 +- server/application/application.go | 78 +- server/application/application.proto | 81 ++- 7 files changed, 1268 insertions(+), 210 deletions(-) diff --git a/assets/swagger.json b/assets/swagger.json index 543e639a3e445..819de1fa766f8 100644 --- a/assets/swagger.json +++ b/assets/swagger.json @@ -84,8 +84,8 @@ "tags": [ "ApplicationService" ], - "summary": "List returns list of applications", - "operationId": "List", + "summary": "ListApplications returns list of applications", + "operationId": "ListApplications", "parameters": [ { "type": "string", @@ -134,8 +134,8 @@ "tags": [ "ApplicationService" ], - "summary": "Create creates an application", - "operationId": "Create", + "summary": "CreateApplication creates an application", + "operationId": "CreateApplication", "parameters": [ { "name": "body", @@ -161,8 +161,8 @@ "tags": [ "ApplicationService" ], - "summary": "Update updates an application", - "operationId": "Update", + "summary": "UpdateApplication updates an application", + "operationId": "UpdateApplication", "parameters": [ { "type": "string", @@ -292,8 +292,8 @@ "tags": [ "ApplicationService" ], - "summary": "Get returns an application by name", - "operationId": "Get", + "summary": "GetApplication returns an application by name", + "operationId": "GetApplication", "parameters": [ { "type": "string", @@ -342,8 +342,8 @@ "tags": [ "ApplicationService" ], - "summary": "Delete deletes an application", - "operationId": "Delete", + "summary": "DeleteApplication deletes an application", + "operationId": "DeleteApplication", "parameters": [ { "type": "string", @@ -366,7 +366,7 @@ "ApplicationService" ], "summary": "Patch patch an application", - "operationId": "Patch", + "operationId": "PatchApplication", "parameters": [ { "type": "string", @@ -780,8 +780,8 @@ "tags": [ "ApplicationService" ], - "summary": "Rollback syncs an application to its target state", - "operationId": "Rollback", + "summary": "RollbackApplication syncs an application to its target state", + "operationId": "RollbackApplication", "parameters": [ { "type": "string", @@ -846,8 +846,8 @@ "tags": [ "ApplicationService" ], - "summary": "Sync syncs an application to its target state", - "operationId": "Sync", + "summary": "SyncApplication syncs an application to its target state", + "operationId": "SyncApplication", "parameters": [ { "type": "string", @@ -982,7 +982,7 @@ "ClusterService" ], "summary": "List returns list of clusters", - "operationId": "ListMixin3", + "operationId": "List", "parameters": [ { "type": "string", @@ -1004,7 +1004,7 @@ "ClusterService" ], "summary": "Create creates a cluster", - "operationId": "CreateMixin3", + "operationId": "Create", "parameters": [ { "name": "body", @@ -1031,7 +1031,7 @@ "ClusterService" ], "summary": "Update updates a cluster", - "operationId": "UpdateMixin3", + "operationId": "Update", "parameters": [ { "type": "string", @@ -1064,7 +1064,7 @@ "ClusterService" ], "summary": "Get returns a cluster by server address", - "operationId": "GetMixin3", + "operationId": "Get", "parameters": [ { "type": "string", @@ -1087,7 +1087,7 @@ "ClusterService" ], "summary": "Delete deletes a cluster", - "operationId": "DeleteMixin3", + "operationId": "Delete", "parameters": [ { "type": "string", @@ -1137,7 +1137,7 @@ "ProjectService" ], "summary": "List returns list of projects", - "operationId": "ListMixin4", + "operationId": "ListMixin5", "parameters": [ { "type": "string", @@ -1159,7 +1159,7 @@ "ProjectService" ], "summary": "Create a new project.", - "operationId": "CreateMixin4", + "operationId": "CreateMixin5", "parameters": [ { "name": "body", @@ -1186,7 +1186,7 @@ "ProjectService" ], "summary": "Get returns a project by name", - "operationId": "GetMixin4", + "operationId": "GetMixin5", "parameters": [ { "type": "string", @@ -1209,7 +1209,7 @@ "ProjectService" ], "summary": "Delete deletes a project", - "operationId": "DeleteMixin4", + "operationId": "DeleteMixin5", "parameters": [ { "type": "string", @@ -1284,7 +1284,7 @@ "ProjectService" ], "summary": "Update updates a project", - "operationId": "UpdateMixin4", + "operationId": "UpdateMixin5", "parameters": [ { "type": "string", @@ -1744,7 +1744,7 @@ "SessionService" ], "summary": "Create a new JWT for authentication and set a cookie if using HTTP.", - "operationId": "CreateMixin7", + "operationId": "CreateMixin10", "parameters": [ { "name": "body", @@ -1769,7 +1769,7 @@ "SessionService" ], "summary": "Delete an existing JWT cookie if using HTTP.", - "operationId": "DeleteMixin7", + "operationId": "DeleteMixin10", "responses": { "200": { "description": "(empty)", @@ -1803,7 +1803,7 @@ "SettingsService" ], "summary": "Get returns Argo CD settings", - "operationId": "GetMixin9", + "operationId": "GetMixin7", "responses": { "200": { "description": "(empty)", @@ -1819,8 +1819,8 @@ "tags": [ "ApplicationService" ], - "summary": "Watch returns stream of application change events.", - "operationId": "Watch", + "summary": "WatchApplications returns stream of application change events.", + "operationId": "WatchApplications", "parameters": [ { "type": "string", diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index c78be09b7d3c1..9ef6afc6a3a88 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -176,7 +176,7 @@ func NewApplicationCreateCommand(clientOpts *argocdclient.ClientOptions) *cobra. Application: app, Upsert: &upsert, } - created, err := appIf.Create(context.Background(), &appCreateRequest) + created, err := appIf.CreateApplication(context.Background(), &appCreateRequest) errors.CheckError(err) fmt.Printf("application '%s' created\n", created.ObjectMeta.Name) }, @@ -235,7 +235,7 @@ func NewApplicationGetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Com conn, appIf := acdClient.NewApplicationClientOrDie() defer util.Close(conn) appName := args[0] - app, err := appIf.Get(context.Background(), &applicationpkg.ApplicationQuery{Name: &appName, Refresh: getRefreshType(refresh, hardRefresh)}) + app, err := appIf.GetApplication(context.Background(), &applicationpkg.ApplicationQuery{Name: &appName, Refresh: getRefreshType(refresh, hardRefresh)}) errors.CheckError(err) pConn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() @@ -450,7 +450,7 @@ func NewApplicationSetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Com argocdClient := argocdclient.NewClientOrDie(clientOpts) conn, appIf := argocdClient.NewApplicationClientOrDie() defer util.Close(conn) - app, err := appIf.Get(ctx, &applicationpkg.ApplicationQuery{Name: &appName}) + app, err := appIf.GetApplication(ctx, &applicationpkg.ApplicationQuery{Name: &appName}) errors.CheckError(err) visited := setAppSpecOptions(c.Flags(), &app.Spec, &appOpts) if visited == 0 { @@ -722,7 +722,7 @@ func NewApplicationUnsetCommand(clientOpts *argocdclient.ClientOptions) *cobra.C appName := args[0] conn, appIf := argocdclient.NewClientOrDie(clientOpts).NewApplicationClientOrDie() defer util.Close(conn) - app, err := appIf.Get(context.Background(), &applicationpkg.ApplicationQuery{Name: &appName}) + app, err := appIf.GetApplication(context.Background(), &applicationpkg.ApplicationQuery{Name: &appName}) errors.CheckError(err) updated := false @@ -886,7 +886,7 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co conn, appIf := clientset.NewApplicationClientOrDie() defer util.Close(conn) appName := args[0] - app, err := appIf.Get(context.Background(), &applicationpkg.ApplicationQuery{Name: &appName, Refresh: getRefreshType(refresh, hardRefresh)}) + app, err := appIf.GetApplication(context.Background(), &applicationpkg.ApplicationQuery{Name: &appName, Refresh: getRefreshType(refresh, hardRefresh)}) errors.CheckError(err) resources, err := appIf.ManagedResources(context.Background(), &applicationpkg.ResourcesQuery{ApplicationName: &appName}) errors.CheckError(err) @@ -1040,7 +1040,7 @@ func NewApplicationDeleteCommand(clientOpts *argocdclient.ClientOptions) *cobra. if c.Flag("cascade").Changed { appDeleteReq.Cascade = &cascade } - _, err := appIf.Delete(context.Background(), &appDeleteReq) + _, err := appIf.DeleteApplication(context.Background(), &appDeleteReq) errors.CheckError(err) } }, @@ -1105,7 +1105,7 @@ func NewApplicationListCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co Run: func(c *cobra.Command, args []string) { conn, appIf := argocdclient.NewClientOrDie(clientOpts).NewApplicationClientOrDie() defer util.Close(conn) - apps, err := appIf.List(context.Background(), &applicationpkg.ApplicationQuery{Selector: selector}) + apps, err := appIf.ListApplications(context.Background(), &applicationpkg.ApplicationQuery{Selector: selector}) errors.CheckError(err) appList := apps.Items if len(projects) != 0 { @@ -1230,7 +1230,7 @@ func NewApplicationWaitCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co closer, appIf := acdClient.NewApplicationClientOrDie() defer util.Close(closer) if selector != "" { - list, err := appIf.List(context.Background(), &applicationpkg.ApplicationQuery{Selector: selector}) + list, err := appIf.ListApplications(context.Background(), &applicationpkg.ApplicationQuery{Selector: selector}) errors.CheckError(err) for _, i := range list.Items { appNames = append(appNames, i.Name) @@ -1305,7 +1305,7 @@ func NewApplicationSyncCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co appNames := args if selector != "" { - list, err := appIf.List(context.Background(), &applicationpkg.ApplicationQuery{Selector: selector}) + list, err := appIf.ListApplications(context.Background(), &applicationpkg.ApplicationQuery{Selector: selector}) errors.CheckError(err) // unlike list, we'd want to fail if nothing was found if len(list.Items) == 0 { @@ -1354,7 +1354,7 @@ func NewApplicationSyncCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co var localObjsStrings []string if local != "" { - app, err := appIf.Get(context.Background(), &applicationpkg.ApplicationQuery{Name: &appName}) + app, err := appIf.GetApplication(context.Background(), &applicationpkg.ApplicationQuery{Name: &appName}) errors.CheckError(err) if app.Spec.SyncPolicy != nil && app.Spec.SyncPolicy.Automated != nil { log.Fatal("Cannot use local sync when Automatic Sync Policy is enabled") @@ -1393,7 +1393,7 @@ func NewApplicationSyncCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co log.Fatalf("Unknown sync strategy: '%s'", strategy) } ctx := context.Background() - _, err := appIf.Sync(ctx, &syncReq) + _, err := appIf.SyncApplication(ctx, &syncReq) errors.CheckError(err) if !async { @@ -1764,7 +1764,7 @@ func NewApplicationHistoryCommand(clientOpts *argocdclient.ClientOptions) *cobra conn, appIf := argocdclient.NewClientOrDie(clientOpts).NewApplicationClientOrDie() defer util.Close(conn) appName := args[0] - app, err := appIf.Get(context.Background(), &applicationpkg.ApplicationQuery{Name: &appName}) + app, err := appIf.GetApplication(context.Background(), &applicationpkg.ApplicationQuery{Name: &appName}) errors.CheckError(err) if output == "id" { printApplicationHistoryIds(app.Status.History) @@ -1798,7 +1798,7 @@ func NewApplicationRollbackCommand(clientOpts *argocdclient.ClientOptions) *cobr conn, appIf := acdClient.NewApplicationClientOrDie() defer util.Close(conn) ctx := context.Background() - app, err := appIf.Get(ctx, &applicationpkg.ApplicationQuery{Name: &appName}) + app, err := appIf.GetApplication(ctx, &applicationpkg.ApplicationQuery{Name: &appName}) errors.CheckError(err) var depInfo *argoappv1.RevisionHistory for _, di := range app.Status.History { @@ -1811,7 +1811,7 @@ func NewApplicationRollbackCommand(clientOpts *argocdclient.ClientOptions) *cobr log.Fatalf("Application '%s' does not have deployment id '%d' in history\n", app.ObjectMeta.Name, depID) } - _, err = appIf.Rollback(ctx, &applicationpkg.ApplicationRollbackRequest{ + _, err = appIf.RollbackApplication(ctx, &applicationpkg.ApplicationRollbackRequest{ Name: &appName, ID: int64(depID), Prune: prune, @@ -1949,7 +1949,7 @@ func NewApplicationEditCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co appName := args[0] conn, appIf := argocdclient.NewClientOrDie(clientOpts).NewApplicationClientOrDie() defer util.Close(conn) - app, err := appIf.Get(context.Background(), &applicationpkg.ApplicationQuery{Name: &appName}) + app, err := appIf.GetApplication(context.Background(), &applicationpkg.ApplicationQuery{Name: &appName}) errors.CheckError(err) appData, err := json.Marshal(app.Spec) errors.CheckError(err) @@ -1999,7 +1999,7 @@ func NewApplicationPatchCommand(clientOpts *argocdclient.ClientOptions) *cobra.C conn, appIf := argocdclient.NewClientOrDie(clientOpts).NewApplicationClientOrDie() defer util.Close(conn) - patchedApp, err := appIf.Patch(context.Background(), &applicationpkg.ApplicationPatchRequest{ + patchedApp, err := appIf.PatchApplication(context.Background(), &applicationpkg.ApplicationPatchRequest{ Name: &appName, Patch: patch, PatchType: patchType, diff --git a/pkg/apiclient/application/application.pb.go b/pkg/apiclient/application/application.pb.go index df2c11048e8c4..dab6558076d09 100644 --- a/pkg/apiclient/application/application.pb.go +++ b/pkg/apiclient/application/application.pb.go @@ -1858,136 +1858,145 @@ func init() { } var fileDescriptor_df6e82b174b5eaec = []byte{ - // 2059 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcd, 0x8f, 0x1c, 0x47, - 0x15, 0xa7, 0x66, 0x76, 0x77, 0x66, 0xdf, 0x3a, 0xb1, 0x53, 0x89, 0x4d, 0xa7, 0x3d, 0x5e, 0x8f, - 0xca, 0x5f, 0xeb, 0xb5, 0xb7, 0xc7, 0xbb, 0x18, 0x08, 0x0b, 0x52, 0xf0, 0xc6, 0x66, 0x6d, 0x58, - 0x9b, 0x65, 0xd6, 0x21, 0x12, 0x12, 0x42, 0x9d, 0xee, 0xda, 0xd9, 0x66, 0x67, 0xba, 0x9b, 0xee, - 0x9e, 0xb1, 0x06, 0xcb, 0x87, 0x04, 0x84, 0x38, 0x20, 0x10, 0x82, 0x43, 0x40, 0x7c, 0x29, 0x5c, - 0xb9, 0x21, 0x2e, 0x1c, 0xb8, 0x81, 0x72, 0x44, 0x24, 0x67, 0x0b, 0xad, 0xf8, 0x03, 0x38, 0x71, - 0x46, 0x55, 0x5d, 0xd5, 0x5d, 0x35, 0xee, 0xe9, 0x19, 0xc7, 0x93, 0x83, 0x6f, 0x53, 0xaf, 0xaa, - 0xdf, 0xfb, 0xbd, 0x8f, 0xfa, 0x55, 0xd5, 0x1b, 0x38, 0x1f, 0xd3, 0x68, 0x40, 0xa3, 0x96, 0x1d, - 0x86, 0x5d, 0xcf, 0xb1, 0x13, 0x2f, 0xf0, 0xd5, 0xdf, 0x56, 0x18, 0x05, 0x49, 0x80, 0x97, 0x14, - 0x91, 0xf9, 0x4a, 0x27, 0xe8, 0x04, 0x5c, 0xde, 0x62, 0xbf, 0xd2, 0x25, 0x66, 0xa3, 0x13, 0x04, - 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b7, 0x77, 0x10, 0xd4, 0x44, 0xe7, 0xaa, - 0xe4, 0x54, 0x55, 0x5a, 0x5b, 0xe6, 0x49, 0x6d, 0x95, 0xec, 0xdc, 0x90, 0xcf, 0x73, 0xb3, 0xeb, - 0xb8, 0x55, 0x66, 0x36, 0x0c, 0xdc, 0xb8, 0xf5, 0x50, 0xb4, 0xb4, 0x1e, 0xb5, 0xba, 0x41, 0x27, - 0xbe, 0x86, 0xb6, 0xde, 0xf8, 0xe0, 0x68, 0x19, 0xfd, 0xf3, 0x68, 0x19, 0xfd, 0xfb, 0x68, 0x19, - 0x7d, 0xeb, 0xb3, 0x53, 0xfc, 0x93, 0xee, 0x74, 0x3d, 0xea, 0x27, 0xaa, 0x89, 0xff, 0x07, 0x00, - 0x00, 0xff, 0xff, 0xd2, 0x0f, 0x21, 0x57, 0x42, 0x20, 0x00, 0x00, + // 2207 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5a, 0x4d, 0x6c, 0x1c, 0x49, + 0x15, 0xa6, 0x66, 0x6c, 0xcf, 0xf8, 0x39, 0x9b, 0xc4, 0x95, 0x4d, 0xe8, 0xed, 0x38, 0xce, 0xa8, + 0x92, 0x38, 0x8e, 0x13, 0x77, 0xc7, 0x26, 0xc0, 0x62, 0x90, 0x96, 0x64, 0x13, 0x9c, 0x80, 0x13, + 0xcc, 0x38, 0xcb, 0x4a, 0x48, 0x08, 0xf5, 0x76, 0x97, 0xc7, 0x8d, 0x67, 0xba, 0x9b, 0xee, 0x9e, + 0x89, 0x86, 0x28, 0x87, 0x5d, 0x56, 0x68, 0x0f, 0x08, 0xc4, 0xcf, 0x61, 0x81, 0x15, 0x42, 0xbb, + 0x42, 0x42, 0x5a, 0x21, 0x0e, 0x08, 0x21, 0x71, 0xe3, 0x00, 0x5a, 0x6e, 0x08, 0xf6, 0x1c, 0x21, + 0x8b, 0x23, 0x07, 0x4e, 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0xa6, 0x61, 0x17, 0x63, 0x98, 0xf0, 0xac, + 0x16, 0xd5, 0x50, 0x0d, 0x2d, 0x4e, 0xd7, 0xf9, 0x6f, 0xac, 0x41, 0x25, 0xa4, 0xdb, 0x21, 0x8d, + 0x76, 0xb4, 0x12, 0x27, 0xcb, 0x4f, 0xbc, 0x00, 0x15, 0x26, 0x99, 0xda, 0xb1, 0x56, 0xae, 0x95, + 0x17, 0xa7, 0x6f, 0x1c, 0xd9, 0x7b, 0x7c, 0xb6, 0xba, 0x99, 0x90, 0xa2, 0xba, 0x1c, 0xc4, 0x06, + 0x1c, 0x0b, 0x69, 0xe4, 0xb7, 0x43, 0x9b, 0x7e, 0x95, 0x86, 0x91, 0xeb, 0x7b, 0xda, 0x04, 0xe3, + 0x74, 0x63, 0xe2, 0x83, 0xc7, 0x67, 0x3f, 0x56, 0xef, 0x1d, 0xc4, 0x35, 0xa8, 0x46, 0xb4, 0x49, + 0xed, 0xd8, 0x0f, 0xb5, 0x49, 0x65, 0x62, 0x4a, 0x25, 0xeb, 0x70, 0xb2, 0x4e, 0x3b, 0x2e, 0x9b, + 0x7d, 0x97, 0xc6, 0x96, 0x63, 0xc5, 0x56, 0xaf, 0x02, 0xa5, 0x54, 0x01, 0x1d, 0xaa, 0xa1, 0x98, + 0xac, 0x95, 0x38, 0x3d, 0xfd, 0x66, 0x56, 0x98, 0x57, 0xac, 0x50, 0x17, 0x48, 0x6e, 0x75, 0xa8, + 0x17, 0x47, 0x83, 0x59, 0xae, 0xc2, 0xac, 0x04, 0x7d, 0xcf, 0x6a, 0xd1, 0x28, 0xb0, 0x6c, 0x9a, + 0xf0, 0x16, 0x50, 0xf7, 0x0f, 0xe3, 0x45, 0x38, 0xa2, 0x12, 0xb5, 0xb2, 0x32, 0x3d, 0x37, 0x82, + 0x17, 0x60, 0x46, 0x7e, 0xbf, 0x72, 0xe7, 0xa6, 0x36, 0xa1, 0x4c, 0x54, 0x07, 0xc8, 0x26, 0x68, + 0x0a, 0xf6, 0xbb, 0x96, 0xe7, 0x6e, 0xd3, 0x28, 0x1e, 0x8c, 0xba, 0x96, 0x33, 0x84, 0x62, 0xd7, + 0xd4, 0x1c, 0x27, 0xe1, 0x44, 0xde, 0x1a, 0x81, 0xef, 0x45, 0x94, 0xbc, 0x8b, 0x72, 0x92, 0x5e, + 0x0e, 0xa9, 0x15, 0xd3, 0x3a, 0xfd, 0x56, 0x9b, 0x46, 0x31, 0xf6, 0x40, 0xdd, 0x74, 0x5c, 0xe0, + 0xcc, 0xea, 0x17, 0x8c, 0x2c, 0x44, 0x0d, 0x19, 0xa2, 0xfc, 0xc7, 0x37, 0x6c, 0xc7, 0x08, 0x76, + 0x1b, 0x06, 0x8b, 0x76, 0x43, 0xdd, 0xc0, 0x32, 0xda, 0x0d, 0x45, 0x92, 0xd4, 0x5a, 0x99, 0x87, + 0x4f, 0xc1, 0x54, 0x3b, 0x88, 0x68, 0x18, 0x73, 0x1d, 0xaa, 0x75, 0xf1, 0x45, 0xde, 0xcc, 0x83, + 0x7c, 0x25, 0x70, 0x14, 0x90, 0x3b, 0x4f, 0x11, 0x64, 0x0e, 0x1e, 0xb9, 0x9d, 0x43, 0x71, 0x93, + 0x36, 0x69, 0x86, 0xa2, 0x9f, 0x53, 0x34, 0xa8, 0xd8, 0x56, 0x64, 0x5b, 0x0e, 0x15, 0xfa, 0xc8, + 0x4f, 0xf2, 0x7a, 0x19, 0x4e, 0x29, 0xac, 0xb6, 0xba, 0x9e, 0x5d, 0xc4, 0x68, 0xa8, 0x77, 0xf1, + 0x1c, 0x4c, 0x39, 0x61, 0xb7, 0xde, 0xf6, 0xb4, 0x32, 0x93, 0x24, 0xc6, 0x05, 0x0d, 0xeb, 0x30, + 0x19, 0x84, 0x6d, 0x8f, 0xf2, 0xbd, 0x29, 0x07, 0x13, 0x12, 0xb6, 0xa1, 0x1a, 0xc5, 0x2c, 0x03, + 0x35, 0xba, 0x7c, 0x47, 0xce, 0xac, 0xae, 0x3f, 0x81, 0xed, 0x98, 0x26, 0x5b, 0x82, 0x5d, 0x3d, + 0x65, 0x8c, 0x63, 0x98, 0x96, 0xd1, 0x1d, 0x69, 0x95, 0x5a, 0x79, 0x71, 0x66, 0x75, 0xf3, 0x09, + 0xa5, 0x7c, 0x39, 0x60, 0x79, 0x53, 0xd9, 0xd8, 0x42, 0xad, 0x4c, 0x10, 0x9e, 0x83, 0xe9, 0x96, + 0xd8, 0x39, 0x91, 0x56, 0x65, 0x69, 0xac, 0x9e, 0x11, 0xc8, 0xdb, 0x08, 0xe6, 0xf6, 0x05, 0xd5, + 0x56, 0x40, 0x0b, 0x3d, 0xe1, 0xc0, 0x44, 0x14, 0x50, 0x9b, 0x27, 0x84, 0x99, 0xd5, 0x2f, 0x8e, + 0x27, 0xca, 0x98, 0x50, 0x81, 0x9e, 0x73, 0x27, 0x2d, 0xf8, 0xb8, 0x32, 0xbc, 0x69, 0xc5, 0xf6, + 0x4e, 0x11, 0x28, 0xe6, 0x5e, 0x36, 0x27, 0x97, 0xa6, 0x12, 0x12, 0x26, 0x30, 0xcd, 0x7f, 0xdc, + 0xef, 0x06, 0xf9, 0xbc, 0x94, 0x91, 0xc9, 0x77, 0x11, 0xe8, 0x6a, 0xd0, 0xfb, 0xcd, 0xe6, 0x6b, + 0x96, 0xbd, 0x5b, 0x2c, 0xb2, 0xe4, 0x3a, 0x5c, 0x5e, 0xf9, 0x06, 0x30, 0x7e, 0x7b, 0x8f, 0xcf, + 0x96, 0xee, 0xdc, 0xac, 0x97, 0x5c, 0xe7, 0xa3, 0xc7, 0x22, 0xf9, 0xb0, 0x07, 0x88, 0xf0, 0x64, + 0x11, 0x10, 0x02, 0xd3, 0x5e, 0xdf, 0x34, 0x9d, 0x91, 0x0f, 0x90, 0x9e, 0xe7, 0xa1, 0xd2, 0x49, + 0xcb, 0x58, 0x36, 0x49, 0x12, 0x19, 0xf8, 0x46, 0xe8, 0xb7, 0x03, 0x6d, 0x52, 0xb5, 0x34, 0x27, + 0x61, 0x0d, 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b, 0xe0, 0x1f, 0x20, 0x38, 0x2a, 0x6b, 0xae, 0xf0, + 0xee, 0xf2, 0x30, 0xc3, 0x1d, 0xb4, 0x46, 0x8b, 0x70, 0x5b, 0x1a, 0x2d, 0xdc, 0x5e, 0x47, 0x50, + 0x11, 0x4f, 0x1a, 0x05, 0xa7, 0x29, 0xe5, 0xcd, 0x43, 0x3f, 0x99, 0x9b, 0x25, 0x5b, 0xfa, 0xe4, + 0xd3, 0x5c, 0xec, 0x0a, 0x36, 0x8b, 0xc4, 0x06, 0xbe, 0x13, 0x99, 0x0f, 0xc5, 0x5b, 0xc7, 0x23, + 0xb3, 0xe9, 0x37, 0xa2, 0xab, 0xe8, 0xc6, 0xcb, 0x1f, 0xec, 0xcd, 0xa3, 0xbf, 0xed, 0xcd, 0xa3, + 0x7f, 0xee, 0xcd, 0xa3, 0xaf, 0x7d, 0x72, 0x84, 0xbf, 0x58, 0xd9, 0x4d, 0x97, 0x7a, 0xb1, 0x2a, + 0xe2, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x11, 0x35, 0xc2, 0x9e, 0x5b, 0x26, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2002,16 +2011,24 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ApplicationServiceClient interface { - // List returns list of applications + // DEPRECATED: List returns list of applications List(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (*v1alpha1.ApplicationList, error) + // ListApplications returns list of applications + ListApplications(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (*v1alpha1.ApplicationList, error) // ListResourceEvents returns a list of event resources ListResourceEvents(ctx context.Context, in *ApplicationResourceEventsQuery, opts ...grpc.CallOption) (*v11.EventList, error) // Watch returns stream of application change events. Watch(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (ApplicationService_WatchClient, error) + // WatchApplications returns stream of application change events. + WatchApplications(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (ApplicationService_WatchApplicationsClient, error) // Create creates an application Create(ctx context.Context, in *ApplicationCreateRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) + // CreateApplication creates an application + CreateApplication(ctx context.Context, in *ApplicationCreateRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) // Get returns an application by name Get(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (*v1alpha1.Application, error) + // GetApplication returns an application by name + GetApplication(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (*v1alpha1.Application, error) // Get returns an application by name GetApplicationSyncWindows(ctx context.Context, in *ApplicationSyncWindowsQuery, opts ...grpc.CallOption) (*ApplicationSyncWindowsResponse, error) // Get the meta-data (author, date, tags, message) for a specific revision of the application @@ -2020,18 +2037,28 @@ type ApplicationServiceClient interface { GetManifests(ctx context.Context, in *ApplicationManifestQuery, opts ...grpc.CallOption) (*apiclient.ManifestResponse, error) // Update updates an application Update(ctx context.Context, in *ApplicationUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) + // UpdateApplication updates an application + UpdateApplication(ctx context.Context, in *ApplicationUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) // UpdateSpec updates an application spec UpdateSpec(ctx context.Context, in *ApplicationUpdateSpecRequest, opts ...grpc.CallOption) (*v1alpha1.ApplicationSpec, error) - // Patch patch an application + // DEPRECATED: Patch patch an application Patch(ctx context.Context, in *ApplicationPatchRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) - // Delete deletes an application + // Patch patch an application + PatchApplication(ctx context.Context, in *ApplicationPatchRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) + // DEPRECATED: Delete deletes an application Delete(ctx context.Context, in *ApplicationDeleteRequest, opts ...grpc.CallOption) (*ApplicationResponse, error) - // Sync syncs an application to its target state + // DeleteApplication deletes an application + DeleteApplication(ctx context.Context, in *ApplicationDeleteRequest, opts ...grpc.CallOption) (*ApplicationResponse, error) + // DEPRECATED: Sync syncs an application to its target state Sync(ctx context.Context, in *ApplicationSyncRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) + // SyncApplication syncs an application to its target state + SyncApplication(ctx context.Context, in *ApplicationSyncRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) ManagedResources(ctx context.Context, in *ResourcesQuery, opts ...grpc.CallOption) (*ManagedResourcesResponse, error) ResourceTree(ctx context.Context, in *ResourcesQuery, opts ...grpc.CallOption) (*v1alpha1.ApplicationTree, error) - // Rollback syncs an application to its target state + // DEPRECATED: Rollback syncs an application to its target state Rollback(ctx context.Context, in *ApplicationRollbackRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) + // RollbackApplication syncs an application to its target state + RollbackApplication(ctx context.Context, in *ApplicationRollbackRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) // TerminateOperation terminates the currently running operation TerminateOperation(ctx context.Context, in *OperationTerminateRequest, opts ...grpc.CallOption) (*OperationTerminateResponse, error) // GetResource returns single application resource @@ -2054,6 +2081,7 @@ func NewApplicationServiceClient(cc *grpc.ClientConn) ApplicationServiceClient { return &applicationServiceClient{cc} } +// Deprecated: Do not use. func (c *applicationServiceClient) List(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (*v1alpha1.ApplicationList, error) { out := new(v1alpha1.ApplicationList) err := c.cc.Invoke(ctx, "/application.ApplicationService/List", in, out, opts...) @@ -2063,6 +2091,15 @@ func (c *applicationServiceClient) List(ctx context.Context, in *ApplicationQuer return out, nil } +func (c *applicationServiceClient) ListApplications(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (*v1alpha1.ApplicationList, error) { + out := new(v1alpha1.ApplicationList) + err := c.cc.Invoke(ctx, "/application.ApplicationService/ListApplications", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *applicationServiceClient) ListResourceEvents(ctx context.Context, in *ApplicationResourceEventsQuery, opts ...grpc.CallOption) (*v11.EventList, error) { out := new(v11.EventList) err := c.cc.Invoke(ctx, "/application.ApplicationService/ListResourceEvents", in, out, opts...) @@ -2072,6 +2109,7 @@ func (c *applicationServiceClient) ListResourceEvents(ctx context.Context, in *A return out, nil } +// Deprecated: Do not use. func (c *applicationServiceClient) Watch(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (ApplicationService_WatchClient, error) { stream, err := c.cc.NewStream(ctx, &_ApplicationService_serviceDesc.Streams[0], "/application.ApplicationService/Watch", opts...) if err != nil { @@ -2104,6 +2142,39 @@ func (x *applicationServiceWatchClient) Recv() (*v1alpha1.ApplicationWatchEvent, return m, nil } +func (c *applicationServiceClient) WatchApplications(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (ApplicationService_WatchApplicationsClient, error) { + stream, err := c.cc.NewStream(ctx, &_ApplicationService_serviceDesc.Streams[1], "/application.ApplicationService/WatchApplications", opts...) + if err != nil { + return nil, err + } + x := &applicationServiceWatchApplicationsClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ApplicationService_WatchApplicationsClient interface { + Recv() (*v1alpha1.ApplicationWatchEvent, error) + grpc.ClientStream +} + +type applicationServiceWatchApplicationsClient struct { + grpc.ClientStream +} + +func (x *applicationServiceWatchApplicationsClient) Recv() (*v1alpha1.ApplicationWatchEvent, error) { + m := new(v1alpha1.ApplicationWatchEvent) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// Deprecated: Do not use. func (c *applicationServiceClient) Create(ctx context.Context, in *ApplicationCreateRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) { out := new(v1alpha1.Application) err := c.cc.Invoke(ctx, "/application.ApplicationService/Create", in, out, opts...) @@ -2113,6 +2184,15 @@ func (c *applicationServiceClient) Create(ctx context.Context, in *ApplicationCr return out, nil } +func (c *applicationServiceClient) CreateApplication(ctx context.Context, in *ApplicationCreateRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) { + out := new(v1alpha1.Application) + err := c.cc.Invoke(ctx, "/application.ApplicationService/CreateApplication", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *applicationServiceClient) Get(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (*v1alpha1.Application, error) { out := new(v1alpha1.Application) err := c.cc.Invoke(ctx, "/application.ApplicationService/Get", in, out, opts...) @@ -2122,6 +2202,15 @@ func (c *applicationServiceClient) Get(ctx context.Context, in *ApplicationQuery return out, nil } +func (c *applicationServiceClient) GetApplication(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (*v1alpha1.Application, error) { + out := new(v1alpha1.Application) + err := c.cc.Invoke(ctx, "/application.ApplicationService/GetApplication", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *applicationServiceClient) GetApplicationSyncWindows(ctx context.Context, in *ApplicationSyncWindowsQuery, opts ...grpc.CallOption) (*ApplicationSyncWindowsResponse, error) { out := new(ApplicationSyncWindowsResponse) err := c.cc.Invoke(ctx, "/application.ApplicationService/GetApplicationSyncWindows", in, out, opts...) @@ -2149,6 +2238,7 @@ func (c *applicationServiceClient) GetManifests(ctx context.Context, in *Applica return out, nil } +// Deprecated: Do not use. func (c *applicationServiceClient) Update(ctx context.Context, in *ApplicationUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) { out := new(v1alpha1.Application) err := c.cc.Invoke(ctx, "/application.ApplicationService/Update", in, out, opts...) @@ -2158,6 +2248,15 @@ func (c *applicationServiceClient) Update(ctx context.Context, in *ApplicationUp return out, nil } +func (c *applicationServiceClient) UpdateApplication(ctx context.Context, in *ApplicationUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) { + out := new(v1alpha1.Application) + err := c.cc.Invoke(ctx, "/application.ApplicationService/UpdateApplication", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *applicationServiceClient) UpdateSpec(ctx context.Context, in *ApplicationUpdateSpecRequest, opts ...grpc.CallOption) (*v1alpha1.ApplicationSpec, error) { out := new(v1alpha1.ApplicationSpec) err := c.cc.Invoke(ctx, "/application.ApplicationService/UpdateSpec", in, out, opts...) @@ -2167,6 +2266,7 @@ func (c *applicationServiceClient) UpdateSpec(ctx context.Context, in *Applicati return out, nil } +// Deprecated: Do not use. func (c *applicationServiceClient) Patch(ctx context.Context, in *ApplicationPatchRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) { out := new(v1alpha1.Application) err := c.cc.Invoke(ctx, "/application.ApplicationService/Patch", in, out, opts...) @@ -2176,6 +2276,16 @@ func (c *applicationServiceClient) Patch(ctx context.Context, in *ApplicationPat return out, nil } +func (c *applicationServiceClient) PatchApplication(ctx context.Context, in *ApplicationPatchRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) { + out := new(v1alpha1.Application) + err := c.cc.Invoke(ctx, "/application.ApplicationService/PatchApplication", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Deprecated: Do not use. func (c *applicationServiceClient) Delete(ctx context.Context, in *ApplicationDeleteRequest, opts ...grpc.CallOption) (*ApplicationResponse, error) { out := new(ApplicationResponse) err := c.cc.Invoke(ctx, "/application.ApplicationService/Delete", in, out, opts...) @@ -2185,6 +2295,17 @@ func (c *applicationServiceClient) Delete(ctx context.Context, in *ApplicationDe return out, nil } +// Deprecated: Do not use. +func (c *applicationServiceClient) DeleteApplication(ctx context.Context, in *ApplicationDeleteRequest, opts ...grpc.CallOption) (*ApplicationResponse, error) { + out := new(ApplicationResponse) + err := c.cc.Invoke(ctx, "/application.ApplicationService/DeleteApplication", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Deprecated: Do not use. func (c *applicationServiceClient) Sync(ctx context.Context, in *ApplicationSyncRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) { out := new(v1alpha1.Application) err := c.cc.Invoke(ctx, "/application.ApplicationService/Sync", in, out, opts...) @@ -2194,6 +2315,15 @@ func (c *applicationServiceClient) Sync(ctx context.Context, in *ApplicationSync return out, nil } +func (c *applicationServiceClient) SyncApplication(ctx context.Context, in *ApplicationSyncRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) { + out := new(v1alpha1.Application) + err := c.cc.Invoke(ctx, "/application.ApplicationService/SyncApplication", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *applicationServiceClient) ManagedResources(ctx context.Context, in *ResourcesQuery, opts ...grpc.CallOption) (*ManagedResourcesResponse, error) { out := new(ManagedResourcesResponse) err := c.cc.Invoke(ctx, "/application.ApplicationService/ManagedResources", in, out, opts...) @@ -2212,6 +2342,7 @@ func (c *applicationServiceClient) ResourceTree(ctx context.Context, in *Resourc return out, nil } +// Deprecated: Do not use. func (c *applicationServiceClient) Rollback(ctx context.Context, in *ApplicationRollbackRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) { out := new(v1alpha1.Application) err := c.cc.Invoke(ctx, "/application.ApplicationService/Rollback", in, out, opts...) @@ -2221,6 +2352,15 @@ func (c *applicationServiceClient) Rollback(ctx context.Context, in *Application return out, nil } +func (c *applicationServiceClient) RollbackApplication(ctx context.Context, in *ApplicationRollbackRequest, opts ...grpc.CallOption) (*v1alpha1.Application, error) { + out := new(v1alpha1.Application) + err := c.cc.Invoke(ctx, "/application.ApplicationService/RollbackApplication", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *applicationServiceClient) TerminateOperation(ctx context.Context, in *OperationTerminateRequest, opts ...grpc.CallOption) (*OperationTerminateResponse, error) { out := new(OperationTerminateResponse) err := c.cc.Invoke(ctx, "/application.ApplicationService/TerminateOperation", in, out, opts...) @@ -2276,7 +2416,7 @@ func (c *applicationServiceClient) DeleteResource(ctx context.Context, in *Appli } func (c *applicationServiceClient) PodLogs(ctx context.Context, in *ApplicationPodLogsQuery, opts ...grpc.CallOption) (ApplicationService_PodLogsClient, error) { - stream, err := c.cc.NewStream(ctx, &_ApplicationService_serviceDesc.Streams[1], "/application.ApplicationService/PodLogs", opts...) + stream, err := c.cc.NewStream(ctx, &_ApplicationService_serviceDesc.Streams[2], "/application.ApplicationService/PodLogs", opts...) if err != nil { return nil, err } @@ -2309,16 +2449,24 @@ func (x *applicationServicePodLogsClient) Recv() (*LogEntry, error) { // ApplicationServiceServer is the server API for ApplicationService service. type ApplicationServiceServer interface { - // List returns list of applications + // DEPRECATED: List returns list of applications List(context.Context, *ApplicationQuery) (*v1alpha1.ApplicationList, error) + // ListApplications returns list of applications + ListApplications(context.Context, *ApplicationQuery) (*v1alpha1.ApplicationList, error) // ListResourceEvents returns a list of event resources ListResourceEvents(context.Context, *ApplicationResourceEventsQuery) (*v11.EventList, error) // Watch returns stream of application change events. Watch(*ApplicationQuery, ApplicationService_WatchServer) error + // WatchApplications returns stream of application change events. + WatchApplications(*ApplicationQuery, ApplicationService_WatchApplicationsServer) error // Create creates an application Create(context.Context, *ApplicationCreateRequest) (*v1alpha1.Application, error) + // CreateApplication creates an application + CreateApplication(context.Context, *ApplicationCreateRequest) (*v1alpha1.Application, error) // Get returns an application by name Get(context.Context, *ApplicationQuery) (*v1alpha1.Application, error) + // GetApplication returns an application by name + GetApplication(context.Context, *ApplicationQuery) (*v1alpha1.Application, error) // Get returns an application by name GetApplicationSyncWindows(context.Context, *ApplicationSyncWindowsQuery) (*ApplicationSyncWindowsResponse, error) // Get the meta-data (author, date, tags, message) for a specific revision of the application @@ -2327,18 +2475,28 @@ type ApplicationServiceServer interface { GetManifests(context.Context, *ApplicationManifestQuery) (*apiclient.ManifestResponse, error) // Update updates an application Update(context.Context, *ApplicationUpdateRequest) (*v1alpha1.Application, error) + // UpdateApplication updates an application + UpdateApplication(context.Context, *ApplicationUpdateRequest) (*v1alpha1.Application, error) // UpdateSpec updates an application spec UpdateSpec(context.Context, *ApplicationUpdateSpecRequest) (*v1alpha1.ApplicationSpec, error) - // Patch patch an application + // DEPRECATED: Patch patch an application Patch(context.Context, *ApplicationPatchRequest) (*v1alpha1.Application, error) - // Delete deletes an application + // Patch patch an application + PatchApplication(context.Context, *ApplicationPatchRequest) (*v1alpha1.Application, error) + // DEPRECATED: Delete deletes an application Delete(context.Context, *ApplicationDeleteRequest) (*ApplicationResponse, error) - // Sync syncs an application to its target state + // DeleteApplication deletes an application + DeleteApplication(context.Context, *ApplicationDeleteRequest) (*ApplicationResponse, error) + // DEPRECATED: Sync syncs an application to its target state Sync(context.Context, *ApplicationSyncRequest) (*v1alpha1.Application, error) + // SyncApplication syncs an application to its target state + SyncApplication(context.Context, *ApplicationSyncRequest) (*v1alpha1.Application, error) ManagedResources(context.Context, *ResourcesQuery) (*ManagedResourcesResponse, error) ResourceTree(context.Context, *ResourcesQuery) (*v1alpha1.ApplicationTree, error) - // Rollback syncs an application to its target state + // DEPRECATED: Rollback syncs an application to its target state Rollback(context.Context, *ApplicationRollbackRequest) (*v1alpha1.Application, error) + // RollbackApplication syncs an application to its target state + RollbackApplication(context.Context, *ApplicationRollbackRequest) (*v1alpha1.Application, error) // TerminateOperation terminates the currently running operation TerminateOperation(context.Context, *OperationTerminateRequest) (*OperationTerminateResponse, error) // GetResource returns single application resource @@ -2360,18 +2518,30 @@ type UnimplementedApplicationServiceServer struct { func (*UnimplementedApplicationServiceServer) List(ctx context.Context, req *ApplicationQuery) (*v1alpha1.ApplicationList, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } +func (*UnimplementedApplicationServiceServer) ListApplications(ctx context.Context, req *ApplicationQuery) (*v1alpha1.ApplicationList, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListApplications not implemented") +} func (*UnimplementedApplicationServiceServer) ListResourceEvents(ctx context.Context, req *ApplicationResourceEventsQuery) (*v11.EventList, error) { return nil, status.Errorf(codes.Unimplemented, "method ListResourceEvents not implemented") } func (*UnimplementedApplicationServiceServer) Watch(req *ApplicationQuery, srv ApplicationService_WatchServer) error { return status.Errorf(codes.Unimplemented, "method Watch not implemented") } +func (*UnimplementedApplicationServiceServer) WatchApplications(req *ApplicationQuery, srv ApplicationService_WatchApplicationsServer) error { + return status.Errorf(codes.Unimplemented, "method WatchApplications not implemented") +} func (*UnimplementedApplicationServiceServer) Create(ctx context.Context, req *ApplicationCreateRequest) (*v1alpha1.Application, error) { return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") } +func (*UnimplementedApplicationServiceServer) CreateApplication(ctx context.Context, req *ApplicationCreateRequest) (*v1alpha1.Application, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateApplication not implemented") +} func (*UnimplementedApplicationServiceServer) Get(ctx context.Context, req *ApplicationQuery) (*v1alpha1.Application, error) { return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") } +func (*UnimplementedApplicationServiceServer) GetApplication(ctx context.Context, req *ApplicationQuery) (*v1alpha1.Application, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetApplication not implemented") +} func (*UnimplementedApplicationServiceServer) GetApplicationSyncWindows(ctx context.Context, req *ApplicationSyncWindowsQuery) (*ApplicationSyncWindowsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetApplicationSyncWindows not implemented") } @@ -2384,18 +2554,30 @@ func (*UnimplementedApplicationServiceServer) GetManifests(ctx context.Context, func (*UnimplementedApplicationServiceServer) Update(ctx context.Context, req *ApplicationUpdateRequest) (*v1alpha1.Application, error) { return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") } +func (*UnimplementedApplicationServiceServer) UpdateApplication(ctx context.Context, req *ApplicationUpdateRequest) (*v1alpha1.Application, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateApplication not implemented") +} func (*UnimplementedApplicationServiceServer) UpdateSpec(ctx context.Context, req *ApplicationUpdateSpecRequest) (*v1alpha1.ApplicationSpec, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateSpec not implemented") } func (*UnimplementedApplicationServiceServer) Patch(ctx context.Context, req *ApplicationPatchRequest) (*v1alpha1.Application, error) { return nil, status.Errorf(codes.Unimplemented, "method Patch not implemented") } +func (*UnimplementedApplicationServiceServer) PatchApplication(ctx context.Context, req *ApplicationPatchRequest) (*v1alpha1.Application, error) { + return nil, status.Errorf(codes.Unimplemented, "method PatchApplication not implemented") +} func (*UnimplementedApplicationServiceServer) Delete(ctx context.Context, req *ApplicationDeleteRequest) (*ApplicationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") } +func (*UnimplementedApplicationServiceServer) DeleteApplication(ctx context.Context, req *ApplicationDeleteRequest) (*ApplicationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteApplication not implemented") +} func (*UnimplementedApplicationServiceServer) Sync(ctx context.Context, req *ApplicationSyncRequest) (*v1alpha1.Application, error) { return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") } +func (*UnimplementedApplicationServiceServer) SyncApplication(ctx context.Context, req *ApplicationSyncRequest) (*v1alpha1.Application, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncApplication not implemented") +} func (*UnimplementedApplicationServiceServer) ManagedResources(ctx context.Context, req *ResourcesQuery) (*ManagedResourcesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ManagedResources not implemented") } @@ -2405,6 +2587,9 @@ func (*UnimplementedApplicationServiceServer) ResourceTree(ctx context.Context, func (*UnimplementedApplicationServiceServer) Rollback(ctx context.Context, req *ApplicationRollbackRequest) (*v1alpha1.Application, error) { return nil, status.Errorf(codes.Unimplemented, "method Rollback not implemented") } +func (*UnimplementedApplicationServiceServer) RollbackApplication(ctx context.Context, req *ApplicationRollbackRequest) (*v1alpha1.Application, error) { + return nil, status.Errorf(codes.Unimplemented, "method RollbackApplication not implemented") +} func (*UnimplementedApplicationServiceServer) TerminateOperation(ctx context.Context, req *OperationTerminateRequest) (*OperationTerminateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TerminateOperation not implemented") } @@ -2449,6 +2634,24 @@ func _ApplicationService_List_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _ApplicationService_ListApplications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApplicationQuery) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ApplicationServiceServer).ListApplications(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/application.ApplicationService/ListApplications", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ApplicationServiceServer).ListApplications(ctx, req.(*ApplicationQuery)) + } + return interceptor(ctx, in, info, handler) +} + func _ApplicationService_ListResourceEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ApplicationResourceEventsQuery) if err := dec(in); err != nil { @@ -2488,6 +2691,27 @@ func (x *applicationServiceWatchServer) Send(m *v1alpha1.ApplicationWatchEvent) return x.ServerStream.SendMsg(m) } +func _ApplicationService_WatchApplications_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ApplicationQuery) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ApplicationServiceServer).WatchApplications(m, &applicationServiceWatchApplicationsServer{stream}) +} + +type ApplicationService_WatchApplicationsServer interface { + Send(*v1alpha1.ApplicationWatchEvent) error + grpc.ServerStream +} + +type applicationServiceWatchApplicationsServer struct { + grpc.ServerStream +} + +func (x *applicationServiceWatchApplicationsServer) Send(m *v1alpha1.ApplicationWatchEvent) error { + return x.ServerStream.SendMsg(m) +} + func _ApplicationService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ApplicationCreateRequest) if err := dec(in); err != nil { @@ -2506,6 +2730,24 @@ func _ApplicationService_Create_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _ApplicationService_CreateApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApplicationCreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ApplicationServiceServer).CreateApplication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/application.ApplicationService/CreateApplication", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ApplicationServiceServer).CreateApplication(ctx, req.(*ApplicationCreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _ApplicationService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ApplicationQuery) if err := dec(in); err != nil { @@ -2524,6 +2766,24 @@ func _ApplicationService_Get_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _ApplicationService_GetApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApplicationQuery) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ApplicationServiceServer).GetApplication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/application.ApplicationService/GetApplication", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ApplicationServiceServer).GetApplication(ctx, req.(*ApplicationQuery)) + } + return interceptor(ctx, in, info, handler) +} + func _ApplicationService_GetApplicationSyncWindows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ApplicationSyncWindowsQuery) if err := dec(in); err != nil { @@ -2596,6 +2856,24 @@ func _ApplicationService_Update_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _ApplicationService_UpdateApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApplicationUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ApplicationServiceServer).UpdateApplication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/application.ApplicationService/UpdateApplication", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ApplicationServiceServer).UpdateApplication(ctx, req.(*ApplicationUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _ApplicationService_UpdateSpec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ApplicationUpdateSpecRequest) if err := dec(in); err != nil { @@ -2632,6 +2910,24 @@ func _ApplicationService_Patch_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _ApplicationService_PatchApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApplicationPatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ApplicationServiceServer).PatchApplication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/application.ApplicationService/PatchApplication", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ApplicationServiceServer).PatchApplication(ctx, req.(*ApplicationPatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _ApplicationService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ApplicationDeleteRequest) if err := dec(in); err != nil { @@ -2650,6 +2946,24 @@ func _ApplicationService_Delete_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _ApplicationService_DeleteApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApplicationDeleteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ApplicationServiceServer).DeleteApplication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/application.ApplicationService/DeleteApplication", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ApplicationServiceServer).DeleteApplication(ctx, req.(*ApplicationDeleteRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _ApplicationService_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ApplicationSyncRequest) if err := dec(in); err != nil { @@ -2668,6 +2982,24 @@ func _ApplicationService_Sync_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _ApplicationService_SyncApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApplicationSyncRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ApplicationServiceServer).SyncApplication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/application.ApplicationService/SyncApplication", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ApplicationServiceServer).SyncApplication(ctx, req.(*ApplicationSyncRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _ApplicationService_ManagedResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ResourcesQuery) if err := dec(in); err != nil { @@ -2722,6 +3054,24 @@ func _ApplicationService_Rollback_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _ApplicationService_RollbackApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApplicationRollbackRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ApplicationServiceServer).RollbackApplication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/application.ApplicationService/RollbackApplication", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ApplicationServiceServer).RollbackApplication(ctx, req.(*ApplicationRollbackRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _ApplicationService_TerminateOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(OperationTerminateRequest) if err := dec(in); err != nil { @@ -2859,6 +3209,10 @@ var _ApplicationService_serviceDesc = grpc.ServiceDesc{ MethodName: "List", Handler: _ApplicationService_List_Handler, }, + { + MethodName: "ListApplications", + Handler: _ApplicationService_ListApplications_Handler, + }, { MethodName: "ListResourceEvents", Handler: _ApplicationService_ListResourceEvents_Handler, @@ -2867,10 +3221,18 @@ var _ApplicationService_serviceDesc = grpc.ServiceDesc{ MethodName: "Create", Handler: _ApplicationService_Create_Handler, }, + { + MethodName: "CreateApplication", + Handler: _ApplicationService_CreateApplication_Handler, + }, { MethodName: "Get", Handler: _ApplicationService_Get_Handler, }, + { + MethodName: "GetApplication", + Handler: _ApplicationService_GetApplication_Handler, + }, { MethodName: "GetApplicationSyncWindows", Handler: _ApplicationService_GetApplicationSyncWindows_Handler, @@ -2887,6 +3249,10 @@ var _ApplicationService_serviceDesc = grpc.ServiceDesc{ MethodName: "Update", Handler: _ApplicationService_Update_Handler, }, + { + MethodName: "UpdateApplication", + Handler: _ApplicationService_UpdateApplication_Handler, + }, { MethodName: "UpdateSpec", Handler: _ApplicationService_UpdateSpec_Handler, @@ -2895,14 +3261,26 @@ var _ApplicationService_serviceDesc = grpc.ServiceDesc{ MethodName: "Patch", Handler: _ApplicationService_Patch_Handler, }, + { + MethodName: "PatchApplication", + Handler: _ApplicationService_PatchApplication_Handler, + }, { MethodName: "Delete", Handler: _ApplicationService_Delete_Handler, }, + { + MethodName: "DeleteApplication", + Handler: _ApplicationService_DeleteApplication_Handler, + }, { MethodName: "Sync", Handler: _ApplicationService_Sync_Handler, }, + { + MethodName: "SyncApplication", + Handler: _ApplicationService_SyncApplication_Handler, + }, { MethodName: "ManagedResources", Handler: _ApplicationService_ManagedResources_Handler, @@ -2915,6 +3293,10 @@ var _ApplicationService_serviceDesc = grpc.ServiceDesc{ MethodName: "Rollback", Handler: _ApplicationService_Rollback_Handler, }, + { + MethodName: "RollbackApplication", + Handler: _ApplicationService_RollbackApplication_Handler, + }, { MethodName: "TerminateOperation", Handler: _ApplicationService_TerminateOperation_Handler, @@ -2946,6 +3328,11 @@ var _ApplicationService_serviceDesc = grpc.ServiceDesc{ Handler: _ApplicationService_Watch_Handler, ServerStreams: true, }, + { + StreamName: "WatchApplications", + Handler: _ApplicationService_WatchApplications_Handler, + ServerStreams: true, + }, { StreamName: "PodLogs", Handler: _ApplicationService_PodLogs_Handler, diff --git a/pkg/apiclient/application/application.pb.gw.go b/pkg/apiclient/application/application.pb.gw.go index 2239b0cd101dc..40c6166cfca73 100644 --- a/pkg/apiclient/application/application.pb.gw.go +++ b/pkg/apiclient/application/application.pb.gw.go @@ -45,6 +45,23 @@ func request_ApplicationService_List_0(ctx context.Context, marshaler runtime.Ma } +var ( + filter_ApplicationService_ListApplications_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_ApplicationService_ListApplications_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ApplicationQuery + var metadata runtime.ServerMetadata + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ApplicationService_ListApplications_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListApplications(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + var ( filter_ApplicationService_ListResourceEvents_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -105,6 +122,31 @@ func request_ApplicationService_Watch_0(ctx context.Context, marshaler runtime.M } +var ( + filter_ApplicationService_WatchApplications_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_ApplicationService_WatchApplications_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (ApplicationService_WatchApplicationsClient, runtime.ServerMetadata, error) { + var protoReq ApplicationQuery + var metadata runtime.ServerMetadata + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ApplicationService_WatchApplications_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + stream, err := client.WatchApplications(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + var ( filter_ApplicationService_Create_0 = &utilities.DoubleArray{Encoding: map[string]int{"application": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -126,6 +168,27 @@ func request_ApplicationService_Create_0(ctx context.Context, marshaler runtime. } +var ( + filter_ApplicationService_CreateApplication_0 = &utilities.DoubleArray{Encoding: map[string]int{"application": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_ApplicationService_CreateApplication_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ApplicationCreateRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Application); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ApplicationService_CreateApplication_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateApplication(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + var ( filter_ApplicationService_Get_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -161,6 +224,41 @@ func request_ApplicationService_Get_0(ctx context.Context, marshaler runtime.Mar } +var ( + filter_ApplicationService_GetApplication_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_ApplicationService_GetApplication_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ApplicationQuery + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.StringP(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ApplicationService_GetApplication_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetApplication(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + func request_ApplicationService_GetApplicationSyncWindows_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ApplicationSyncWindowsQuery var metadata runtime.ServerMetadata @@ -292,6 +390,37 @@ func request_ApplicationService_Update_0(ctx context.Context, marshaler runtime. } +func request_ApplicationService_UpdateApplication_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ApplicationUpdateRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Application); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["application.metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "application.metadata.name") + } + + protoReq.GetApplication().GetMetadata().Name, err = runtime.StringP(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "application.metadata.name", err) + } + + msg, err := client.UpdateApplication(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + func request_ApplicationService_UpdateSpec_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ApplicationUpdateSpecRequest var metadata runtime.ServerMetadata @@ -354,6 +483,37 @@ func request_ApplicationService_Patch_0(ctx context.Context, marshaler runtime.M } +func request_ApplicationService_PatchApplication_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ApplicationPatchRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.StringP(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.PatchApplication(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + var ( filter_ApplicationService_Delete_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -389,6 +549,41 @@ func request_ApplicationService_Delete_0(ctx context.Context, marshaler runtime. } +var ( + filter_ApplicationService_DeleteApplication_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_ApplicationService_DeleteApplication_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ApplicationDeleteRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.StringP(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ApplicationService_DeleteApplication_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteApplication(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + func request_ApplicationService_Sync_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ApplicationSyncRequest var metadata runtime.ServerMetadata @@ -420,6 +615,37 @@ func request_ApplicationService_Sync_0(ctx context.Context, marshaler runtime.Ma } +func request_ApplicationService_SyncApplication_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ApplicationSyncRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.StringP(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.SyncApplication(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + var ( filter_ApplicationService_ManagedResources_0 = &utilities.DoubleArray{Encoding: map[string]int{"applicationName": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -521,6 +747,37 @@ func request_ApplicationService_Rollback_0(ctx context.Context, marshaler runtim } +func request_ApplicationService_RollbackApplication_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ApplicationRollbackRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.StringP(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.RollbackApplication(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + func request_ApplicationService_TerminateOperation_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq OperationTerminateRequest var metadata runtime.ServerMetadata @@ -852,6 +1109,35 @@ func RegisterApplicationServiceHandlerClient(ctx context.Context, mux *runtime.S }) + mux.Handle("GET", pattern_ApplicationService_ListApplications_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ApplicationService_ListApplications_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ApplicationService_ListApplications_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_ApplicationService_ListResourceEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -910,6 +1196,35 @@ func RegisterApplicationServiceHandlerClient(ctx context.Context, mux *runtime.S }) + mux.Handle("GET", pattern_ApplicationService_WatchApplications_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ApplicationService_WatchApplications_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ApplicationService_WatchApplications_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_ApplicationService_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -939,6 +1254,35 @@ func RegisterApplicationServiceHandlerClient(ctx context.Context, mux *runtime.S }) + mux.Handle("POST", pattern_ApplicationService_CreateApplication_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ApplicationService_CreateApplication_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ApplicationService_CreateApplication_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_ApplicationService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -968,6 +1312,35 @@ func RegisterApplicationServiceHandlerClient(ctx context.Context, mux *runtime.S }) + mux.Handle("GET", pattern_ApplicationService_GetApplication_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ApplicationService_GetApplication_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ApplicationService_GetApplication_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_ApplicationService_GetApplicationSyncWindows_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1084,6 +1457,35 @@ func RegisterApplicationServiceHandlerClient(ctx context.Context, mux *runtime.S }) + mux.Handle("PUT", pattern_ApplicationService_UpdateApplication_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ApplicationService_UpdateApplication_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ApplicationService_UpdateApplication_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("PUT", pattern_ApplicationService_UpdateSpec_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1142,6 +1544,35 @@ func RegisterApplicationServiceHandlerClient(ctx context.Context, mux *runtime.S }) + mux.Handle("PATCH", pattern_ApplicationService_PatchApplication_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ApplicationService_PatchApplication_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ApplicationService_PatchApplication_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("DELETE", pattern_ApplicationService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1171,6 +1602,35 @@ func RegisterApplicationServiceHandlerClient(ctx context.Context, mux *runtime.S }) + mux.Handle("DELETE", pattern_ApplicationService_DeleteApplication_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ApplicationService_DeleteApplication_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ApplicationService_DeleteApplication_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_ApplicationService_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1200,6 +1660,35 @@ func RegisterApplicationServiceHandlerClient(ctx context.Context, mux *runtime.S }) + mux.Handle("POST", pattern_ApplicationService_SyncApplication_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ApplicationService_SyncApplication_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ApplicationService_SyncApplication_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_ApplicationService_ManagedResources_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1287,6 +1776,35 @@ func RegisterApplicationServiceHandlerClient(ctx context.Context, mux *runtime.S }) + mux.Handle("POST", pattern_ApplicationService_RollbackApplication_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ApplicationService_RollbackApplication_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ApplicationService_RollbackApplication_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("DELETE", pattern_ApplicationService_TerminateOperation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1496,14 +2014,22 @@ func RegisterApplicationServiceHandlerClient(ctx context.Context, mux *runtime.S var ( pattern_ApplicationService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "applications"}, "")) + pattern_ApplicationService_ListApplications_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "applications"}, "")) + pattern_ApplicationService_ListResourceEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "events"}, "")) pattern_ApplicationService_Watch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "stream", "applications"}, "")) + pattern_ApplicationService_WatchApplications_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "stream", "applications"}, "")) + pattern_ApplicationService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "applications"}, "")) + pattern_ApplicationService_CreateApplication_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "applications"}, "")) + pattern_ApplicationService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applications", "name"}, "")) + pattern_ApplicationService_GetApplication_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applications", "name"}, "")) + pattern_ApplicationService_GetApplicationSyncWindows_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "syncwindows"}, "")) pattern_ApplicationService_RevisionMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"api", "v1", "applications", "name", "revisions", "revision", "metadata"}, "")) @@ -1512,20 +2038,30 @@ var ( pattern_ApplicationService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applications", "application.metadata.name"}, "")) + pattern_ApplicationService_UpdateApplication_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applications", "application.metadata.name"}, "")) + pattern_ApplicationService_UpdateSpec_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "spec"}, "")) pattern_ApplicationService_Patch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applications", "name"}, "")) + pattern_ApplicationService_PatchApplication_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applications", "name"}, "")) + pattern_ApplicationService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applications", "name"}, "")) + pattern_ApplicationService_DeleteApplication_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applications", "name"}, "")) + pattern_ApplicationService_Sync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "sync"}, "")) + pattern_ApplicationService_SyncApplication_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "sync"}, "")) + pattern_ApplicationService_ManagedResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "applicationName", "managed-resources"}, "")) pattern_ApplicationService_ResourceTree_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "applicationName", "resource-tree"}, "")) pattern_ApplicationService_Rollback_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "rollback"}, "")) + pattern_ApplicationService_RollbackApplication_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "rollback"}, "")) + pattern_ApplicationService_TerminateOperation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "operation"}, "")) pattern_ApplicationService_GetResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "resource"}, "")) @@ -1544,14 +2080,22 @@ var ( var ( forward_ApplicationService_List_0 = runtime.ForwardResponseMessage + forward_ApplicationService_ListApplications_0 = runtime.ForwardResponseMessage + forward_ApplicationService_ListResourceEvents_0 = runtime.ForwardResponseMessage forward_ApplicationService_Watch_0 = runtime.ForwardResponseStream + forward_ApplicationService_WatchApplications_0 = runtime.ForwardResponseStream + forward_ApplicationService_Create_0 = runtime.ForwardResponseMessage + forward_ApplicationService_CreateApplication_0 = runtime.ForwardResponseMessage + forward_ApplicationService_Get_0 = runtime.ForwardResponseMessage + forward_ApplicationService_GetApplication_0 = runtime.ForwardResponseMessage + forward_ApplicationService_GetApplicationSyncWindows_0 = runtime.ForwardResponseMessage forward_ApplicationService_RevisionMetadata_0 = runtime.ForwardResponseMessage @@ -1560,20 +2104,30 @@ var ( forward_ApplicationService_Update_0 = runtime.ForwardResponseMessage + forward_ApplicationService_UpdateApplication_0 = runtime.ForwardResponseMessage + forward_ApplicationService_UpdateSpec_0 = runtime.ForwardResponseMessage forward_ApplicationService_Patch_0 = runtime.ForwardResponseMessage + forward_ApplicationService_PatchApplication_0 = runtime.ForwardResponseMessage + forward_ApplicationService_Delete_0 = runtime.ForwardResponseMessage + forward_ApplicationService_DeleteApplication_0 = runtime.ForwardResponseMessage + forward_ApplicationService_Sync_0 = runtime.ForwardResponseMessage + forward_ApplicationService_SyncApplication_0 = runtime.ForwardResponseMessage + forward_ApplicationService_ManagedResources_0 = runtime.ForwardResponseMessage forward_ApplicationService_ResourceTree_0 = runtime.ForwardResponseMessage forward_ApplicationService_Rollback_0 = runtime.ForwardResponseMessage + forward_ApplicationService_RollbackApplication_0 = runtime.ForwardResponseMessage + forward_ApplicationService_TerminateOperation_0 = runtime.ForwardResponseMessage forward_ApplicationService_GetResource_0 = runtime.ForwardResponseMessage diff --git a/pkg/apiclient/application/forwarder_overwrite.go b/pkg/apiclient/application/forwarder_overwrite.go index eeadb241f7fce..5c2389441662c 100644 --- a/pkg/apiclient/application/forwarder_overwrite.go +++ b/pkg/apiclient/application/forwarder_overwrite.go @@ -6,7 +6,7 @@ import ( func init() { forward_ApplicationService_PodLogs_0 = http.StreamForwarder - forward_ApplicationService_Watch_0 = http.StreamForwarder - forward_ApplicationService_List_0 = http.UnaryForwarder + forward_ApplicationService_WatchApplications_0 = http.StreamForwarder + forward_ApplicationService_ListApplications_0 = http.UnaryForwarder forward_ApplicationService_ManagedResources_0 = http.UnaryForwarder } diff --git a/server/application/application.go b/server/application/application.go index 79a7b7544c1a2..de5f331fe0483 100644 --- a/server/application/application.go +++ b/server/application/application.go @@ -96,8 +96,8 @@ func appRBACName(app appv1.Application) string { return fmt.Sprintf("%s/%s", app.Spec.GetProject(), app.Name) } -// List returns list of applications -func (s *Server) List(ctx context.Context, q *application.ApplicationQuery) (*appv1.ApplicationList, error) { +// ListApplications returns list of applications +func (s *Server) ListApplications(ctx context.Context, q *application.ApplicationQuery) (*appv1.ApplicationList, error) { appList, err := s.appclientset.ArgoprojV1alpha1().Applications(s.ns).List(metav1.ListOptions{LabelSelector: q.Selector}) if err != nil { return nil, err @@ -117,8 +117,13 @@ func (s *Server) List(ctx context.Context, q *application.ApplicationQuery) (*ap return appList, nil } -// Create creates an application -func (s *Server) Create(ctx context.Context, q *application.ApplicationCreateRequest) (*appv1.Application, error) { +// DEPRECATED: Use ListApplication() instead +func (s *Server) List(ctx context.Context, q *application.ApplicationQuery) (*appv1.ApplicationList, error) { + return s.ListApplications(ctx, q) +} + +// CreateApplication creates an application +func (s *Server) CreateApplication(ctx context.Context, q *application.ApplicationCreateRequest) (*appv1.Application, error) { if err := s.enf.EnforceErr(ctx.Value("claims"), rbacpolicy.ResourceApplications, rbacpolicy.ActionCreate, appRBACName(q.Application)); err != nil { return nil, err } @@ -161,6 +166,11 @@ func (s *Server) Create(ctx context.Context, q *application.ApplicationCreateReq return out, err } +// DEPRECATED: Use CreateApplication instead +func (s *Server) Create(ctx context.Context, q *application.ApplicationCreateRequest) (*appv1.Application, error) { + return s.CreateApplication(ctx, q) +} + // GetManifests returns application manifests func (s *Server) GetManifests(ctx context.Context, q *application.ApplicationManifestQuery) (*apiclient.ManifestResponse, error) { a, err := s.appclientset.ArgoprojV1alpha1().Applications(s.ns).Get(*q.Name, metav1.GetOptions{}) @@ -231,8 +241,8 @@ func (s *Server) GetManifests(ctx context.Context, q *application.ApplicationMan return manifestInfo, nil } -// Get returns an application by name -func (s *Server) Get(ctx context.Context, q *application.ApplicationQuery) (*appv1.Application, error) { +// GetApplication returns an application by name +func (s *Server) GetApplication(ctx context.Context, q *application.ApplicationQuery) (*appv1.Application, error) { appIf := s.appclientset.ArgoprojV1alpha1().Applications(s.ns) a, err := appIf.Get(*q.Name, metav1.GetOptions{}) if err != nil { @@ -258,6 +268,10 @@ func (s *Server) Get(ctx context.Context, q *application.ApplicationQuery) (*app return a, nil } +func (s *Server) Get(ctx context.Context, q *application.ApplicationQuery) (*appv1.Application, error) { + return s.GetApplication(ctx, q) +} + // ListResourceEvents returns a list of event resources func (s *Server) ListResourceEvents(ctx context.Context, q *application.ApplicationResourceEventsQuery) (*v1.EventList, error) { a, err := s.appclientset.ArgoprojV1alpha1().Applications(s.ns).Get(*q.Name, metav1.GetOptions{}) @@ -360,8 +374,8 @@ func (s *Server) updateApp(app *appv1.Application, newApp *appv1.Application, ct return nil, status.Errorf(codes.Internal, "Failed to update application. Too many conflicts") } -// Update updates an application -func (s *Server) Update(ctx context.Context, q *application.ApplicationUpdateRequest) (*appv1.Application, error) { +// UpdateApplication updates an application +func (s *Server) UpdateApplication(ctx context.Context, q *application.ApplicationUpdateRequest) (*appv1.Application, error) { if err := s.enf.EnforceErr(ctx.Value("claims"), rbacpolicy.ResourceApplications, rbacpolicy.ActionUpdate, appRBACName(*q.Application)); err != nil { return nil, err } @@ -369,6 +383,11 @@ func (s *Server) Update(ctx context.Context, q *application.ApplicationUpdateReq return s.validateAndUpdateApp(ctx, q.Application) } +// DEPRECATED: Update updates an application +func (s *Server) Update(ctx context.Context, q *application.ApplicationUpdateRequest) (*appv1.Application, error) { + return s.UpdateApplication(ctx, q) +} + // UpdateSpec updates an application spec and filters out any invalid parameter overrides func (s *Server) UpdateSpec(ctx context.Context, q *application.ApplicationUpdateSpecRequest) (*appv1.ApplicationSpec, error) { a, err := s.appclientset.ArgoprojV1alpha1().Applications(s.ns).Get(*q.Name, metav1.GetOptions{}) @@ -386,8 +405,8 @@ func (s *Server) UpdateSpec(ctx context.Context, q *application.ApplicationUpdat return &a.Spec, nil } -// Patch patches an application -func (s *Server) Patch(ctx context.Context, q *application.ApplicationPatchRequest) (*appv1.Application, error) { +// PatchApplication patches an application +func (s *Server) PatchApplication(ctx context.Context, q *application.ApplicationPatchRequest) (*appv1.Application, error) { app, err := s.appclientset.ArgoprojV1alpha1().Applications(s.ns).Get(*q.Name, metav1.GetOptions{}) if err != nil { @@ -431,8 +450,13 @@ func (s *Server) Patch(ctx context.Context, q *application.ApplicationPatchReque return s.validateAndUpdateApp(ctx, app) } -// Delete removes an application and all associated resources -func (s *Server) Delete(ctx context.Context, q *application.ApplicationDeleteRequest) (*application.ApplicationResponse, error) { +// Patch patches an application +func (s *Server) Patch(ctx context.Context, q *application.ApplicationPatchRequest) (*appv1.Application, error) { + return s.PatchApplication(ctx, q) +} + +// DeleteApplication removes an application and all associated resources +func (s *Server) DeleteApplication(ctx context.Context, q *application.ApplicationDeleteRequest) (*application.ApplicationResponse, error) { a, err := s.appclientset.ArgoprojV1alpha1().Applications(s.ns).Get(*q.Name, metav1.GetOptions{}) if err != nil && !apierr.IsNotFound(err) { return nil, err @@ -485,7 +509,13 @@ func (s *Server) Delete(ctx context.Context, q *application.ApplicationDeleteReq return &application.ApplicationResponse{}, nil } -func (s *Server) Watch(q *application.ApplicationQuery, ws application.ApplicationService_WatchServer) error { +// DEPRECATED: Delete removes an application and all associated resources +func (s *Server) Delete(ctx context.Context, q *application.ApplicationDeleteRequest) (*application.ApplicationResponse, error) { + return s.DeleteApplication(ctx, q) +} + +// WatchApplications serves a stream of application change events +func (s *Server) WatchApplications(q *application.ApplicationQuery, ws application.ApplicationService_WatchApplicationsServer) error { logCtx := log.NewEntry(log.New()) if q.Name != nil { logCtx = logCtx.WithField("application", *q.Name) @@ -558,6 +588,11 @@ func (s *Server) Watch(q *application.ApplicationQuery, ws application.Applicati return nil } +// DEPRECATED: Watch serves a stream of application change events +func (s *Server) Watch(q *application.ApplicationQuery, ws application.ApplicationService_WatchServer) error { + return s.WatchApplications(q, ws) +} + func (s *Server) validateAndNormalizeApp(ctx context.Context, app *appv1.Application) error { proj, err := s.appclientset.ArgoprojV1alpha1().AppProjects(s.ns).Get(app.Spec.GetProject(), metav1.GetOptions{}) if err != nil { @@ -939,8 +974,8 @@ func (s *Server) getApplicationDestination(name string) (string, string, error) return server, namespace, nil } -// Sync syncs an application to its target state -func (s *Server) Sync(ctx context.Context, syncReq *application.ApplicationSyncRequest) (*appv1.Application, error) { +// SyncApplication syncs an application to its target state +func (s *Server) SyncApplication(ctx context.Context, syncReq *application.ApplicationSyncRequest) (*appv1.Application, error) { appIf := s.appclientset.ArgoprojV1alpha1().Applications(s.ns) a, err := appIf.Get(*syncReq.Name, metav1.GetOptions{}) if err != nil { @@ -1003,7 +1038,13 @@ func (s *Server) Sync(ctx context.Context, syncReq *application.ApplicationSyncR return a, err } -func (s *Server) Rollback(ctx context.Context, rollbackReq *application.ApplicationRollbackRequest) (*appv1.Application, error) { +// DEPRECATED: Sync syncs an application to its target state +func (s *Server) Sync(ctx context.Context, syncReq *application.ApplicationSyncRequest) (*appv1.Application, error) { + return s.SyncApplication(ctx, syncReq) +} + +// RollbackApplication syncs given application to any previously synced revision +func (s *Server) RollbackApplication(ctx context.Context, rollbackReq *application.ApplicationRollbackRequest) (*appv1.Application, error) { appIf := s.appclientset.ArgoprojV1alpha1().Applications(s.ns) a, err := appIf.Get(*rollbackReq.Name, metav1.GetOptions{}) if err != nil { @@ -1052,6 +1093,11 @@ func (s *Server) Rollback(ctx context.Context, rollbackReq *application.Applicat return a, err } +// DEPRECATED: Rollback syncs given application to any previously synced revision +func (s *Server) Rollback(ctx context.Context, rollbackReq *application.ApplicationRollbackRequest) (*appv1.Application, error) { + return s.RollbackApplication(ctx, rollbackReq) +} + // resolveRevision resolves the revision specified either in the sync request, or the // application source, into a concrete revision that will be used for a sync operation. func (s *Server) resolveRevision(ctx context.Context, app *appv1.Application, syncReq *application.ApplicationSyncRequest) (string, string, error) { diff --git a/server/application/application.proto b/server/application/application.proto index 0712531151bae..80b85b94e4c52 100644 --- a/server/application/application.proto +++ b/server/application/application.proto @@ -202,9 +202,15 @@ message ManagedResourcesResponse { // ApplicationService service ApplicationService { - // List returns list of applications + // DEPRECATED: List returns list of applications rpc List(ApplicationQuery) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationList) { option (google.api.http).get = "/api/v1/applications"; + option deprecated = true; + } + + // ListApplications returns list of applications + rpc ListApplications(ApplicationQuery) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationList) { + option (google.api.http).get = "/api/v1/applications"; } // ListResourceEvents returns a list of event resources @@ -215,6 +221,12 @@ service ApplicationService { // Watch returns stream of application change events. rpc Watch(ApplicationQuery) returns (stream jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationWatchEvent) { option (google.api.http).get = "/api/v1/stream/applications"; + option deprecated = true; + } + + // WatchApplications returns stream of application change events. + rpc WatchApplications(ApplicationQuery) returns (stream jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationWatchEvent) { + option (google.api.http).get = "/api/v1/stream/applications"; } // Create creates an application @@ -223,6 +235,15 @@ service ApplicationService { post: "/api/v1/applications" body: "application" }; + option deprecated = true; + } + + // CreateApplication creates an application + rpc CreateApplication (ApplicationCreateRequest) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) { + option (google.api.http) = { + post: "/api/v1/applications" + body: "application" + }; } // Get returns an application by name @@ -230,6 +251,12 @@ service ApplicationService { option (google.api.http).get = "/api/v1/applications/{name}"; } + + // GetApplication returns an application by name + rpc GetApplication (ApplicationQuery) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) { + option (google.api.http).get = "/api/v1/applications/{name}"; + } + // Get returns an application by name rpc GetApplicationSyncWindows (ApplicationSyncWindowsQuery) returns (ApplicationSyncWindowsResponse) { option (google.api.http).get = "/api/v1/applications/{name}/syncwindows"; @@ -251,6 +278,15 @@ service ApplicationService { put: "/api/v1/applications/{application.metadata.name}" body: "application" }; + option deprecated = true; + } + + // UpdateApplication updates an application + rpc UpdateApplication(ApplicationUpdateRequest) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) { + option (google.api.http) = { + put: "/api/v1/applications/{application.metadata.name}" + body: "application" + }; } // UpdateSpec updates an application spec @@ -261,25 +297,50 @@ service ApplicationService { }; } - // Patch patch an application + // DEPRECATED: Patch patch an application rpc Patch(ApplicationPatchRequest) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) { option (google.api.http) = { patch: "/api/v1/applications/{name}" body: "*" }; + option deprecated = true; } - // Delete deletes an application + // Patch patch an application + rpc PatchApplication(ApplicationPatchRequest) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) { + option (google.api.http) = { + patch: "/api/v1/applications/{name}" + body: "*" + }; + } + + // DEPRECATED: Delete deletes an application rpc Delete(ApplicationDeleteRequest) returns (ApplicationResponse) { option (google.api.http).delete = "/api/v1/applications/{name}"; + option deprecated = true; + } + + // DeleteApplication deletes an application + rpc DeleteApplication(ApplicationDeleteRequest) returns (ApplicationResponse) { + option (google.api.http).delete = "/api/v1/applications/{name}"; + option deprecated = true; } - // Sync syncs an application to its target state + // DEPRECATED: Sync syncs an application to its target state rpc Sync(ApplicationSyncRequest) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) { option (google.api.http) = { post: "/api/v1/applications/{name}/sync" body: "*" }; + option deprecated = true; + } + + // SyncApplication syncs an application to its target state + rpc SyncApplication(ApplicationSyncRequest) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) { + option (google.api.http) = { + post: "/api/v1/applications/{name}/sync" + body: "*" + }; } rpc ManagedResources(ResourcesQuery) returns (ManagedResourcesResponse) { @@ -289,12 +350,22 @@ service ApplicationService { rpc ResourceTree(ResourcesQuery) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationTree) { option (google.api.http).get = "/api/v1/applications/{applicationName}/resource-tree"; } - // Rollback syncs an application to its target state + + // DEPRECATED: Rollback syncs an application to its target state rpc Rollback(ApplicationRollbackRequest) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) { option (google.api.http) = { post: "/api/v1/applications/{name}/rollback" body: "*" }; + option deprecated = true; + } + + // RollbackApplication syncs an application to its target state + rpc RollbackApplication(ApplicationRollbackRequest) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) { + option (google.api.http) = { + post: "/api/v1/applications/{name}/rollback" + body: "*" + }; } // TerminateOperation terminates the currently running operation From 06bb6a1699f320c243aee46384d86bd25c4d040e Mon Sep 17 00:00:00 2001 From: jannfis Date: Sat, 1 Feb 2020 13:03:33 +0100 Subject: [PATCH 2/5] Deprecate ambiguous API methods in ClusterService --- assets/swagger.json | 32 +-- cmd/argocd/commands/cluster.go | 8 +- pkg/apiclient/cluster/cluster.pb.go | 290 +++++++++++++++++++++---- pkg/apiclient/cluster/cluster.pb.gw.go | 288 ++++++++++++++++++++++++ server/cluster/cluster.go | 45 +++- server/cluster/cluster.proto | 51 ++++- 6 files changed, 633 insertions(+), 81 deletions(-) diff --git a/assets/swagger.json b/assets/swagger.json index 819de1fa766f8..f58cf1d0853a9 100644 --- a/assets/swagger.json +++ b/assets/swagger.json @@ -981,8 +981,8 @@ "tags": [ "ClusterService" ], - "summary": "List returns list of clusters", - "operationId": "List", + "summary": "ListClusters returns list of clusters", + "operationId": "ListClusters", "parameters": [ { "type": "string", @@ -1003,8 +1003,8 @@ "tags": [ "ClusterService" ], - "summary": "Create creates a cluster", - "operationId": "Create", + "summary": "CreateCluster creates a cluster", + "operationId": "CreateCluster", "parameters": [ { "name": "body", @@ -1030,8 +1030,8 @@ "tags": [ "ClusterService" ], - "summary": "Update updates a cluster", - "operationId": "Update", + "summary": "UpdateCluster updates a cluster", + "operationId": "UpdateCluster", "parameters": [ { "type": "string", @@ -1063,8 +1063,8 @@ "tags": [ "ClusterService" ], - "summary": "Get returns a cluster by server address", - "operationId": "Get", + "summary": "GetCluster returns a cluster by server address", + "operationId": "GetCluster", "parameters": [ { "type": "string", @@ -1086,8 +1086,8 @@ "tags": [ "ClusterService" ], - "summary": "Delete deletes a cluster", - "operationId": "Delete", + "summary": "DeleteCluster deletes a cluster", + "operationId": "DeleteCluster", "parameters": [ { "type": "string", @@ -1111,7 +1111,7 @@ "tags": [ "ClusterService" ], - "summary": "RotateAuth returns a cluster by server address", + "summary": "RotateAuth rotates the bearer token used for a cluster", "operationId": "RotateAuth", "parameters": [ { @@ -1137,7 +1137,7 @@ "ProjectService" ], "summary": "List returns list of projects", - "operationId": "ListMixin5", + "operationId": "List", "parameters": [ { "type": "string", @@ -1159,7 +1159,7 @@ "ProjectService" ], "summary": "Create a new project.", - "operationId": "CreateMixin5", + "operationId": "Create", "parameters": [ { "name": "body", @@ -1186,7 +1186,7 @@ "ProjectService" ], "summary": "Get returns a project by name", - "operationId": "GetMixin5", + "operationId": "Get", "parameters": [ { "type": "string", @@ -1209,7 +1209,7 @@ "ProjectService" ], "summary": "Delete deletes a project", - "operationId": "DeleteMixin5", + "operationId": "Delete", "parameters": [ { "type": "string", @@ -1284,7 +1284,7 @@ "ProjectService" ], "summary": "Update updates a project", - "operationId": "UpdateMixin5", + "operationId": "Update", "parameters": [ { "type": "string", diff --git a/cmd/argocd/commands/cluster.go b/cmd/argocd/commands/cluster.go index c6c85c2c71dcb..9a83e6d761004 100644 --- a/cmd/argocd/commands/cluster.go +++ b/cmd/argocd/commands/cluster.go @@ -114,7 +114,7 @@ func NewClusterAddCommand(clientOpts *argocdclient.ClientOptions, pathOpts *clie Cluster: clst, Upsert: upsert, } - _, err = clusterIf.Create(context.Background(), &clstCreateReq) + _, err = clusterIf.CreateCluster(context.Background(), &clstCreateReq) errors.CheckError(err) fmt.Printf("Cluster '%s' added\n", clst.Server) }, @@ -210,7 +210,7 @@ func NewClusterGetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command defer util.Close(conn) clusters := make([]argoappv1.Cluster, 0) for _, clusterName := range args { - clst, err := clusterIf.Get(context.Background(), &clusterpkg.ClusterQuery{Server: clusterName}) + clst, err := clusterIf.GetCluster(context.Background(), &clusterpkg.ClusterQuery{Server: clusterName}) errors.CheckError(err) clusters = append(clusters, *clst) } @@ -285,7 +285,7 @@ func NewClusterRemoveCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comm // TODO(jessesuen): find the right context and remove manager RBAC artifacts // err := clusterauth.UninstallClusterManagerRBAC(clientset) // errors.CheckError(err) - _, err := clusterIf.Delete(context.Background(), &clusterpkg.ClusterQuery{Server: clusterName}) + _, err := clusterIf.DeleteCluster(context.Background(), &clusterpkg.ClusterQuery{Server: clusterName}) errors.CheckError(err) } }, @@ -325,7 +325,7 @@ func NewClusterListCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comman Run: func(c *cobra.Command, args []string) { conn, clusterIf := argocdclient.NewClientOrDie(clientOpts).NewClusterClientOrDie() defer util.Close(conn) - clusters, err := clusterIf.List(context.Background(), &clusterpkg.ClusterQuery{}) + clusters, err := clusterIf.ListClusters(context.Background(), &clusterpkg.ClusterQuery{}) errors.CheckError(err) switch output { case "yaml", "json": diff --git a/pkg/apiclient/cluster/cluster.pb.go b/pkg/apiclient/cluster/cluster.pb.go index ab8922ff51d96..a189acf80629b 100644 --- a/pkg/apiclient/cluster/cluster.pb.go +++ b/pkg/apiclient/cluster/cluster.pb.go @@ -233,39 +233,44 @@ func init() { func init() { proto.RegisterFile("server/cluster/cluster.proto", fileDescriptor_a6b5ba0b5aa57b32) } var fileDescriptor_a6b5ba0b5aa57b32 = []byte{ - // 502 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x4f, 0x8b, 0x13, 0x3f, - 0x18, 0xc7, 0xc9, 0xfe, 0x7e, 0x8c, 0x1a, 0xc5, 0x3f, 0x61, 0x95, 0x3a, 0xae, 0x65, 0x37, 0xa0, - 0x2e, 0x62, 0x13, 0x5a, 0x2f, 0xe2, 0x45, 0xdc, 0x15, 0x45, 0xf0, 0xe2, 0x88, 0x17, 0x59, 0x90, - 0xec, 0xf4, 0x61, 0x3a, 0x76, 0x9c, 0xc4, 0x24, 0x33, 0x20, 0x22, 0x82, 0x5e, 0xc5, 0x8b, 0xe0, - 0xd5, 0xb7, 0xe3, 0x51, 0xf0, 0x0d, 0x48, 0xf1, 0x85, 0xc8, 0x64, 0x92, 0x76, 0xb7, 0xa5, 0xa2, - 0x58, 0x3c, 0x35, 0x79, 0x92, 0x7e, 0xbf, 0x9f, 0x7c, 0xf3, 0x4c, 0xf0, 0x86, 0x01, 0x5d, 0x83, - 0xe6, 0x69, 0x51, 0x19, 0x3b, 0xfb, 0x65, 0x4a, 0x4b, 0x2b, 0xc9, 0x11, 0x3f, 0x8d, 0xd7, 0x33, - 0x99, 0x49, 0x57, 0xe3, 0xcd, 0xa8, 0x5d, 0x8e, 0x37, 0x32, 0x29, 0xb3, 0x02, 0xb8, 0x50, 0x39, - 0x17, 0x65, 0x29, 0xad, 0xb0, 0xb9, 0x2c, 0x8d, 0x5f, 0xa5, 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00, + // 584 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0x4d, 0x6b, 0x13, 0x41, + 0x18, 0xc7, 0x99, 0x2a, 0x51, 0xa7, 0x8d, 0x2f, 0x43, 0x95, 0x98, 0xd6, 0xd0, 0x2c, 0xbe, 0x14, + 0x31, 0x33, 0x24, 0x22, 0x88, 0x17, 0xb1, 0x15, 0x8b, 0xe0, 0xc5, 0x88, 0x17, 0x11, 0xca, 0x76, + 0xf3, 0xb0, 0x59, 0xb3, 0xee, 0x8c, 0x33, 0xb3, 0x0b, 0x22, 0x5e, 0x7a, 0x50, 0x11, 0x2f, 0x22, + 0x7e, 0x01, 0x0f, 0x7e, 0x16, 0x8f, 0x82, 0x5f, 0x40, 0xa2, 0x1f, 0x44, 0x76, 0x76, 0xa6, 0x6d, + 0x12, 0xd6, 0x58, 0x4c, 0x7b, 0xca, 0xcc, 0x33, 0x33, 0xcf, 0xff, 0x97, 0xe7, 0xf9, 0xcf, 0x0e, + 0x5e, 0x56, 0x20, 0x33, 0x90, 0x2c, 0x88, 0x53, 0xa5, 0x77, 0x7f, 0xa9, 0x90, 0x5c, 0x73, 0x72, + 0xcc, 0x4e, 0xeb, 0x8b, 0x21, 0x0f, 0xb9, 0x89, 0xb1, 0x7c, 0x54, 0x2c, 0xd7, 0x97, 0x43, 0xce, + 0xc3, 0x18, 0x98, 0x2f, 0x22, 0xe6, 0x27, 0x09, 0xd7, 0xbe, 0x8e, 0x78, 0xa2, 0xec, 0xaa, 0x37, + 0xb8, 0xa9, 0x68, 0xc4, 0xcd, 0x6a, 0xc0, 0x25, 0xb0, 0xac, 0xcd, 0x42, 0x48, 0x40, 0xfa, 0x1a, + 0x7a, 0x76, 0xcf, 0xfd, 0x30, 0xd2, 0xfd, 0x74, 0x8b, 0x06, 0xfc, 0x39, 0xf3, 0xa5, 0x91, 0x78, + 0x66, 0x06, 0xad, 0xa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+ 0xc3, 0x06, 0xfa, 0x3e, 0x6c, 0xa0, 0x9f, 0xc3, 0x06, 0x7a, 0xd2, 0xfe, 0x87, 0xe7, 0x37, 0x88, + 0x23, 0x48, 0xb4, 0x4b, 0xbb, 0x55, 0x31, 0xaf, 0xed, 0xf5, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x58, 0x97, 0x37, 0xed, 0x39, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -280,17 +285,27 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ClusterServiceClient interface { - // List returns list of clusters + // DEPRECATED: List returns list of clusters List(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.ClusterList, error) - // Create creates a cluster + // ListClusters returns list of clusters + ListClusters(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.ClusterList, error) + // DEPRECATED: Create creates a cluster Create(ctx context.Context, in *ClusterCreateRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) - // Get returns a cluster by server address + // CreateCluster creates a cluster + CreateCluster(ctx context.Context, in *ClusterCreateRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) + // DEPRECATED: Get returns a cluster by server address Get(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) - // Update updates a cluster + // GetCluster returns a cluster by server address + GetCluster(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) + // DEPRECATED: Update updates a cluster Update(ctx context.Context, in *ClusterUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) - // Delete deletes a cluster + // UpdateCluster updates a cluster + UpdateCluster(ctx context.Context, in *ClusterUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) + // DEPRECATED: Delete deletes a cluster Delete(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*ClusterResponse, error) - // RotateAuth returns a cluster by server address + // DeleteCluster deletes a cluster + DeleteCluster(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*ClusterResponse, error) + // RotateAuth rotates the bearer token used for a cluster RotateAuth(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*ClusterResponse, error) } @@ -302,6 +317,7 @@ func NewClusterServiceClient(cc *grpc.ClientConn) ClusterServiceClient { return &clusterServiceClient{cc} } +// Deprecated: Do not use. func (c *clusterServiceClient) List(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.ClusterList, error) { out := new(v1alpha1.ClusterList) err := c.cc.Invoke(ctx, "/cluster.ClusterService/List", in, out, opts...) @@ -311,6 +327,16 @@ func (c *clusterServiceClient) List(ctx context.Context, in *ClusterQuery, opts return out, nil } +func (c *clusterServiceClient) ListClusters(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.ClusterList, error) { + out := new(v1alpha1.ClusterList) + err := c.cc.Invoke(ctx, "/cluster.ClusterService/ListClusters", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Deprecated: Do not use. func (c *clusterServiceClient) Create(ctx context.Context, in *ClusterCreateRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { out := new(v1alpha1.Cluster) err := c.cc.Invoke(ctx, "/cluster.ClusterService/Create", in, out, opts...) @@ -320,6 +346,16 @@ func (c *clusterServiceClient) Create(ctx context.Context, in *ClusterCreateRequ return out, nil } +func (c *clusterServiceClient) CreateCluster(ctx context.Context, in *ClusterCreateRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { + out := new(v1alpha1.Cluster) + err := c.cc.Invoke(ctx, "/cluster.ClusterService/CreateCluster", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Deprecated: Do not use. func (c *clusterServiceClient) Get(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { out := new(v1alpha1.Cluster) err := c.cc.Invoke(ctx, "/cluster.ClusterService/Get", in, out, opts...) @@ -329,6 +365,16 @@ func (c *clusterServiceClient) Get(ctx context.Context, in *ClusterQuery, opts . return out, nil } +func (c *clusterServiceClient) GetCluster(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { + out := new(v1alpha1.Cluster) + err := c.cc.Invoke(ctx, "/cluster.ClusterService/GetCluster", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Deprecated: Do not use. func (c *clusterServiceClient) Update(ctx context.Context, in *ClusterUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { out := new(v1alpha1.Cluster) err := c.cc.Invoke(ctx, "/cluster.ClusterService/Update", in, out, opts...) @@ -338,6 +384,16 @@ func (c *clusterServiceClient) Update(ctx context.Context, in *ClusterUpdateRequ return out, nil } +func (c *clusterServiceClient) UpdateCluster(ctx context.Context, in *ClusterUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.Cluster, error) { + out := new(v1alpha1.Cluster) + err := c.cc.Invoke(ctx, "/cluster.ClusterService/UpdateCluster", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Deprecated: Do not use. func (c *clusterServiceClient) Delete(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*ClusterResponse, error) { out := new(ClusterResponse) err := c.cc.Invoke(ctx, "/cluster.ClusterService/Delete", in, out, opts...) @@ -347,6 +403,15 @@ func (c *clusterServiceClient) Delete(ctx context.Context, in *ClusterQuery, opt return out, nil } +func (c *clusterServiceClient) DeleteCluster(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*ClusterResponse, error) { + out := new(ClusterResponse) + err := c.cc.Invoke(ctx, "/cluster.ClusterService/DeleteCluster", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *clusterServiceClient) RotateAuth(ctx context.Context, in *ClusterQuery, opts ...grpc.CallOption) (*ClusterResponse, error) { out := new(ClusterResponse) err := c.cc.Invoke(ctx, "/cluster.ClusterService/RotateAuth", in, out, opts...) @@ -358,17 +423,27 @@ func (c *clusterServiceClient) RotateAuth(ctx context.Context, in *ClusterQuery, // ClusterServiceServer is the server API for ClusterService service. type ClusterServiceServer interface { - // List returns list of clusters + // DEPRECATED: List returns list of clusters List(context.Context, *ClusterQuery) (*v1alpha1.ClusterList, error) - // Create creates a cluster + // ListClusters returns list of clusters + ListClusters(context.Context, *ClusterQuery) (*v1alpha1.ClusterList, error) + // DEPRECATED: Create creates a cluster Create(context.Context, *ClusterCreateRequest) (*v1alpha1.Cluster, error) - // Get returns a cluster by server address + // CreateCluster creates a cluster + CreateCluster(context.Context, *ClusterCreateRequest) (*v1alpha1.Cluster, error) + // DEPRECATED: Get returns a cluster by server address Get(context.Context, *ClusterQuery) (*v1alpha1.Cluster, error) - // Update updates a cluster + // GetCluster returns a cluster by server address + GetCluster(context.Context, *ClusterQuery) (*v1alpha1.Cluster, error) + // DEPRECATED: Update updates a cluster Update(context.Context, *ClusterUpdateRequest) (*v1alpha1.Cluster, error) - // Delete deletes a cluster + // UpdateCluster updates a cluster + UpdateCluster(context.Context, *ClusterUpdateRequest) (*v1alpha1.Cluster, error) + // DEPRECATED: Delete deletes a cluster Delete(context.Context, *ClusterQuery) (*ClusterResponse, error) - // RotateAuth returns a cluster by server address + // DeleteCluster deletes a cluster + DeleteCluster(context.Context, *ClusterQuery) (*ClusterResponse, error) + // RotateAuth rotates the bearer token used for a cluster RotateAuth(context.Context, *ClusterQuery) (*ClusterResponse, error) } @@ -379,18 +454,33 @@ type UnimplementedClusterServiceServer struct { func (*UnimplementedClusterServiceServer) List(ctx context.Context, req *ClusterQuery) (*v1alpha1.ClusterList, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } +func (*UnimplementedClusterServiceServer) ListClusters(ctx context.Context, req *ClusterQuery) (*v1alpha1.ClusterList, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListClusters not implemented") +} func (*UnimplementedClusterServiceServer) Create(ctx context.Context, req *ClusterCreateRequest) (*v1alpha1.Cluster, error) { return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") } +func (*UnimplementedClusterServiceServer) CreateCluster(ctx context.Context, req *ClusterCreateRequest) (*v1alpha1.Cluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateCluster not implemented") +} func (*UnimplementedClusterServiceServer) Get(ctx context.Context, req *ClusterQuery) (*v1alpha1.Cluster, error) { return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") } +func (*UnimplementedClusterServiceServer) GetCluster(ctx context.Context, req *ClusterQuery) (*v1alpha1.Cluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCluster not implemented") +} func (*UnimplementedClusterServiceServer) Update(ctx context.Context, req *ClusterUpdateRequest) (*v1alpha1.Cluster, error) { return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") } +func (*UnimplementedClusterServiceServer) UpdateCluster(ctx context.Context, req *ClusterUpdateRequest) (*v1alpha1.Cluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateCluster not implemented") +} func (*UnimplementedClusterServiceServer) Delete(ctx context.Context, req *ClusterQuery) (*ClusterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") } +func (*UnimplementedClusterServiceServer) DeleteCluster(ctx context.Context, req *ClusterQuery) (*ClusterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteCluster not implemented") +} func (*UnimplementedClusterServiceServer) RotateAuth(ctx context.Context, req *ClusterQuery) (*ClusterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RotateAuth not implemented") } @@ -417,6 +507,24 @@ func _ClusterService_List_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _ClusterService_ListClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClusterQuery) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).ListClusters(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cluster.ClusterService/ListClusters", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).ListClusters(ctx, req.(*ClusterQuery)) + } + return interceptor(ctx, in, info, handler) +} + func _ClusterService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ClusterCreateRequest) if err := dec(in); err != nil { @@ -435,6 +543,24 @@ func _ClusterService_Create_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _ClusterService_CreateCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClusterCreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).CreateCluster(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cluster.ClusterService/CreateCluster", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).CreateCluster(ctx, req.(*ClusterCreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _ClusterService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ClusterQuery) if err := dec(in); err != nil { @@ -453,6 +579,24 @@ func _ClusterService_Get_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _ClusterService_GetCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClusterQuery) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).GetCluster(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cluster.ClusterService/GetCluster", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).GetCluster(ctx, req.(*ClusterQuery)) + } + return interceptor(ctx, in, info, handler) +} + func _ClusterService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ClusterUpdateRequest) if err := dec(in); err != nil { @@ -471,6 +615,24 @@ func _ClusterService_Update_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _ClusterService_UpdateCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClusterUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).UpdateCluster(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cluster.ClusterService/UpdateCluster", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).UpdateCluster(ctx, req.(*ClusterUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _ClusterService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ClusterQuery) if err := dec(in); err != nil { @@ -489,6 +651,24 @@ func _ClusterService_Delete_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _ClusterService_DeleteCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClusterQuery) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServiceServer).DeleteCluster(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cluster.ClusterService/DeleteCluster", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServiceServer).DeleteCluster(ctx, req.(*ClusterQuery)) + } + return interceptor(ctx, in, info, handler) +} + func _ClusterService_RotateAuth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ClusterQuery) if err := dec(in); err != nil { @@ -515,22 +695,42 @@ var _ClusterService_serviceDesc = grpc.ServiceDesc{ MethodName: "List", Handler: _ClusterService_List_Handler, }, + { + MethodName: "ListClusters", + Handler: _ClusterService_ListClusters_Handler, + }, { MethodName: "Create", Handler: _ClusterService_Create_Handler, }, + { + MethodName: "CreateCluster", + Handler: _ClusterService_CreateCluster_Handler, + }, { MethodName: "Get", Handler: _ClusterService_Get_Handler, }, + { + MethodName: "GetCluster", + Handler: _ClusterService_GetCluster_Handler, + }, { MethodName: "Update", Handler: _ClusterService_Update_Handler, }, + { + MethodName: "UpdateCluster", + Handler: _ClusterService_UpdateCluster_Handler, + }, { MethodName: "Delete", Handler: _ClusterService_Delete_Handler, }, + { + MethodName: "DeleteCluster", + Handler: _ClusterService_DeleteCluster_Handler, + }, { MethodName: "RotateAuth", Handler: _ClusterService_RotateAuth_Handler, diff --git a/pkg/apiclient/cluster/cluster.pb.gw.go b/pkg/apiclient/cluster/cluster.pb.gw.go index 8d5b58c2823c9..1df71648bbe0e 100644 --- a/pkg/apiclient/cluster/cluster.pb.gw.go +++ b/pkg/apiclient/cluster/cluster.pb.gw.go @@ -45,6 +45,23 @@ func request_ClusterService_List_0(ctx context.Context, marshaler runtime.Marsha } +var ( + filter_ClusterService_ListClusters_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_ClusterService_ListClusters_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ClusterQuery + var metadata runtime.ServerMetadata + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ClusterService_ListClusters_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListClusters(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + var ( filter_ClusterService_Create_0 = &utilities.DoubleArray{Encoding: map[string]int{"cluster": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -66,6 +83,27 @@ func request_ClusterService_Create_0(ctx context.Context, marshaler runtime.Mars } +var ( + filter_ClusterService_CreateCluster_0 = &utilities.DoubleArray{Encoding: map[string]int{"cluster": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_ClusterService_CreateCluster_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ClusterCreateRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Cluster); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ClusterService_CreateCluster_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + func request_ClusterService_Get_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ClusterQuery var metadata runtime.ServerMetadata @@ -93,6 +131,33 @@ func request_ClusterService_Get_0(ctx context.Context, marshaler runtime.Marshal } +func request_ClusterService_GetCluster_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ClusterQuery + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["server"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "server") + } + + protoReq.Server, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "server", err) + } + + msg, err := client.GetCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + func request_ClusterService_Update_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ClusterUpdateRequest var metadata runtime.ServerMetadata @@ -124,6 +189,37 @@ func request_ClusterService_Update_0(ctx context.Context, marshaler runtime.Mars } +func request_ClusterService_UpdateCluster_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ClusterUpdateRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Cluster); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["cluster.server"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "cluster.server") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "cluster.server", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "cluster.server", err) + } + + msg, err := client.UpdateCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + func request_ClusterService_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ClusterQuery var metadata runtime.ServerMetadata @@ -151,6 +247,33 @@ func request_ClusterService_Delete_0(ctx context.Context, marshaler runtime.Mars } +func request_ClusterService_DeleteCluster_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ClusterQuery + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["server"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "server") + } + + protoReq.Server, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "server", err) + } + + msg, err := client.DeleteCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + func request_ClusterService_RotateAuth_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ClusterQuery var metadata runtime.ServerMetadata @@ -245,6 +368,35 @@ func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_ClusterService_ListClusters_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ClusterService_ListClusters_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ClusterService_ListClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_ClusterService_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -274,6 +426,35 @@ func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("POST", pattern_ClusterService_CreateCluster_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ClusterService_CreateCluster_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ClusterService_CreateCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_ClusterService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -303,6 +484,35 @@ func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_ClusterService_GetCluster_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ClusterService_GetCluster_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ClusterService_GetCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("PUT", pattern_ClusterService_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -332,6 +542,35 @@ func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("PUT", pattern_ClusterService_UpdateCluster_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ClusterService_UpdateCluster_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ClusterService_UpdateCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("DELETE", pattern_ClusterService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -361,6 +600,35 @@ func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("DELETE", pattern_ClusterService_DeleteCluster_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ClusterService_DeleteCluster_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ClusterService_DeleteCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_ClusterService_RotateAuth_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -396,27 +664,47 @@ func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.Serve var ( pattern_ClusterService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "clusters"}, "")) + pattern_ClusterService_ListClusters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "clusters"}, "")) + pattern_ClusterService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "clusters"}, "")) + pattern_ClusterService_CreateCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "clusters"}, "")) + pattern_ClusterService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "clusters", "server"}, "")) + pattern_ClusterService_GetCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "clusters", "server"}, "")) + pattern_ClusterService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "clusters", "cluster.server"}, "")) + pattern_ClusterService_UpdateCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "clusters", "cluster.server"}, "")) + pattern_ClusterService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "clusters", "server"}, "")) + pattern_ClusterService_DeleteCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "clusters", "server"}, "")) + pattern_ClusterService_RotateAuth_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "clusters", "server", "rotate-auth"}, "")) ) var ( forward_ClusterService_List_0 = runtime.ForwardResponseMessage + forward_ClusterService_ListClusters_0 = runtime.ForwardResponseMessage + forward_ClusterService_Create_0 = runtime.ForwardResponseMessage + forward_ClusterService_CreateCluster_0 = runtime.ForwardResponseMessage + forward_ClusterService_Get_0 = runtime.ForwardResponseMessage + forward_ClusterService_GetCluster_0 = runtime.ForwardResponseMessage + forward_ClusterService_Update_0 = runtime.ForwardResponseMessage + forward_ClusterService_UpdateCluster_0 = runtime.ForwardResponseMessage + forward_ClusterService_Delete_0 = runtime.ForwardResponseMessage + forward_ClusterService_DeleteCluster_0 = runtime.ForwardResponseMessage + forward_ClusterService_RotateAuth_0 = runtime.ForwardResponseMessage ) diff --git a/server/cluster/cluster.go b/server/cluster/cluster.go index 3cb6f34e514fc..907f25a17c426 100644 --- a/server/cluster/cluster.go +++ b/server/cluster/cluster.go @@ -75,8 +75,8 @@ func (s *Server) getConnectionState(cluster appv1.Cluster, errorMessage string) return clusterInfo.ConnectionState, clusterInfo.Version } -// List returns list of clusters -func (s *Server) List(ctx context.Context, q *cluster.ClusterQuery) (*appv1.ClusterList, error) { +// ListClusters returns list of clusters +func (s *Server) ListClusters(ctx context.Context, q *cluster.ClusterQuery) (*appv1.ClusterList, error) { clusterList, err := s.db.ListClusters(ctx) if err != nil { return nil, err @@ -116,8 +116,13 @@ func (s *Server) List(ctx context.Context, q *cluster.ClusterQuery) (*appv1.Clus return clusterList, err } -// Create creates a cluster -func (s *Server) Create(ctx context.Context, q *cluster.ClusterCreateRequest) (*appv1.Cluster, error) { +// DEPRECATED: List returns list of clusters +func (s *Server) List(ctx context.Context, q *cluster.ClusterQuery) (*appv1.ClusterList, error) { + return s.ListClusters(ctx, q) +} + +// CreateCluster creates a cluster +func (s *Server) CreateCluster(ctx context.Context, q *cluster.ClusterCreateRequest) (*appv1.Cluster, error) { if err := s.enf.EnforceErr(ctx.Value("claims"), rbacpolicy.ResourceClusters, rbacpolicy.ActionCreate, q.Cluster.Server); err != nil { return nil, err } @@ -149,8 +154,13 @@ func (s *Server) Create(ctx context.Context, q *cluster.ClusterCreateRequest) (* return redact(clust), err } -// Get returns a cluster from a query -func (s *Server) Get(ctx context.Context, q *cluster.ClusterQuery) (*appv1.Cluster, error) { +// DEPRECATED: Create creates a cluster +func (s *Server) Create(ctx context.Context, q *cluster.ClusterCreateRequest) (*appv1.Cluster, error) { + return s.CreateCluster(ctx, q) +} + +// GetCluster returns a cluster from a query +func (s *Server) GetCluster(ctx context.Context, q *cluster.ClusterQuery) (*appv1.Cluster, error) { if err := s.enf.EnforceErr(ctx.Value("claims"), rbacpolicy.ResourceClusters, rbacpolicy.ActionGet, q.Server); err != nil { return nil, err } @@ -165,8 +175,13 @@ func (s *Server) Get(ctx context.Context, q *cluster.ClusterQuery) (*appv1.Clust return redact(c), nil } -// Update updates a cluster -func (s *Server) Update(ctx context.Context, q *cluster.ClusterUpdateRequest) (*appv1.Cluster, error) { +// DEPRECATED: Get returns a cluster from a query +func (s *Server) Get(ctx context.Context, q *cluster.ClusterQuery) (*appv1.Cluster, error) { + return s.GetCluster(ctx, q) +} + +// UpdateCluster updates a cluster +func (s *Server) UpdateCluster(ctx context.Context, q *cluster.ClusterUpdateRequest) (*appv1.Cluster, error) { if err := s.enf.EnforceErr(ctx.Value("claims"), rbacpolicy.ResourceClusters, rbacpolicy.ActionUpdate, q.Cluster.Server); err != nil { return nil, err } @@ -178,8 +193,13 @@ func (s *Server) Update(ctx context.Context, q *cluster.ClusterUpdateRequest) (* return redact(clust), err } -// Delete deletes a cluster by name -func (s *Server) Delete(ctx context.Context, q *cluster.ClusterQuery) (*cluster.ClusterResponse, error) { +// DEPRECATED: Update updates a cluster +func (s *Server) Update(ctx context.Context, q *cluster.ClusterUpdateRequest) (*appv1.Cluster, error) { + return s.UpdateCluster(ctx, q) +} + +// DeleteCluster deletes a cluster by name +func (s *Server) DeleteCluster(ctx context.Context, q *cluster.ClusterQuery) (*cluster.ClusterResponse, error) { if err := s.enf.EnforceErr(ctx.Value("claims"), rbacpolicy.ResourceClusters, rbacpolicy.ActionDelete, q.Server); err != nil { return nil, err } @@ -187,6 +207,11 @@ func (s *Server) Delete(ctx context.Context, q *cluster.ClusterQuery) (*cluster. return &cluster.ClusterResponse{}, err } +// DEPRECATED: Delete deletes a cluster by name +func (s *Server) Delete(ctx context.Context, q *cluster.ClusterQuery) (*cluster.ClusterResponse, error) { + return s.DeleteCluster(ctx, q) +} + // RotateAuth rotates the bearer token used for a cluster func (s *Server) RotateAuth(ctx context.Context, q *cluster.ClusterQuery) (*cluster.ClusterResponse, error) { if err := s.enf.EnforceErr(ctx.Value("claims"), rbacpolicy.ResourceClusters, rbacpolicy.ActionUpdate, q.Server); err != nil { diff --git a/server/cluster/cluster.proto b/server/cluster/cluster.proto index 71434fc453bb2..d6584b2ca602e 100644 --- a/server/cluster/cluster.proto +++ b/server/cluster/cluster.proto @@ -17,13 +17,16 @@ message ClusterQuery { string server = 1; } +// ClusterResponse is a generic and empty response for methods in ClusterService API message ClusterResponse {} +// ClusterCreateRequest is a request for creating a new cluster resource message ClusterCreateRequest { jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Cluster cluster = 1; bool upsert = 2; } +// ClusterUpdateRequest is a request for updating an existing cluster resource message ClusterUpdateRequest { jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Cluster cluster = 1; } @@ -31,38 +34,74 @@ message ClusterUpdateRequest { // ClusterService service ClusterService { - // List returns list of clusters + // DEPRECATED: List returns list of clusters rpc List(ClusterQuery) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.ClusterList) { option (google.api.http).get = "/api/v1/clusters"; + option deprecated = true; } - // Create creates a cluster + // ListClusters returns list of clusters + rpc ListClusters(ClusterQuery) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.ClusterList) { + option (google.api.http).get = "/api/v1/clusters"; + } + + // DEPRECATED: Create creates a cluster rpc Create(ClusterCreateRequest) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Cluster) { option (google.api.http) = { post: "/api/v1/clusters" body: "cluster" }; + option deprecated = true; } - // Get returns a cluster by server address + // CreateCluster creates a cluster + rpc CreateCluster(ClusterCreateRequest) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Cluster) { + option (google.api.http) = { + post: "/api/v1/clusters" + body: "cluster" + }; + } + + // DEPRECATED: Get returns a cluster by server address rpc Get(ClusterQuery) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Cluster) { option (google.api.http).get = "/api/v1/clusters/{server}"; + option deprecated = true; } - // Update updates a cluster + // GetCluster returns a cluster by server address + rpc GetCluster(ClusterQuery) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Cluster) { + option (google.api.http).get = "/api/v1/clusters/{server}"; + } + + // DEPRECATED: Update updates a cluster rpc Update(ClusterUpdateRequest) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Cluster) { option (google.api.http) = { put: "/api/v1/clusters/{cluster.server}" body: "cluster" }; + option deprecated = true; + } + + // UpdateCluster updates a cluster + rpc UpdateCluster(ClusterUpdateRequest) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.Cluster) { + option (google.api.http) = { + put: "/api/v1/clusters/{cluster.server}" + body: "cluster" + }; } - // Delete deletes a cluster + // DEPRECATED: Delete deletes a cluster rpc Delete(ClusterQuery) returns (ClusterResponse) { option (google.api.http).delete = "/api/v1/clusters/{server}"; + option deprecated = true; + } + + // DeleteCluster deletes a cluster + rpc DeleteCluster(ClusterQuery) returns (ClusterResponse) { + option (google.api.http).delete = "/api/v1/clusters/{server}"; } - // RotateAuth returns a cluster by server address + // RotateAuth rotates the bearer token used for a cluster rpc RotateAuth(ClusterQuery) returns (ClusterResponse) { option (google.api.http).post = "/api/v1/clusters/{server}/rotate-auth"; } From c1ce0a4722bd98cb21a20e8ca390dee3e4d16728 Mon Sep 17 00:00:00 2001 From: jannfis Date: Sat, 1 Feb 2020 13:58:39 +0100 Subject: [PATCH 3/5] Deprecate ambiguous API methods in ProjectService --- assets/swagger.json | 29 +-- cmd/argocd/commands/project.go | 38 +-- cmd/argocd/commands/projectwindows.go | 22 +- pkg/apiclient/cluster/cluster.pb.go | 3 + pkg/apiclient/project/project.pb.go | 320 ++++++++++++++++++++----- pkg/apiclient/project/project.pb.gw.go | 280 ++++++++++++++++++++++ server/project/project.go | 45 +++- server/project/project.proto | 44 +++- 8 files changed, 663 insertions(+), 118 deletions(-) diff --git a/assets/swagger.json b/assets/swagger.json index f58cf1d0853a9..2e13caae3936f 100644 --- a/assets/swagger.json +++ b/assets/swagger.json @@ -1136,8 +1136,8 @@ "tags": [ "ProjectService" ], - "summary": "List returns list of projects", - "operationId": "List", + "summary": "ListProjects returns list of projects", + "operationId": "ListProjects", "parameters": [ { "type": "string", @@ -1158,8 +1158,8 @@ "tags": [ "ProjectService" ], - "summary": "Create a new project.", - "operationId": "Create", + "summary": "CreateProject a new project.", + "operationId": "CreateProject", "parameters": [ { "name": "body", @@ -1185,8 +1185,8 @@ "tags": [ "ProjectService" ], - "summary": "Get returns a project by name", - "operationId": "Get", + "summary": "GetProject returns a project by name", + "operationId": "GetProject", "parameters": [ { "type": "string", @@ -1208,8 +1208,8 @@ "tags": [ "ProjectService" ], - "summary": "Delete deletes a project", - "operationId": "Delete", + "summary": "DeleteProject deletes a project", + "operationId": "DeleteProject", "parameters": [ { "type": "string", @@ -1283,8 +1283,8 @@ "tags": [ "ProjectService" ], - "summary": "Update updates a project", - "operationId": "Update", + "summary": "UpdateProject updates a project", + "operationId": "UpdateProject", "parameters": [ { "type": "string", @@ -1744,7 +1744,7 @@ "SessionService" ], "summary": "Create a new JWT for authentication and set a cookie if using HTTP.", - "operationId": "CreateMixin10", + "operationId": "Create", "parameters": [ { "name": "body", @@ -1769,7 +1769,7 @@ "SessionService" ], "summary": "Delete an existing JWT cookie if using HTTP.", - "operationId": "DeleteMixin10", + "operationId": "Delete", "responses": { "200": { "description": "(empty)", @@ -1803,7 +1803,7 @@ "SettingsService" ], "summary": "Get returns Argo CD settings", - "operationId": "GetMixin7", + "operationId": "Get", "responses": { "200": { "description": "(empty)", @@ -2064,7 +2064,8 @@ } }, "clusterClusterResponse": { - "type": "object" + "type": "object", + "title": "ClusterResponse is a generic and empty response for methods in ClusterService API" }, "clusterConnector": { "type": "object", diff --git a/cmd/argocd/commands/project.go b/cmd/argocd/commands/project.go index c3c5e875afc93..1d299c9baa76e 100644 --- a/cmd/argocd/commands/project.go +++ b/cmd/argocd/commands/project.go @@ -171,7 +171,7 @@ func NewProjectCreateCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comm } conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) - _, err := projIf.Create(context.Background(), &projectpkg.ProjectCreateRequest{Project: &proj, Upsert: upsert}) + _, err := projIf.CreateProject(context.Background(), &projectpkg.ProjectCreateRequest{Project: &proj, Upsert: upsert}) errors.CheckError(err) }, } @@ -202,7 +202,7 @@ func NewProjectSetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) - proj, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName}) + proj, err := projIf.GetProject(context.Background(), &projectpkg.ProjectQuery{Name: projName}) errors.CheckError(err) visited := 0 @@ -225,7 +225,7 @@ func NewProjectSetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command os.Exit(1) } - _, err = projIf.Update(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) + _, err = projIf.UpdateProject(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) errors.CheckError(err) }, } @@ -249,7 +249,7 @@ func NewProjectAddDestinationCommand(clientOpts *argocdclient.ClientOptions) *co conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) - proj, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName}) + proj, err := projIf.GetProject(context.Background(), &projectpkg.ProjectQuery{Name: projName}) errors.CheckError(err) for _, dest := range proj.Spec.Destinations { @@ -258,7 +258,7 @@ func NewProjectAddDestinationCommand(clientOpts *argocdclient.ClientOptions) *co } } proj.Spec.Destinations = append(proj.Spec.Destinations, v1alpha1.ApplicationDestination{Server: server, Namespace: namespace}) - _, err = projIf.Update(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) + _, err = projIf.UpdateProject(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) errors.CheckError(err) }, } @@ -281,7 +281,7 @@ func NewProjectRemoveDestinationCommand(clientOpts *argocdclient.ClientOptions) conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) - proj, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName}) + proj, err := projIf.GetProject(context.Background(), &projectpkg.ProjectQuery{Name: projName}) errors.CheckError(err) index := -1 @@ -295,7 +295,7 @@ func NewProjectRemoveDestinationCommand(clientOpts *argocdclient.ClientOptions) log.Fatal("Specified destination does not exist in project") } else { proj.Spec.Destinations = append(proj.Spec.Destinations[:index], proj.Spec.Destinations[index+1:]...) - _, err = projIf.Update(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) + _, err = projIf.UpdateProject(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) errors.CheckError(err) } }, @@ -319,7 +319,7 @@ func NewProjectAddSourceCommand(clientOpts *argocdclient.ClientOptions) *cobra.C conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) - proj, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName}) + proj, err := projIf.GetProject(context.Background(), &projectpkg.ProjectQuery{Name: projName}) errors.CheckError(err) for _, item := range proj.Spec.SourceRepos { @@ -333,7 +333,7 @@ func NewProjectAddSourceCommand(clientOpts *argocdclient.ClientOptions) *cobra.C } } proj.Spec.SourceRepos = append(proj.Spec.SourceRepos, url) - _, err = projIf.Update(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) + _, err = projIf.UpdateProject(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) errors.CheckError(err) }, } @@ -353,11 +353,11 @@ func modifyProjectResourceCmd(cmdUse, cmdDesc string, clientOpts *argocdclient.C conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) - proj, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName}) + proj, err := projIf.GetProject(context.Background(), &projectpkg.ProjectQuery{Name: projName}) errors.CheckError(err) if action(proj, group, kind) { - _, err = projIf.Update(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) + _, err = projIf.UpdateProject(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) errors.CheckError(err) } }, @@ -453,7 +453,7 @@ func NewProjectRemoveSourceCommand(clientOpts *argocdclient.ClientOptions) *cobr conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) - proj, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName}) + proj, err := projIf.GetProject(context.Background(), &projectpkg.ProjectQuery{Name: projName}) errors.CheckError(err) index := -1 @@ -467,7 +467,7 @@ func NewProjectRemoveSourceCommand(clientOpts *argocdclient.ClientOptions) *cobr fmt.Printf("Source repository '%s' does not exist in project\n", url) } else { proj.Spec.SourceRepos = append(proj.Spec.SourceRepos[:index], proj.Spec.SourceRepos[index+1:]...) - _, err = projIf.Update(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) + _, err = projIf.UpdateProject(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) errors.CheckError(err) } }, @@ -489,7 +489,7 @@ func NewProjectDeleteCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comm conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) for _, name := range args { - _, err := projIf.Delete(context.Background(), &projectpkg.ProjectQuery{Name: name}) + _, err := projIf.DeleteProject(context.Background(), &projectpkg.ProjectQuery{Name: name}) errors.CheckError(err) } }, @@ -525,7 +525,7 @@ func NewProjectListCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comman Run: func(c *cobra.Command, args []string) { conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) - projects, err := projIf.List(context.Background(), &projectpkg.ProjectQuery{}) + projects, err := projIf.ListProjects(context.Background(), &projectpkg.ProjectQuery{}) errors.CheckError(err) switch output { case "yaml", "json": @@ -651,7 +651,7 @@ func NewProjectGetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command projName := args[0] conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) - p, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName}) + p, err := projIf.GetProject(context.Background(), &projectpkg.ProjectQuery{Name: projName}) errors.CheckError(err) switch output { @@ -681,7 +681,7 @@ func NewProjectEditCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comman projName := args[0] conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) - proj, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName}) + proj, err := projIf.GetProject(context.Background(), &projectpkg.ProjectQuery{Name: projName}) errors.CheckError(err) projData, err := json.Marshal(proj.Spec) errors.CheckError(err) @@ -698,12 +698,12 @@ func NewProjectEditCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comman if err != nil { return err } - proj, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName}) + proj, err := projIf.GetProject(context.Background(), &projectpkg.ProjectQuery{Name: projName}) if err != nil { return err } proj.Spec = updatedSpec - _, err = projIf.Update(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) + _, err = projIf.UpdateProject(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) if err != nil { return fmt.Errorf("Failed to update project:\n%v", err) } diff --git a/cmd/argocd/commands/projectwindows.go b/cmd/argocd/commands/projectwindows.go index 90cbc578914f5..75bd4d25e95b3 100644 --- a/cmd/argocd/commands/projectwindows.go +++ b/cmd/argocd/commands/projectwindows.go @@ -57,7 +57,7 @@ func NewProjectWindowsDisableManualSyncCommand(clientOpts *argocdclient.ClientOp conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) - proj, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName}) + proj, err := projIf.GetProject(context.Background(), &projectpkg.ProjectQuery{Name: projName}) errors.CheckError(err) for i, window := range proj.Spec.SyncWindows { @@ -66,7 +66,7 @@ func NewProjectWindowsDisableManualSyncCommand(clientOpts *argocdclient.ClientOp } } - _, err = projIf.Update(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) + _, err = projIf.UpdateProject(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) errors.CheckError(err) }, } @@ -92,7 +92,7 @@ func NewProjectWindowsEnableManualSyncCommand(clientOpts *argocdclient.ClientOpt conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) - proj, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName}) + proj, err := projIf.GetProject(context.Background(), &projectpkg.ProjectQuery{Name: projName}) errors.CheckError(err) for i, window := range proj.Spec.SyncWindows { @@ -101,7 +101,7 @@ func NewProjectWindowsEnableManualSyncCommand(clientOpts *argocdclient.ClientOpt } } - _, err = projIf.Update(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) + _, err = projIf.UpdateProject(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) errors.CheckError(err) }, } @@ -131,13 +131,13 @@ func NewProjectWindowsAddWindowCommand(clientOpts *argocdclient.ClientOptions) * conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) - proj, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName}) + proj, err := projIf.GetProject(context.Background(), &projectpkg.ProjectQuery{Name: projName}) errors.CheckError(err) err = proj.Spec.AddWindow(kind, schedule, duration, applications, namespaces, clusters, manualSync) errors.CheckError(err) - _, err = projIf.Update(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) + _, err = projIf.UpdateProject(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) errors.CheckError(err) }, } @@ -170,13 +170,13 @@ func NewProjectWindowsDeleteCommand(clientOpts *argocdclient.ClientOptions) *cob conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) - proj, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName}) + proj, err := projIf.GetProject(context.Background(), &projectpkg.ProjectQuery{Name: projName}) errors.CheckError(err) err = proj.Spec.DeleteWindow(id) errors.CheckError(err) - _, err = projIf.Update(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) + _, err = projIf.UpdateProject(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) errors.CheckError(err) }, } @@ -209,7 +209,7 @@ func NewProjectWindowsUpdateCommand(clientOpts *argocdclient.ClientOptions) *cob conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) - proj, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName}) + proj, err := projIf.GetProject(context.Background(), &projectpkg.ProjectQuery{Name: projName}) errors.CheckError(err) for i, window := range proj.Spec.SyncWindows { @@ -221,7 +221,7 @@ func NewProjectWindowsUpdateCommand(clientOpts *argocdclient.ClientOptions) *cob } } - _, err = projIf.Update(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) + _, err = projIf.UpdateProject(context.Background(), &projectpkg.ProjectUpdateRequest{Project: proj}) errors.CheckError(err) }, } @@ -250,7 +250,7 @@ func NewProjectWindowsListCommand(clientOpts *argocdclient.ClientOptions) *cobra conn, projIf := argocdclient.NewClientOrDie(clientOpts).NewProjectClientOrDie() defer util.Close(conn) - proj, err := projIf.Get(context.Background(), &projectpkg.ProjectQuery{Name: projName}) + proj, err := projIf.GetProject(context.Background(), &projectpkg.ProjectQuery{Name: projName}) errors.CheckError(err) switch output { case "yaml", "json": diff --git a/pkg/apiclient/cluster/cluster.pb.go b/pkg/apiclient/cluster/cluster.pb.go index a189acf80629b..c348a9b420f48 100644 --- a/pkg/apiclient/cluster/cluster.pb.go +++ b/pkg/apiclient/cluster/cluster.pb.go @@ -82,6 +82,7 @@ func (m *ClusterQuery) GetServer() string { return "" } +// ClusterResponse is a generic and empty response for methods in ClusterService API type ClusterResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -121,6 +122,7 @@ func (m *ClusterResponse) XXX_DiscardUnknown() { var xxx_messageInfo_ClusterResponse proto.InternalMessageInfo +// ClusterCreateRequest is a request for creating a new cluster resource type ClusterCreateRequest struct { Cluster *v1alpha1.Cluster `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` Upsert bool `protobuf:"varint,2,opt,name=upsert,proto3" json:"upsert,omitempty"` @@ -176,6 +178,7 @@ func (m *ClusterCreateRequest) GetUpsert() bool { return false } +// ClusterUpdateRequest is a request for updating an existing cluster resource type ClusterUpdateRequest struct { Cluster *v1alpha1.Cluster `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` diff --git a/pkg/apiclient/project/project.pb.go b/pkg/apiclient/project/project.pb.go index 03180f2df31a5..a7ef02bdcbfcd 100644 --- a/pkg/apiclient/project/project.pb.go +++ b/pkg/apiclient/project/project.pb.go @@ -519,58 +519,63 @@ func init() { func init() { proto.RegisterFile("server/project/project.proto", fileDescriptor_5f0a51496972c9e2) } var fileDescriptor_5f0a51496972c9e2 = []byte{ - // 803 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xdd, 0x6a, 0x23, 0x37, - 0x14, 0x46, 0x71, 0xea, 0xd4, 0x72, 0x7f, 0x82, 0xf2, 0x53, 0xc7, 0x75, 0x5c, 0x33, 0xa5, 0xc1, - 0xa4, 0x8d, 0x84, 0x93, 0x16, 0x42, 0x7b, 0x51, 0xfa, 0x13, 0x42, 0xa0, 0x17, 0xad, 0xd3, 0xd2, - 0xd2, 0x5e, 0x04, 0x65, 0x7c, 0x98, 0x4c, 0x6c, 0x8f, 0xd4, 0x91, 0x3c, 0xa9, 0x31, 0xbe, 0x09, - 0xa5, 0xd0, 0xf6, 0x62, 0x2f, 0xf6, 0x11, 0xf6, 0x6a, 0xdf, 0x64, 0x2f, 0x17, 0xf6, 0x05, 0x96, - 0xb0, 0x0f, 0xb2, 0x48, 0xf3, 0x63, 0x3b, 0xce, 0x2c, 0xbb, 0xac, 0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x39, 0x63, - 0xf2, 0x00, 0xe1, 0x62, 0x7c, 0xcd, 0xe7, 0x2b, 0x33, 0x73, 0xfd, 0x17, 0xc5, 0xe8, 0xc0, 0x32, - 0xda, 0xab, 0x36, 0x73, 0xfb, 0x88, 0x9a, 0x07, 0xab, 0xc3, 0x35, 0xa7, 0x96, 0xa2, 0xa9, 0xd8, - 0x6f, 0xb8, 0x18, 0x77, 0x69, 0x5e, 0xba, 0xf2, 0xba, 0x36, 0xd1, 0xbf, 0x9b, 0xab, 0xff, 0x12, - 0x63, 0x53, 0xa8, 0xa3, 0x08, 0x02, 0xad, 0xf2, 0xa2, 0x6f, 0xd3, 0xf8, 0x81, 0x35, 0x0a, 0xa9, - 0x79, 0x84, 0x69, 0xd4, 0xa2, 0xf6, 0x88, 0x2d, 0xf2, 0x8e, 0x05, 0x69, 0x90, 0x7a, 0x0e, 0x08, - 0x83, 0x38, 0xfa, 0x08, 0xaf, 0x1d, 0x83, 0x9e, 0x9a, 0x54, 0xa7, 0xda, 0xe4, 0x7d, 0x2b, 0x03, - 0xbd, 0x3d, 0xec, 0xaa, 0xb5, 0xbb, 0xb6, 0x32, 0x71, 0x9f, 0x5a, 0xdc, 0x4f, 0xc8, 0xc7, 0x79, - 0xb8, 0x6a, 0x18, 0xb8, 0xc9, 0xac, 0xfa, 0xf6, 0xeb, 0x47, 0x37, 0x75, 0xf4, 0xf8, 0xa6, 0x8e, - 0x9e, 0xde, 0xd4, 0xd1, 0xef, 0xad, 0x97, 0x78, 0xfb, 0xdd, 0x9e, 0x0f, 0x41, 0xf6, 0x5f, 0xe6, - 0xbc, 0x68, 0x9f, 0xfa, 0x83, 0xe7, 0x01, 0x00, 0x00, 0xff, 0xff, 0x56, 0xfb, 0x73, 0x4b, 0xec, - 0x08, 0x00, 0x00, + // 884 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0xdd, 0x6e, 0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5b, 0xd6, 0x1e, 0x7d, 0x01, 0xad, 0x9c, 0x57, 0x40, + 0x3b, 0x30, 0x97, 0x39, 0xbf, 0xa0, 0x84, 0xca, 0x34, 0xee, 0x5f, 0xa0, 0x41, 0xf7, 0x00, 0xec, + 0x69, 0xda, 0x48, 0x31, 0x2e, 0x3f, 0xb5, 0xf7, 0x58, 0x76, 0x5b, 0xb4, 0x59, 0x64, 0xf6, 0x46, + 0xc9, 0xd2, 0x16, 0x73, 0x4b, 0xdc, 0x49, 0x7c, 0xe0, 0x44, 0x9a, 0xb4, 0x51, 0x22, 0xc2, 0x31, + 0xf3, 0x7e, 0x04, 0xb7, 0x37, 0xd1, 0x8c, 0xfc, 0x76, 0xb7, 0x8d, 0xad, 0xc5, 0xc5, 0x42, 0xf4, + 0xf4, 0x9f, 0xbb, 0xbe, 0x74, 0xd6, 0xa7, 0x22, 0xb8, 0x57, 0x9d, 0xee, 0x2b, 0xf4, 0xe5, 0x32, + 0x5d, 0x3d, 0x88, 0x43, 0xff, 0xe3, 0x7d, 0xf7, 0xed, 0xdf, 0x4e, 0x1a, 0xe4, 0xf7, 0x93, 0x06, + 0xf9, 0xf3, 0xa4, 0x41, 0x3e, 0x6b, 0xfd, 0x8b, 0x8b, 0x6c, 0xd8, 0x8b, 0x30, 0x2e, 0x2e, 0xe6, + 0x4f, 0xaa, 0xee, 0xde, 0xba, 0xfe, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa5, 0x96, 0x12, 0x83, + 0xb9, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -589,16 +594,26 @@ type ProjectServiceClient interface { CreateToken(ctx context.Context, in *ProjectTokenCreateRequest, opts ...grpc.CallOption) (*ProjectTokenResponse, error) // Delete a new project token. DeleteToken(ctx context.Context, in *ProjectTokenDeleteRequest, opts ...grpc.CallOption) (*EmptyResponse, error) - // Create a new project. + // DEPRECATED: Create a new project. Create(ctx context.Context, in *ProjectCreateRequest, opts ...grpc.CallOption) (*v1alpha1.AppProject, error) + // CreateProject a new project. + CreateProject(ctx context.Context, in *ProjectCreateRequest, opts ...grpc.CallOption) (*v1alpha1.AppProject, error) // List returns list of projects List(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*v1alpha1.AppProjectList, error) - // Get returns a project by name + // ListProjects returns list of projects + ListProjects(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*v1alpha1.AppProjectList, error) + // DEPRECATED: Get returns a project by name Get(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*v1alpha1.AppProject, error) - // Update updates a project + // GetProject returns a project by name + GetProject(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*v1alpha1.AppProject, error) + // DEPRECATED: Update updates a project Update(ctx context.Context, in *ProjectUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.AppProject, error) - // Delete deletes a project + // UpdateProject updates a project + UpdateProject(ctx context.Context, in *ProjectUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.AppProject, error) + // DEPRECATED: Delete deletes a project Delete(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*EmptyResponse, error) + // DeleteProject deletes a project + DeleteProject(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*EmptyResponse, error) // ListEvents returns a list of project events ListEvents(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*v1.EventList, error) // GetSchedulesState returns true if there are any active sync syncWindows @@ -631,6 +646,7 @@ func (c *projectServiceClient) DeleteToken(ctx context.Context, in *ProjectToken return out, nil } +// Deprecated: Do not use. func (c *projectServiceClient) Create(ctx context.Context, in *ProjectCreateRequest, opts ...grpc.CallOption) (*v1alpha1.AppProject, error) { out := new(v1alpha1.AppProject) err := c.cc.Invoke(ctx, "/project.ProjectService/Create", in, out, opts...) @@ -640,6 +656,16 @@ func (c *projectServiceClient) Create(ctx context.Context, in *ProjectCreateRequ return out, nil } +func (c *projectServiceClient) CreateProject(ctx context.Context, in *ProjectCreateRequest, opts ...grpc.CallOption) (*v1alpha1.AppProject, error) { + out := new(v1alpha1.AppProject) + err := c.cc.Invoke(ctx, "/project.ProjectService/CreateProject", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Deprecated: Do not use. func (c *projectServiceClient) List(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*v1alpha1.AppProjectList, error) { out := new(v1alpha1.AppProjectList) err := c.cc.Invoke(ctx, "/project.ProjectService/List", in, out, opts...) @@ -649,6 +675,16 @@ func (c *projectServiceClient) List(ctx context.Context, in *ProjectQuery, opts return out, nil } +func (c *projectServiceClient) ListProjects(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*v1alpha1.AppProjectList, error) { + out := new(v1alpha1.AppProjectList) + err := c.cc.Invoke(ctx, "/project.ProjectService/ListProjects", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Deprecated: Do not use. func (c *projectServiceClient) Get(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*v1alpha1.AppProject, error) { out := new(v1alpha1.AppProject) err := c.cc.Invoke(ctx, "/project.ProjectService/Get", in, out, opts...) @@ -658,6 +694,16 @@ func (c *projectServiceClient) Get(ctx context.Context, in *ProjectQuery, opts . return out, nil } +func (c *projectServiceClient) GetProject(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*v1alpha1.AppProject, error) { + out := new(v1alpha1.AppProject) + err := c.cc.Invoke(ctx, "/project.ProjectService/GetProject", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Deprecated: Do not use. func (c *projectServiceClient) Update(ctx context.Context, in *ProjectUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.AppProject, error) { out := new(v1alpha1.AppProject) err := c.cc.Invoke(ctx, "/project.ProjectService/Update", in, out, opts...) @@ -667,6 +713,16 @@ func (c *projectServiceClient) Update(ctx context.Context, in *ProjectUpdateRequ return out, nil } +func (c *projectServiceClient) UpdateProject(ctx context.Context, in *ProjectUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.AppProject, error) { + out := new(v1alpha1.AppProject) + err := c.cc.Invoke(ctx, "/project.ProjectService/UpdateProject", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Deprecated: Do not use. func (c *projectServiceClient) Delete(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*EmptyResponse, error) { out := new(EmptyResponse) err := c.cc.Invoke(ctx, "/project.ProjectService/Delete", in, out, opts...) @@ -676,6 +732,15 @@ func (c *projectServiceClient) Delete(ctx context.Context, in *ProjectQuery, opt return out, nil } +func (c *projectServiceClient) DeleteProject(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*EmptyResponse, error) { + out := new(EmptyResponse) + err := c.cc.Invoke(ctx, "/project.ProjectService/DeleteProject", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *projectServiceClient) ListEvents(ctx context.Context, in *ProjectQuery, opts ...grpc.CallOption) (*v1.EventList, error) { out := new(v1.EventList) err := c.cc.Invoke(ctx, "/project.ProjectService/ListEvents", in, out, opts...) @@ -700,16 +765,26 @@ type ProjectServiceServer interface { CreateToken(context.Context, *ProjectTokenCreateRequest) (*ProjectTokenResponse, error) // Delete a new project token. DeleteToken(context.Context, *ProjectTokenDeleteRequest) (*EmptyResponse, error) - // Create a new project. + // DEPRECATED: Create a new project. Create(context.Context, *ProjectCreateRequest) (*v1alpha1.AppProject, error) + // CreateProject a new project. + CreateProject(context.Context, *ProjectCreateRequest) (*v1alpha1.AppProject, error) // List returns list of projects List(context.Context, *ProjectQuery) (*v1alpha1.AppProjectList, error) - // Get returns a project by name + // ListProjects returns list of projects + ListProjects(context.Context, *ProjectQuery) (*v1alpha1.AppProjectList, error) + // DEPRECATED: Get returns a project by name Get(context.Context, *ProjectQuery) (*v1alpha1.AppProject, error) - // Update updates a project + // GetProject returns a project by name + GetProject(context.Context, *ProjectQuery) (*v1alpha1.AppProject, error) + // DEPRECATED: Update updates a project Update(context.Context, *ProjectUpdateRequest) (*v1alpha1.AppProject, error) - // Delete deletes a project + // UpdateProject updates a project + UpdateProject(context.Context, *ProjectUpdateRequest) (*v1alpha1.AppProject, error) + // DEPRECATED: Delete deletes a project Delete(context.Context, *ProjectQuery) (*EmptyResponse, error) + // DeleteProject deletes a project + DeleteProject(context.Context, *ProjectQuery) (*EmptyResponse, error) // ListEvents returns a list of project events ListEvents(context.Context, *ProjectQuery) (*v1.EventList, error) // GetSchedulesState returns true if there are any active sync syncWindows @@ -729,18 +804,33 @@ func (*UnimplementedProjectServiceServer) DeleteToken(ctx context.Context, req * func (*UnimplementedProjectServiceServer) Create(ctx context.Context, req *ProjectCreateRequest) (*v1alpha1.AppProject, error) { return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") } +func (*UnimplementedProjectServiceServer) CreateProject(ctx context.Context, req *ProjectCreateRequest) (*v1alpha1.AppProject, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateProject not implemented") +} func (*UnimplementedProjectServiceServer) List(ctx context.Context, req *ProjectQuery) (*v1alpha1.AppProjectList, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } +func (*UnimplementedProjectServiceServer) ListProjects(ctx context.Context, req *ProjectQuery) (*v1alpha1.AppProjectList, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListProjects not implemented") +} func (*UnimplementedProjectServiceServer) Get(ctx context.Context, req *ProjectQuery) (*v1alpha1.AppProject, error) { return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") } +func (*UnimplementedProjectServiceServer) GetProject(ctx context.Context, req *ProjectQuery) (*v1alpha1.AppProject, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProject not implemented") +} func (*UnimplementedProjectServiceServer) Update(ctx context.Context, req *ProjectUpdateRequest) (*v1alpha1.AppProject, error) { return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") } +func (*UnimplementedProjectServiceServer) UpdateProject(ctx context.Context, req *ProjectUpdateRequest) (*v1alpha1.AppProject, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateProject not implemented") +} func (*UnimplementedProjectServiceServer) Delete(ctx context.Context, req *ProjectQuery) (*EmptyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") } +func (*UnimplementedProjectServiceServer) DeleteProject(ctx context.Context, req *ProjectQuery) (*EmptyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteProject not implemented") +} func (*UnimplementedProjectServiceServer) ListEvents(ctx context.Context, req *ProjectQuery) (*v1.EventList, error) { return nil, status.Errorf(codes.Unimplemented, "method ListEvents not implemented") } @@ -806,6 +896,24 @@ func _ProjectService_Create_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _ProjectService_CreateProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ProjectCreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).CreateProject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/project.ProjectService/CreateProject", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).CreateProject(ctx, req.(*ProjectCreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _ProjectService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ProjectQuery) if err := dec(in); err != nil { @@ -824,6 +932,24 @@ func _ProjectService_List_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _ProjectService_ListProjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ProjectQuery) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).ListProjects(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/project.ProjectService/ListProjects", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).ListProjects(ctx, req.(*ProjectQuery)) + } + return interceptor(ctx, in, info, handler) +} + func _ProjectService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ProjectQuery) if err := dec(in); err != nil { @@ -842,6 +968,24 @@ func _ProjectService_Get_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _ProjectService_GetProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ProjectQuery) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).GetProject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/project.ProjectService/GetProject", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).GetProject(ctx, req.(*ProjectQuery)) + } + return interceptor(ctx, in, info, handler) +} + func _ProjectService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ProjectUpdateRequest) if err := dec(in); err != nil { @@ -860,6 +1004,24 @@ func _ProjectService_Update_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _ProjectService_UpdateProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ProjectUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).UpdateProject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/project.ProjectService/UpdateProject", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).UpdateProject(ctx, req.(*ProjectUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _ProjectService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ProjectQuery) if err := dec(in); err != nil { @@ -878,6 +1040,24 @@ func _ProjectService_Delete_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _ProjectService_DeleteProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ProjectQuery) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProjectServiceServer).DeleteProject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/project.ProjectService/DeleteProject", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProjectServiceServer).DeleteProject(ctx, req.(*ProjectQuery)) + } + return interceptor(ctx, in, info, handler) +} + func _ProjectService_ListEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ProjectQuery) if err := dec(in); err != nil { @@ -930,22 +1110,42 @@ var _ProjectService_serviceDesc = grpc.ServiceDesc{ MethodName: "Create", Handler: _ProjectService_Create_Handler, }, + { + MethodName: "CreateProject", + Handler: _ProjectService_CreateProject_Handler, + }, { MethodName: "List", Handler: _ProjectService_List_Handler, }, + { + MethodName: "ListProjects", + Handler: _ProjectService_ListProjects_Handler, + }, { MethodName: "Get", Handler: _ProjectService_Get_Handler, }, + { + MethodName: "GetProject", + Handler: _ProjectService_GetProject_Handler, + }, { MethodName: "Update", Handler: _ProjectService_Update_Handler, }, + { + MethodName: "UpdateProject", + Handler: _ProjectService_UpdateProject_Handler, + }, { MethodName: "Delete", Handler: _ProjectService_Delete_Handler, }, + { + MethodName: "DeleteProject", + Handler: _ProjectService_DeleteProject_Handler, + }, { MethodName: "ListEvents", Handler: _ProjectService_ListEvents_Handler, diff --git a/pkg/apiclient/project/project.pb.gw.go b/pkg/apiclient/project/project.pb.gw.go index 9f3da17a9d721..a844096d7e1aa 100644 --- a/pkg/apiclient/project/project.pb.gw.go +++ b/pkg/apiclient/project/project.pb.gw.go @@ -132,6 +132,19 @@ func request_ProjectService_Create_0(ctx context.Context, marshaler runtime.Mars } +func request_ProjectService_CreateProject_0(ctx context.Context, marshaler runtime.Marshaler, client ProjectServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ProjectCreateRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateProject(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + var ( filter_ProjectService_List_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -149,6 +162,23 @@ func request_ProjectService_List_0(ctx context.Context, marshaler runtime.Marsha } +var ( + filter_ProjectService_ListProjects_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_ProjectService_ListProjects_0(ctx context.Context, marshaler runtime.Marshaler, client ProjectServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ProjectQuery + var metadata runtime.ServerMetadata + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ProjectService_ListProjects_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListProjects(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + func request_ProjectService_Get_0(ctx context.Context, marshaler runtime.Marshaler, client ProjectServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ProjectQuery var metadata runtime.ServerMetadata @@ -176,6 +206,33 @@ func request_ProjectService_Get_0(ctx context.Context, marshaler runtime.Marshal } +func request_ProjectService_GetProject_0(ctx context.Context, marshaler runtime.Marshaler, client ProjectServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ProjectQuery + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetProject(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + func request_ProjectService_Update_0(ctx context.Context, marshaler runtime.Marshaler, client ProjectServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ProjectUpdateRequest var metadata runtime.ServerMetadata @@ -207,6 +264,37 @@ func request_ProjectService_Update_0(ctx context.Context, marshaler runtime.Mars } +func request_ProjectService_UpdateProject_0(ctx context.Context, marshaler runtime.Marshaler, client ProjectServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ProjectUpdateRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["project.metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project.metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "project.metadata.name", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project.metadata.name", err) + } + + msg, err := client.UpdateProject(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + func request_ProjectService_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client ProjectServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ProjectQuery var metadata runtime.ServerMetadata @@ -234,6 +322,33 @@ func request_ProjectService_Delete_0(ctx context.Context, marshaler runtime.Mars } +func request_ProjectService_DeleteProject_0(ctx context.Context, marshaler runtime.Marshaler, client ProjectServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ProjectQuery + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.DeleteProject(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + func request_ProjectService_ListEvents_0(ctx context.Context, marshaler runtime.Marshaler, client ProjectServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ProjectQuery var metadata runtime.ServerMetadata @@ -413,6 +528,35 @@ func RegisterProjectServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("POST", pattern_ProjectService_CreateProject_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ProjectService_CreateProject_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ProjectService_CreateProject_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_ProjectService_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -442,6 +586,35 @@ func RegisterProjectServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_ProjectService_ListProjects_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ProjectService_ListProjects_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ProjectService_ListProjects_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_ProjectService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -471,6 +644,35 @@ func RegisterProjectServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("GET", pattern_ProjectService_GetProject_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ProjectService_GetProject_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ProjectService_GetProject_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("PUT", pattern_ProjectService_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -500,6 +702,35 @@ func RegisterProjectServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("PUT", pattern_ProjectService_UpdateProject_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ProjectService_UpdateProject_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ProjectService_UpdateProject_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("DELETE", pattern_ProjectService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -529,6 +760,35 @@ func RegisterProjectServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("DELETE", pattern_ProjectService_DeleteProject_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ProjectService_DeleteProject_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ProjectService_DeleteProject_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_ProjectService_ListEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -597,14 +857,24 @@ var ( pattern_ProjectService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "projects"}, "")) + pattern_ProjectService_CreateProject_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "projects"}, "")) + pattern_ProjectService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "projects"}, "")) + pattern_ProjectService_ListProjects_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "projects"}, "")) + pattern_ProjectService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "projects", "name"}, "")) + pattern_ProjectService_GetProject_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "projects", "name"}, "")) + pattern_ProjectService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "projects", "project.metadata.name"}, "")) + pattern_ProjectService_UpdateProject_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "projects", "project.metadata.name"}, "")) + pattern_ProjectService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "projects", "name"}, "")) + pattern_ProjectService_DeleteProject_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "projects", "name"}, "")) + pattern_ProjectService_ListEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "projects", "name", "events"}, "")) pattern_ProjectService_GetSyncWindowsState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "projects", "name", "syncwindows"}, "")) @@ -617,14 +887,24 @@ var ( forward_ProjectService_Create_0 = runtime.ForwardResponseMessage + forward_ProjectService_CreateProject_0 = runtime.ForwardResponseMessage + forward_ProjectService_List_0 = runtime.ForwardResponseMessage + forward_ProjectService_ListProjects_0 = runtime.ForwardResponseMessage + forward_ProjectService_Get_0 = runtime.ForwardResponseMessage + forward_ProjectService_GetProject_0 = runtime.ForwardResponseMessage + forward_ProjectService_Update_0 = runtime.ForwardResponseMessage + forward_ProjectService_UpdateProject_0 = runtime.ForwardResponseMessage + forward_ProjectService_Delete_0 = runtime.ForwardResponseMessage + forward_ProjectService_DeleteProject_0 = runtime.ForwardResponseMessage + forward_ProjectService_ListEvents_0 = runtime.ForwardResponseMessage forward_ProjectService_GetSyncWindowsState_0 = runtime.ForwardResponseMessage diff --git a/server/project/project.go b/server/project/project.go index e50bb0a9a5857..3b6e10c716b4a 100644 --- a/server/project/project.go +++ b/server/project/project.go @@ -147,8 +147,8 @@ func (s *Server) DeleteToken(ctx context.Context, q *project.ProjectTokenDeleteR return &project.EmptyResponse{}, nil } -// Create a new project. -func (s *Server) Create(ctx context.Context, q *project.ProjectCreateRequest) (*v1alpha1.AppProject, error) { +// CreateProject a new project. +func (s *Server) CreateProject(ctx context.Context, q *project.ProjectCreateRequest) (*v1alpha1.AppProject, error) { if err := s.enf.EnforceErr(ctx.Value("claims"), rbacpolicy.ResourceProjects, rbacpolicy.ActionCreate, q.Project.Name); err != nil { return nil, err } @@ -182,8 +182,13 @@ func (s *Server) Create(ctx context.Context, q *project.ProjectCreateRequest) (* return res, err } -// List returns list of projects -func (s *Server) List(ctx context.Context, q *project.ProjectQuery) (*v1alpha1.AppProjectList, error) { +// DEPRECATED: Create a new project. +func (s *Server) Create(ctx context.Context, q *project.ProjectCreateRequest) (*v1alpha1.AppProject, error) { + return s.CreateProject(ctx, q) +} + +// ListProjects returns list of projects +func (s *Server) ListProjects(ctx context.Context, q *project.ProjectQuery) (*v1alpha1.AppProjectList, error) { list, err := s.appclientset.ArgoprojV1alpha1().AppProjects(s.ns).List(metav1.ListOptions{}) if list != nil { newItems := make([]v1alpha1.AppProject, 0) @@ -198,16 +203,26 @@ func (s *Server) List(ctx context.Context, q *project.ProjectQuery) (*v1alpha1.A return list, err } -// Get returns a project by name -func (s *Server) Get(ctx context.Context, q *project.ProjectQuery) (*v1alpha1.AppProject, error) { +// DEPRECATED: List returns list of projects +func (s *Server) List(ctx context.Context, q *project.ProjectQuery) (*v1alpha1.AppProjectList, error) { + return s.ListProjects(ctx, q) +} + +// GetProject returns a project by name +func (s *Server) GetProject(ctx context.Context, q *project.ProjectQuery) (*v1alpha1.AppProject, error) { if err := s.enf.EnforceErr(ctx.Value("claims"), rbacpolicy.ResourceProjects, rbacpolicy.ActionGet, q.Name); err != nil { return nil, err } return s.appclientset.ArgoprojV1alpha1().AppProjects(s.ns).Get(q.Name, metav1.GetOptions{}) } -// Update updates a project -func (s *Server) Update(ctx context.Context, q *project.ProjectUpdateRequest) (*v1alpha1.AppProject, error) { +// DEPRECATED: Get returns a project by name +func (s *Server) Get(ctx context.Context, q *project.ProjectQuery) (*v1alpha1.AppProject, error) { + return s.GetProject(ctx, q) +} + +// UpdateProject updates a project +func (s *Server) UpdateProject(ctx context.Context, q *project.ProjectUpdateRequest) (*v1alpha1.AppProject, error) { if err := s.enf.EnforceErr(ctx.Value("claims"), rbacpolicy.ResourceProjects, rbacpolicy.ActionUpdate, q.Project.Name); err != nil { return nil, err } @@ -295,8 +310,13 @@ func (s *Server) Update(ctx context.Context, q *project.ProjectUpdateRequest) (* return res, err } -// Delete deletes a project -func (s *Server) Delete(ctx context.Context, q *project.ProjectQuery) (*project.EmptyResponse, error) { +// DEPRECATED: Update updates a project +func (s *Server) Update(ctx context.Context, q *project.ProjectUpdateRequest) (*v1alpha1.AppProject, error) { + return s.UpdateProject(ctx, q) +} + +// DeleteProject deletes a project +func (s *Server) DeleteProject(ctx context.Context, q *project.ProjectQuery) (*project.EmptyResponse, error) { if q.Name == common.DefaultAppProjectName { return nil, status.Errorf(codes.InvalidArgument, "name '%s' is reserved and cannot be deleted", q.Name) } @@ -327,6 +347,11 @@ func (s *Server) Delete(ctx context.Context, q *project.ProjectQuery) (*project. return &project.EmptyResponse{}, err } +// DEPRECATED: Delete deletes a project +func (s *Server) Delete(ctx context.Context, q *project.ProjectQuery) (*project.EmptyResponse, error) { + return s.DeleteProject(ctx, q) +} + func (s *Server) ListEvents(ctx context.Context, q *project.ProjectQuery) (*v1.EventList, error) { if err := s.enf.EnforceErr(ctx.Value("claims"), rbacpolicy.ResourceProjects, rbacpolicy.ActionGet, q.Name); err != nil { return nil, err diff --git a/server/project/project.proto b/server/project/project.proto index eb8594dfc38a1..c74dc7debbf28 100644 --- a/server/project/project.proto +++ b/server/project/project.proto @@ -75,35 +75,71 @@ service ProjectService { option (google.api.http).delete = "/api/v1/projects/{project}/roles/{role}/token/{iat}"; } - // Create a new project. + // DEPRECATED: Create a new project. rpc Create(ProjectCreateRequest) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject) { option (google.api.http) = { post: "/api/v1/projects" body: "*" }; + option deprecated = true; + } + + // CreateProject a new project. + rpc CreateProject(ProjectCreateRequest) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject) { + option (google.api.http) = { + post: "/api/v1/projects" + body: "*" + }; } // List returns list of projects rpc List(ProjectQuery) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProjectList) { option (google.api.http).get = "/api/v1/projects"; + option deprecated = true; } - // Get returns a project by name + // ListProjects returns list of projects + rpc ListProjects(ProjectQuery) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProjectList) { + option (google.api.http).get = "/api/v1/projects"; + } + + // DEPRECATED: Get returns a project by name rpc Get(ProjectQuery) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject) { option (google.api.http).get = "/api/v1/projects/{name}"; + option deprecated = true; } - // Update updates a project + // GetProject returns a project by name + rpc GetProject(ProjectQuery) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject) { + option (google.api.http).get = "/api/v1/projects/{name}"; + } + + // DEPRECATED: Update updates a project rpc Update(ProjectUpdateRequest) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject) { option (google.api.http) = { put: "/api/v1/projects/{project.metadata.name}" body: "*" }; + option deprecated = true; + } + + // UpdateProject updates a project + rpc UpdateProject(ProjectUpdateRequest) returns (jackfan.us.kg.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject) { + option (google.api.http) = { + put: "/api/v1/projects/{project.metadata.name}" + body: "*" + }; } - // Delete deletes a project + // DEPRECATED: Delete deletes a project rpc Delete(ProjectQuery) returns (EmptyResponse) { option (google.api.http).delete = "/api/v1/projects/{name}"; + option deprecated = true; + } + + // DeleteProject deletes a project + rpc DeleteProject(ProjectQuery) returns (EmptyResponse) { + option (google.api.http).delete = "/api/v1/projects/{name}"; } // ListEvents returns a list of project events From bbf9bde43867162d2c5075728569de24ed9be0a2 Mon Sep 17 00:00:00 2001 From: jannfis Date: Sat, 1 Feb 2020 14:24:56 +0100 Subject: [PATCH 4/5] Deprecate ambiguous API methods in SessionService --- assets/swagger.json | 8 +- cmd/argocd/commands/login.go | 2 +- pkg/apiclient/session/session.pb.go | 148 +++++++++++++++++++------ pkg/apiclient/session/session.pb.gw.go | 88 +++++++++++++++ server/session/session.go | 19 +++- server/session/session.proto | 21 +++- 6 files changed, 241 insertions(+), 45 deletions(-) diff --git a/assets/swagger.json b/assets/swagger.json index 2e13caae3936f..0bc8b9777cd3e 100644 --- a/assets/swagger.json +++ b/assets/swagger.json @@ -1743,8 +1743,8 @@ "tags": [ "SessionService" ], - "summary": "Create a new JWT for authentication and set a cookie if using HTTP.", - "operationId": "Create", + "summary": "CreateSession a new JWT for authentication and set a cookie if using HTTP.", + "operationId": "CreateSession", "parameters": [ { "name": "body", @@ -1768,8 +1768,8 @@ "tags": [ "SessionService" ], - "summary": "Delete an existing JWT cookie if using HTTP.", - "operationId": "Delete", + "summary": "DeleteSession an existing JWT cookie if using HTTP.", + "operationId": "DeleteSession", "responses": { "200": { "description": "(empty)", diff --git a/cmd/argocd/commands/login.go b/cmd/argocd/commands/login.go index 98795a7019520..d66d0e85de89e 100644 --- a/cmd/argocd/commands/login.go +++ b/cmd/argocd/commands/login.go @@ -288,7 +288,7 @@ func passwordLogin(acdClient argocdclient.Client, username, password string) str Username: username, Password: password, } - createdSession, err := sessionIf.Create(context.Background(), &sessionRequest) + createdSession, err := sessionIf.CreateSession(context.Background(), &sessionRequest) errors.CheckError(err) return createdSession.Token } diff --git a/pkg/apiclient/session/session.pb.go b/pkg/apiclient/session/session.pb.go index 9fb42ec8e62da..2829840792421 100644 --- a/pkg/apiclient/session/session.pb.go +++ b/pkg/apiclient/session/session.pb.go @@ -309,36 +309,38 @@ func init() { func init() { proto.RegisterFile("server/session/session.proto", fileDescriptor_87870a51a62685ed) } var fileDescriptor_87870a51a62685ed = []byte{ - // 453 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x8e, 0xd3, 0x30, - 0x10, 0xc6, 0x95, 0x16, 0x4a, 0xd7, 0x48, 0x2c, 0x98, 0x68, 0x89, 0x42, 0xa9, 0xaa, 0x5c, 0x58, - 0xad, 0x44, 0xad, 0xc2, 0x05, 0x71, 0x41, 0x02, 0x24, 0xd4, 0x6b, 0x56, 0x5c, 0x56, 0xe2, 0xe0, - 0x4d, 0x06, 0xaf, 0xb7, 0x59, 0x8f, 0xb1, 0xdd, 0xec, 0x9d, 0x57, 0xe0, 0x61, 0x78, 0x05, 0x8e, - 0x48, 0xbc, 0x00, 0xaa, 0x78, 0x10, 0x14, 0xe7, 0x0f, 0xdb, 0xb4, 0x42, 0x9c, 0xe2, 0x99, 0x2f, - 0xfe, 0x7d, 0x9f, 0x35, 0x43, 0x26, 0x16, 0x4c, 0x09, 0x86, 0x59, 0xb0, 0x56, 0xa2, 0x6a, 0xbf, - 0x73, 0x6d, 0xd0, 0x21, 0xbd, 0xd3, 0x94, 0x71, 0x28, 0x50, 0xa0, 0xef, 0xb1, 0xea, 0x54, 0xcb, - 0xf1, 0x44, 0x20, 0x8a, 0x02, 0x18, 0xd7, 0x92, 0x71, 0x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11, 0x19, 0x09, 0x83, 0x6b, 0x6d, 0xa3, 0x5b, 0xb3, 0xe1, 0xf1, 0x41, 0xda, 0x54, 0xcf, 0xbf, - 0x0d, 0xc8, 0xbd, 0x26, 0xf8, 0x29, 0x98, 0x52, 0x66, 0x40, 0x2f, 0xc9, 0xdd, 0x1b, 0x59, 0xe8, - 0xe3, 0x79, 0xbb, 0x13, 0xbb, 0xb9, 0xe3, 0xc9, 0x7e, 0xb1, 0x8e, 0x9f, 0xcc, 0xbe, 0xfc, 0xfc, - 0xfd, 0x75, 0x10, 0xd3, 0xc8, 0xef, 0x40, 0xb9, 0xe8, 0xb6, 0xac, 0x0a, 0x2a, 0x2b, 0xf8, 0x47, - 0x32, 0xaa, 0xa7, 0x45, 0x9f, 0x74, 0xa4, 0x7d, 0x53, 0x8c, 0xa3, 0xbe, 0xdc, 0x99, 0xc4, 0xde, - 0x24, 0x4c, 0x0e, 0x7b, 0x26, 0xaf, 0x82, 0x13, 0x7a, 0x46, 0x46, 0xf5, 0x98, 0x76, 0xf1, 0x5b, - 0xe3, 0xfb, 0x07, 0xfe, 0x91, 0xc7, 0x3f, 0x38, 0xe9, 0xe3, 0xdf, 0xbc, 0xfe, 0xbe, 0x99, 0x06, - 0x3f, 0x36, 0xd3, 0xe0, 0xd7, 0x66, 0x1a, 0x9c, 0x2d, 0xfe, 0x63, 0x91, 0xb3, 0x42, 0x82, 0x72, - 0x2d, 0xe0, 0x7c, 0xe4, 0xf7, 0xf6, 0xc5, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xb6, 0x16, - 0x68, 0x83, 0x03, 0x00, 0x00, + // 482 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0x95, 0x76, 0x94, 0xce, 0x68, 0x0c, 0x4c, 0x34, 0xa2, 0xd0, 0x55, 0x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 0xf1, 0xb7, 0x8e, 0x47, 0x53, 0xb2, + 0xe7, 0x48, 0xf5, 0xb9, 0x9b, 0x1b, 0x85, 0x9b, 0x8d, 0xe8, 0x07, 0xd2, 0x73, 0xf3, 0xb0, 0x8e, + 0x5f, 0x9a, 0x93, 0xff, 0xe2, 0xef, 0x1f, 0xaf, 0xe2, 0xcb, 0x26, 0x38, 0xd9, 0x73, 0x98, 0x8d, + 0x4d, 0x6c, 0xeb, 0xf2, 0x70, 0x83, 0xcb, 0xab, 0x97, 0x3f, 0x16, 0x43, 0xef, 0xe7, 0x62, 0xe8, + 0xfd, 0x5e, 0x0c, 0xbd, 0xf7, 0x93, 0x2d, 0xde, 0x65, 0x92, 0x49, 0x50, 0xb6, 0x01, 0x9c, 0xf6, + 0xaa, 0x67, 0xf8, 0xec, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9e, 0xca, 0xfb, 0x9e, 0x52, 0x04, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -355,10 +357,14 @@ const _ = grpc.SupportPackageIsVersion4 type SessionServiceClient interface { // Get the current user's info GetUserInfo(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*GetUserInfoResponse, error) - // Create a new JWT for authentication and set a cookie if using HTTP. + // DEPRECATED: Create a new JWT for authentication and set a cookie if using HTTP. Create(ctx context.Context, in *SessionCreateRequest, opts ...grpc.CallOption) (*SessionResponse, error) - // Delete an existing JWT cookie if using HTTP. + // CreateSession a new JWT for authentication and set a cookie if using HTTP. + CreateSession(ctx context.Context, in *SessionCreateRequest, opts ...grpc.CallOption) (*SessionResponse, error) + // DEPRECATED: Delete an existing JWT cookie if using HTTP. Delete(ctx context.Context, in *SessionDeleteRequest, opts ...grpc.CallOption) (*SessionResponse, error) + // DeleteSession an existing JWT cookie if using HTTP. + DeleteSession(ctx context.Context, in *SessionDeleteRequest, opts ...grpc.CallOption) (*SessionResponse, error) } type sessionServiceClient struct { @@ -378,6 +384,7 @@ func (c *sessionServiceClient) GetUserInfo(ctx context.Context, in *GetUserInfoR return out, nil } +// Deprecated: Do not use. func (c *sessionServiceClient) Create(ctx context.Context, in *SessionCreateRequest, opts ...grpc.CallOption) (*SessionResponse, error) { out := new(SessionResponse) err := c.cc.Invoke(ctx, "/session.SessionService/Create", in, out, opts...) @@ -387,6 +394,16 @@ func (c *sessionServiceClient) Create(ctx context.Context, in *SessionCreateRequ return out, nil } +func (c *sessionServiceClient) CreateSession(ctx context.Context, in *SessionCreateRequest, opts ...grpc.CallOption) (*SessionResponse, error) { + out := new(SessionResponse) + err := c.cc.Invoke(ctx, "/session.SessionService/CreateSession", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Deprecated: Do not use. func (c *sessionServiceClient) Delete(ctx context.Context, in *SessionDeleteRequest, opts ...grpc.CallOption) (*SessionResponse, error) { out := new(SessionResponse) err := c.cc.Invoke(ctx, "/session.SessionService/Delete", in, out, opts...) @@ -396,14 +413,27 @@ func (c *sessionServiceClient) Delete(ctx context.Context, in *SessionDeleteRequ return out, nil } +func (c *sessionServiceClient) DeleteSession(ctx context.Context, in *SessionDeleteRequest, opts ...grpc.CallOption) (*SessionResponse, error) { + out := new(SessionResponse) + err := c.cc.Invoke(ctx, "/session.SessionService/DeleteSession", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SessionServiceServer is the server API for SessionService service. type SessionServiceServer interface { // Get the current user's info GetUserInfo(context.Context, *GetUserInfoRequest) (*GetUserInfoResponse, error) - // Create a new JWT for authentication and set a cookie if using HTTP. + // DEPRECATED: Create a new JWT for authentication and set a cookie if using HTTP. Create(context.Context, *SessionCreateRequest) (*SessionResponse, error) - // Delete an existing JWT cookie if using HTTP. + // CreateSession a new JWT for authentication and set a cookie if using HTTP. + CreateSession(context.Context, *SessionCreateRequest) (*SessionResponse, error) + // DEPRECATED: Delete an existing JWT cookie if using HTTP. Delete(context.Context, *SessionDeleteRequest) (*SessionResponse, error) + // DeleteSession an existing JWT cookie if using HTTP. + DeleteSession(context.Context, *SessionDeleteRequest) (*SessionResponse, error) } // UnimplementedSessionServiceServer can be embedded to have forward compatible implementations. @@ -416,9 +446,15 @@ func (*UnimplementedSessionServiceServer) GetUserInfo(ctx context.Context, req * func (*UnimplementedSessionServiceServer) Create(ctx context.Context, req *SessionCreateRequest) (*SessionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") } +func (*UnimplementedSessionServiceServer) CreateSession(ctx context.Context, req *SessionCreateRequest) (*SessionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSession not implemented") +} func (*UnimplementedSessionServiceServer) Delete(ctx context.Context, req *SessionDeleteRequest) (*SessionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") } +func (*UnimplementedSessionServiceServer) DeleteSession(ctx context.Context, req *SessionDeleteRequest) (*SessionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteSession not implemented") +} func RegisterSessionServiceServer(s *grpc.Server, srv SessionServiceServer) { s.RegisterService(&_SessionService_serviceDesc, srv) @@ -460,6 +496,24 @@ func _SessionService_Create_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _SessionService_CreateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SessionCreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SessionServiceServer).CreateSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/session.SessionService/CreateSession", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SessionServiceServer).CreateSession(ctx, req.(*SessionCreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _SessionService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SessionDeleteRequest) if err := dec(in); err != nil { @@ -478,6 +532,24 @@ func _SessionService_Delete_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _SessionService_DeleteSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SessionDeleteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SessionServiceServer).DeleteSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/session.SessionService/DeleteSession", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SessionServiceServer).DeleteSession(ctx, req.(*SessionDeleteRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _SessionService_serviceDesc = grpc.ServiceDesc{ ServiceName: "session.SessionService", HandlerType: (*SessionServiceServer)(nil), @@ -490,10 +562,18 @@ var _SessionService_serviceDesc = grpc.ServiceDesc{ MethodName: "Create", Handler: _SessionService_Create_Handler, }, + { + MethodName: "CreateSession", + Handler: _SessionService_CreateSession_Handler, + }, { MethodName: "Delete", Handler: _SessionService_Delete_Handler, }, + { + MethodName: "DeleteSession", + Handler: _SessionService_DeleteSession_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "server/session/session.proto", diff --git a/pkg/apiclient/session/session.pb.gw.go b/pkg/apiclient/session/session.pb.gw.go index a877fa76a5a7a..342f1462d5dd8 100644 --- a/pkg/apiclient/session/session.pb.gw.go +++ b/pkg/apiclient/session/session.pb.gw.go @@ -50,6 +50,19 @@ func request_SessionService_Create_0(ctx context.Context, marshaler runtime.Mars } +func request_SessionService_CreateSession_0(ctx context.Context, marshaler runtime.Marshaler, client SessionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SessionCreateRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateSession(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + func request_SessionService_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client SessionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq SessionDeleteRequest var metadata runtime.ServerMetadata @@ -59,6 +72,15 @@ func request_SessionService_Delete_0(ctx context.Context, marshaler runtime.Mars } +func request_SessionService_DeleteSession_0(ctx context.Context, marshaler runtime.Marshaler, client SessionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SessionDeleteRequest + var metadata runtime.ServerMetadata + + msg, err := client.DeleteSession(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + // RegisterSessionServiceHandlerFromEndpoint is same as RegisterSessionServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterSessionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { @@ -155,6 +177,35 @@ func RegisterSessionServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("POST", pattern_SessionService_CreateSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SessionService_CreateSession_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SessionService_CreateSession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("DELETE", pattern_SessionService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -184,6 +235,35 @@ func RegisterSessionServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) + mux.Handle("DELETE", pattern_SessionService_DeleteSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SessionService_DeleteSession_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SessionService_DeleteSession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -192,7 +272,11 @@ var ( pattern_SessionService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "session"}, "")) + pattern_SessionService_CreateSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "session"}, "")) + pattern_SessionService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "session"}, "")) + + pattern_SessionService_DeleteSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "session"}, "")) ) var ( @@ -200,5 +284,9 @@ var ( forward_SessionService_Create_0 = runtime.ForwardResponseMessage + forward_SessionService_CreateSession_0 = runtime.ForwardResponseMessage + forward_SessionService_Delete_0 = runtime.ForwardResponseMessage + + forward_SessionService_DeleteSession_0 = runtime.ForwardResponseMessage ) diff --git a/server/session/session.go b/server/session/session.go index 0676dd5a745b6..2647817989170 100644 --- a/server/session/session.go +++ b/server/session/session.go @@ -25,9 +25,9 @@ func NewServer(mgr *sessionmgr.SessionManager, authenticator Authenticator) *Ser return &Server{mgr, authenticator} } -// Create generates a JWT token signed by Argo CD intended for web/CLI logins of the admin user +// CreateSession generates a JWT token signed by Argo CD intended for web/CLI logins of the admin user // using username/password -func (s *Server) Create(ctx context.Context, q *session.SessionCreateRequest) (*session.SessionResponse, error) { +func (s *Server) CreateSession(ctx context.Context, q *session.SessionCreateRequest) (*session.SessionResponse, error) { if q.Token != "" { return nil, status.Errorf(codes.Unauthenticated, "token-based session creation no longer supported. please upgrade argocd cli to v0.7+") } @@ -45,11 +45,22 @@ func (s *Server) Create(ctx context.Context, q *session.SessionCreateRequest) (* return &session.SessionResponse{Token: jwtToken}, nil } -// Delete an authentication cookie from the client. This makes sense only for the Web client. -func (s *Server) Delete(ctx context.Context, q *session.SessionDeleteRequest) (*session.SessionResponse, error) { +// DEPRECATED: Create generates a JWT token signed by Argo CD intended for web/CLI logins of the admin user +// using username/password +func (s *Server) Create(ctx context.Context, q *session.SessionCreateRequest) (*session.SessionResponse, error) { + return s.CreateSession(ctx, q) +} + +// DeleteSession deletes an authentication cookie from the client. This makes sense only for the Web client. +func (s *Server) DeleteSession(ctx context.Context, q *session.SessionDeleteRequest) (*session.SessionResponse, error) { return &session.SessionResponse{Token: ""}, nil } +// DEPRECATED: Delete an authentication cookie from the client. This makes sense only for the Web client. +func (s *Server) Delete(ctx context.Context, q *session.SessionDeleteRequest) (*session.SessionResponse, error) { + return s.DeleteSession(ctx, q) +} + // AuthFuncOverride overrides the authentication function and let us not require auth to receive auth. // Without this function here, ArgoCDServer.authenticate would be invoked and credentials checked. // Since this service is generally invoked when the user has _no_ credentials, that would create a diff --git a/server/session/session.proto b/server/session/session.proto index 40ad7f1bc202b..203b3a723ae01 100644 --- a/server/session/session.proto +++ b/server/session/session.proto @@ -47,18 +47,35 @@ service SessionService { option (google.api.http).get = "/api/v1/session/userinfo"; } - // Create a new JWT for authentication and set a cookie if using HTTP. + // DEPRECATED: Create a new JWT for authentication and set a cookie if using HTTP. rpc Create(SessionCreateRequest) returns (SessionResponse) { option (google.api.http) = { post: "/api/v1/session" body: "*" }; + option deprecated = true; } - // Delete an existing JWT cookie if using HTTP. + // CreateSession a new JWT for authentication and set a cookie if using HTTP. + rpc CreateSession(SessionCreateRequest) returns (SessionResponse) { + option (google.api.http) = { + post: "/api/v1/session" + body: "*" + }; + } + + // DEPRECATED: Delete an existing JWT cookie if using HTTP. rpc Delete(SessionDeleteRequest) returns (SessionResponse) { option (google.api.http) = { delete: "/api/v1/session" }; + option deprecated = true; + } + + // DeleteSession an existing JWT cookie if using HTTP. + rpc DeleteSession(SessionDeleteRequest) returns (SessionResponse) { + option (google.api.http) = { + delete: "/api/v1/session" + }; } } From fe752d6a3d8b49907eb429017be76f011106ec5a Mon Sep 17 00:00:00 2001 From: jannfis Date: Mon, 17 Feb 2020 23:02:37 +0100 Subject: [PATCH 5/5] Codegen --- assets/swagger.json | 68 ++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/assets/swagger.json b/assets/swagger.json index 7a8e7556b42f4..eea6a3a4c6887 100644 --- a/assets/swagger.json +++ b/assets/swagger.json @@ -84,8 +84,8 @@ "tags": [ "ApplicationService" ], - "summary": "List returns list of applications", - "operationId": "ListMixin8", + "summary": "ListApplications returns list of applications", + "operationId": "ListApplications", "parameters": [ { "type": "string", @@ -134,8 +134,8 @@ "tags": [ "ApplicationService" ], - "summary": "Create creates an application", - "operationId": "CreateMixin8", + "summary": "CreateApplication creates an application", + "operationId": "CreateApplication", "parameters": [ { "name": "body", @@ -161,8 +161,8 @@ "tags": [ "ApplicationService" ], - "summary": "Update updates an application", - "operationId": "UpdateMixin8", + "summary": "UpdateApplication updates an application", + "operationId": "UpdateApplication", "parameters": [ { "type": "string", @@ -292,8 +292,8 @@ "tags": [ "ApplicationService" ], - "summary": "Get returns an application by name", - "operationId": "GetMixin8", + "summary": "GetApplication returns an application by name", + "operationId": "GetApplication", "parameters": [ { "type": "string", @@ -342,8 +342,8 @@ "tags": [ "ApplicationService" ], - "summary": "Delete deletes an application", - "operationId": "DeleteMixin8", + "summary": "DeleteApplication deletes an application", + "operationId": "DeleteApplication", "parameters": [ { "type": "string", @@ -981,8 +981,8 @@ "tags": [ "ClusterService" ], - "summary": "List returns list of clusters", - "operationId": "List", + "summary": "ListClusters returns list of clusters", + "operationId": "ListClusters", "parameters": [ { "type": "string", @@ -1003,8 +1003,8 @@ "tags": [ "ClusterService" ], - "summary": "Create creates a cluster", - "operationId": "Create", + "summary": "CreateCluster creates a cluster", + "operationId": "CreateCluster", "parameters": [ { "name": "body", @@ -1030,8 +1030,8 @@ "tags": [ "ClusterService" ], - "summary": "Update updates a cluster", - "operationId": "Update", + "summary": "UpdateCluster updates a cluster", + "operationId": "UpdateCluster", "parameters": [ { "type": "string", @@ -1063,8 +1063,8 @@ "tags": [ "ClusterService" ], - "summary": "Get returns a cluster by server address", - "operationId": "GetMixin2", + "summary": "GetCluster returns a cluster by server address", + "operationId": "GetCluster", "parameters": [ { "type": "string", @@ -1086,8 +1086,8 @@ "tags": [ "ClusterService" ], - "summary": "Delete deletes a cluster", - "operationId": "Delete", + "summary": "DeleteCluster deletes a cluster", + "operationId": "DeleteCluster", "parameters": [ { "type": "string", @@ -1136,8 +1136,8 @@ "tags": [ "ProjectService" ], - "summary": "List returns list of projects", - "operationId": "ListMixin6", + "summary": "ListProjects returns list of projects", + "operationId": "ListProjects", "parameters": [ { "type": "string", @@ -1158,8 +1158,8 @@ "tags": [ "ProjectService" ], - "summary": "Create a new project.", - "operationId": "CreateMixin6", + "summary": "CreateProject a new project.", + "operationId": "CreateProject", "parameters": [ { "name": "body", @@ -1185,8 +1185,8 @@ "tags": [ "ProjectService" ], - "summary": "Get returns a project by name", - "operationId": "GetMixin6", + "summary": "GetProject returns a project by name", + "operationId": "GetProject", "parameters": [ { "type": "string", @@ -1208,8 +1208,8 @@ "tags": [ "ProjectService" ], - "summary": "Delete deletes a project", - "operationId": "DeleteMixin6", + "summary": "DeleteProject deletes a project", + "operationId": "DeleteProject", "parameters": [ { "type": "string", @@ -1283,8 +1283,8 @@ "tags": [ "ProjectService" ], - "summary": "Update updates a project", - "operationId": "UpdateMixin6", + "summary": "UpdateProject updates a project", + "operationId": "UpdateProject", "parameters": [ { "type": "string", @@ -1743,8 +1743,8 @@ "tags": [ "SessionService" ], - "summary": "Create a new JWT for authentication and set a cookie if using HTTP.", - "operationId": "CreateMixin10", + "summary": "CreateSession a new JWT for authentication and set a cookie if using HTTP.", + "operationId": "CreateSession", "parameters": [ { "name": "body", @@ -1768,8 +1768,8 @@ "tags": [ "SessionService" ], - "summary": "Delete an existing JWT cookie if using HTTP.", - "operationId": "DeleteMixin10", + "summary": "DeleteSession an existing JWT cookie if using HTTP.", + "operationId": "DeleteSession", "responses": { "200": { "description": "(empty)",