Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
proto: add ServiceAccountService and WorkloadIdentityService definitions (#19053)
rebelice4fef78be9eb2
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex 00546f3792..58adb72ba7 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -5179,6 +5179,236 @@ paths:application/json:schema:$ref: '#/components/schemas/bytebase.v1.SearchQueryHistoriesResponse'+ /bytebase.v1.ServiceAccountService/CreateServiceAccount:+ post:+ tags:+ - bytebase.v1.ServiceAccountService+ summary: 'Creates a new service account. For workspace-level: parent is empty, permission bb.serviceAccounts.create on workspace. For project-level: parent is projects/{project}, permission bb.serviceAccounts.create on project.'+ description: |-+ Creates a new service account.+ For workspace-level: parent is empty, permission bb.serviceAccounts.create on workspace.+ For project-level: parent is projects/{project}, permission bb.serviceAccounts.create on project.+ operationId: bytebase.v1.ServiceAccountService.CreateServiceAccount+ parameters:+ - name: Connect-Protocol-Version+ in: header+ required: true+ schema:+ $ref: '#/components/schemas/connect-protocol-version'+ - name: Connect-Timeout-Ms+ in: header+ schema:+ $ref: '#/components/schemas/connect-timeout-header'+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.CreateServiceAccountRequest'+ required: true+ responses:+ default:+ description: Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/connect.error'+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'+ /bytebase.v1.ServiceAccountService/DeleteServiceAccount:+ post:+ tags:+ - bytebase.v1.ServiceAccountService+ summary: 'Deletes a service account. Permissions required: bb.serviceAccounts.delete'+ description: |-+ Deletes a service account.+ Permissions required: bb.serviceAccounts.delete+ operationId: bytebase.v1.ServiceAccountService.DeleteServiceAccount+ parameters:+ - name: Connect-Protocol-Version+ in: header+ required: true+ schema:+ $ref: '#/components/schemas/connect-protocol-version'+ - name: Connect-Timeout-Ms+ in: header+ schema:+ $ref: '#/components/schemas/connect-timeout-header'+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.DeleteServiceAccountRequest'+ required: true+ responses:+ default:+ description: Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/connect.error'+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/google.protobuf.Empty'+ /bytebase.v1.ServiceAccountService/GetServiceAccount:+ post:+ tags:+ - bytebase.v1.ServiceAccountService+ summary: 'Gets a service account by name. Permissions required: bb.serviceAccounts.get'+ description: |-+ Gets a service account by name.+ Permissions required: bb.serviceAccounts.get+ operationId: bytebase.v1.ServiceAccountService.GetServiceAccount+ parameters:+ - name: Connect-Protocol-Version+ in: header+ required: true+ schema:+ $ref: '#/components/schemas/connect-protocol-version'+ - name: Connect-Timeout-Ms+ in: header+ schema:+ $ref: '#/components/schemas/connect-timeout-header'+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.GetServiceAccountRequest'+ required: true+ responses:+ default:+ description: Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/connect.error'+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'+ /bytebase.v1.ServiceAccountService/ListServiceAccounts:+ post:+ tags:+ - bytebase.v1.ServiceAccountService+ summary: 'Lists service accounts. For workspace-level: parent is empty, permission bb.serviceAccounts.list on workspace. For project-level: parent is projects/{project}, permission bb.serviceAccounts.list on project.'+ description: |-+ Lists service accounts.+ For workspace-level: parent is empty, permission bb.serviceAccounts.list on workspace.+ For project-level: parent is projects/{project}, permission bb.serviceAccounts.list on project.+ operationId: bytebase.v1.ServiceAccountService.ListServiceAccounts+ parameters:+ - name: Connect-Protocol-Version+ in: header+ required: true+ schema:+ $ref: '#/components/schemas/connect-protocol-version'+ - name: Connect-Timeout-Ms+ in: header+ schema:+ $ref: '#/components/schemas/connect-timeout-header'+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ListServiceAccountsRequest'+ required: true+ responses:+ default:+ description: Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/connect.error'+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ListServiceAccountsResponse'+ /bytebase.v1.ServiceAccountService/UndeleteServiceAccount:+ post:+ tags:+ - bytebase.v1.ServiceAccountService+ summary: 'Restores a deleted service account. Permissions required: bb.serviceAccounts.undelete'+ description: |-+ Restores a deleted service account.+ Permissions required: bb.serviceAccounts.undelete+ operationId: bytebase.v1.ServiceAccountService.UndeleteServiceAccount+ parameters:+ - name: Connect-Protocol-Version+ in: header+ required: true+ schema:+ $ref: '#/components/schemas/connect-protocol-version'+ - name: Connect-Timeout-Ms+ in: header+ schema:+ $ref: '#/components/schemas/connect-timeout-header'+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.UndeleteServiceAccountRequest'+ required: true+ responses:+ default:+ description: Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/connect.error'+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'+ /bytebase.v1.ServiceAccountService/UpdateServiceAccount:+ post:+ tags:+ - bytebase.v1.ServiceAccountService+ summary: 'Updates a service account. Permissions required: bb.serviceAccounts.update'+ description: |-+ Updates a service account.+ Permissions required: bb.serviceAccounts.update+ operationId: bytebase.v1.ServiceAccountService.UpdateServiceAccount+ parameters:+ - name: Connect-Protocol-Version+ in: header+ required: true+ schema:+ $ref: '#/components/schemas/connect-protocol-version'+ - name: Connect-Timeout-Ms+ in: header+ schema:+ $ref: '#/components/schemas/connect-timeout-header'+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.UpdateServiceAccountRequest'+ required: true+ responses:+ default:+ description: Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/connect.error'+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'/bytebase.v1.SettingService/GetSetting:post:tags:@@ -5585,7 +5815,238 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/bytebase.v1.DeleteUserRequest'+ $ref: '#/components/schemas/bytebase.v1.DeleteUserRequest'+ required: true+ responses:+ default:+ description: Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/connect.error'+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/google.protobuf.Empty'+ /bytebase.v1.UserService/GetCurrentUser:+ post:+ tags:+ - bytebase.v1.UserService+ summary: 'Get the current authenticated user. Permissions required: None'+ description: |-+ Get the current authenticated user.+ Permissions required: None+ operationId: bytebase.v1.UserService.GetCurrentUser+ parameters:+ - name: Connect-Protocol-Version+ in: header+ required: true+ schema:+ $ref: '#/components/schemas/connect-protocol-version'+ - name: Connect-Timeout-Ms+ in: header+ schema:+ $ref: '#/components/schemas/connect-timeout-header'+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/google.protobuf.Empty'+ required: true+ responses:+ default:+ description: Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/connect.error'+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.User'+ /bytebase.v1.UserService/GetUser:+ post:+ tags:+ - bytebase.v1.UserService+ summary: 'Get the user. Any authenticated user can get the user. Permissions required: bb.users.get'+ description: |-+ Get the user.+ Any authenticated user can get the user.+ Permissions required: bb.users.get+ operationId: bytebase.v1.UserService.GetUser+ parameters:+ - name: Connect-Protocol-Version+ in: header+ required: true+ schema:+ $ref: '#/components/schemas/connect-protocol-version'+ - name: Connect-Timeout-Ms+ in: header+ schema:+ $ref: '#/components/schemas/connect-timeout-header'+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.GetUserRequest'+ required: true+ responses:+ default:+ description: Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/connect.error'+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.User'+ /bytebase.v1.UserService/ListUsers:+ post:+ tags:+ - bytebase.v1.UserService+ summary: 'List all users. Any authenticated user can list users. Permissions required: bb.users.list'+ description: |-+ List all users.+ Any authenticated user can list users.+ Permissions required: bb.users.list+ operationId: bytebase.v1.UserService.ListUsers+ parameters:+ - name: Connect-Protocol-Version+ in: header+ required: true+ schema:+ $ref: '#/components/schemas/connect-protocol-version'+ - name: Connect-Timeout-Ms+ in: header+ schema:+ $ref: '#/components/schemas/connect-timeout-header'+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ListUsersRequest'+ required: true+ responses:+ default:+ description: Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/connect.error'+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ListUsersResponse'+ /bytebase.v1.UserService/UndeleteUser:+ post:+ tags:+ - bytebase.v1.UserService+ summary: 'Restores a deleted user. Permissions required: bb.users.undelete'+ description: |-+ Restores a deleted user.+ Permissions required: bb.users.undelete+ operationId: bytebase.v1.UserService.UndeleteUser+ parameters:+ - name: Connect-Protocol-Version+ in: header+ required: true+ schema:+ $ref: '#/components/schemas/connect-protocol-version'+ - name: Connect-Timeout-Ms+ in: header+ schema:+ $ref: '#/components/schemas/connect-timeout-header'+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.UndeleteUserRequest'+ required: true+ responses:+ default:+ description: Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/connect.error'+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.User'+ /bytebase.v1.UserService/UpdateEmail:+ post:+ tags:+ - bytebase.v1.UserService+ summary: 'Updates a user''s email address. Permissions required: bb.users.updateEmail'+ description: |-+ Updates a user's email address.+ Permissions required: bb.users.updateEmail+ operationId: bytebase.v1.UserService.UpdateEmail+ parameters:+ - name: Connect-Protocol-Version+ in: header+ required: true+ schema:+ $ref: '#/components/schemas/connect-protocol-version'+ - name: Connect-Timeout-Ms+ in: header+ schema:+ $ref: '#/components/schemas/connect-timeout-header'+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.UpdateEmailRequest'+ required: true+ responses:+ default:+ description: Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/connect.error'+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.User'+ /bytebase.v1.UserService/UpdateUser:+ post:+ tags:+ - bytebase.v1.UserService+ summary: 'Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user. Note: Email updates are not supported through this API. Use UpdateEmail instead. Permissions required: bb.users.update (or self)'+ description: |-+ Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user.+ Note: Email updates are not supported through this API. Use UpdateEmail instead.+ Permissions required: bb.users.update (or self)+ operationId: bytebase.v1.UserService.UpdateUser+ parameters:+ - name: Connect-Protocol-Version+ in: header+ required: true+ schema:+ $ref: '#/components/schemas/connect-protocol-version'+ - name: Connect-Timeout-Ms+ in: header+ schema:+ $ref: '#/components/schemas/connect-timeout-header'+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.UpdateUserRequest'required: trueresponses:default:@@ -5599,16 +6060,17 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/google.protobuf.Empty'- /bytebase.v1.UserService/GetCurrentUser:+ $ref: '#/components/schemas/bytebase.v1.User'+ /bytebase.v1.WorkloadIdentityService/CreateWorkloadIdentity:post:tags:- - bytebase.v1.UserService- summary: 'Get the current authenticated user. Permissions required: None'+ - bytebase.v1.WorkloadIdentityService+ summary: 'Creates a new workload identity. For workspace-level: parent is empty, permission bb.workloadIdentities.create on workspace. For project-level: parent is projects/{project}, permission bb.workloadIdentities.create on project.'description: |-- Get the current authenticated user.- Permissions required: None- operationId: bytebase.v1.UserService.GetCurrentUser+ Creates a new workload identity.+ For workspace-level: parent is empty, permission bb.workloadIdentities.create on workspace.+ For project-level: parent is projects/{project}, permission bb.workloadIdentities.create on project.+ operationId: bytebase.v1.WorkloadIdentityService.CreateWorkloadIdentityparameters:- name: Connect-Protocol-Versionin: header@@ -5623,7 +6085,7 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/google.protobuf.Empty'+ $ref: '#/components/schemas/bytebase.v1.CreateWorkloadIdentityRequest'required: trueresponses:default:@@ -5637,17 +6099,16 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/bytebase.v1.User'- /bytebase.v1.UserService/GetUser:+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'+ /bytebase.v1.WorkloadIdentityService/DeleteWorkloadIdentity:post:tags:- - bytebase.v1.UserService- summary: 'Get the user. Any authenticated user can get the user. Permissions required: bb.users.get'+ - bytebase.v1.WorkloadIdentityService+ summary: 'Deletes a workload identity. Permissions required: bb.workloadIdentities.delete'description: |-- Get the user.- Any authenticated user can get the user.- Permissions required: bb.users.get- operationId: bytebase.v1.UserService.GetUser+ Deletes a workload identity.+ Permissions required: bb.workloadIdentities.delete+ operationId: bytebase.v1.WorkloadIdentityService.DeleteWorkloadIdentityparameters:- name: Connect-Protocol-Versionin: header@@ -5662,7 +6123,7 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/bytebase.v1.GetUserRequest'+ $ref: '#/components/schemas/bytebase.v1.DeleteWorkloadIdentityRequest'required: trueresponses:default:@@ -5676,17 +6137,16 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/bytebase.v1.User'- /bytebase.v1.UserService/ListUsers:+ $ref: '#/components/schemas/google.protobuf.Empty'+ /bytebase.v1.WorkloadIdentityService/GetWorkloadIdentity:post:tags:- - bytebase.v1.UserService- summary: 'List all users. Any authenticated user can list users. Permissions required: bb.users.list'+ - bytebase.v1.WorkloadIdentityService+ summary: 'Gets a workload identity by name. Permissions required: bb.workloadIdentities.get'description: |-- List all users.- Any authenticated user can list users.- Permissions required: bb.users.list- operationId: bytebase.v1.UserService.ListUsers+ Gets a workload identity by name.+ Permissions required: bb.workloadIdentities.get+ operationId: bytebase.v1.WorkloadIdentityService.GetWorkloadIdentityparameters:- name: Connect-Protocol-Versionin: header@@ -5701,7 +6161,7 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/bytebase.v1.ListUsersRequest'+ $ref: '#/components/schemas/bytebase.v1.GetWorkloadIdentityRequest'required: trueresponses:default:@@ -5715,16 +6175,17 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/bytebase.v1.ListUsersResponse'- /bytebase.v1.UserService/UndeleteUser:+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'+ /bytebase.v1.WorkloadIdentityService/ListWorkloadIdentities:post:tags:- - bytebase.v1.UserService- summary: 'Restores a deleted user. Permissions required: bb.users.undelete'+ - bytebase.v1.WorkloadIdentityService+ summary: 'Lists workload identities. For workspace-level: parent is empty, permission bb.workloadIdentities.list on workspace. For project-level: parent is projects/{project}, permission bb.workloadIdentities.list on project.'description: |-- Restores a deleted user.- Permissions required: bb.users.undelete- operationId: bytebase.v1.UserService.UndeleteUser+ Lists workload identities.+ For workspace-level: parent is empty, permission bb.workloadIdentities.list on workspace.+ For project-level: parent is projects/{project}, permission bb.workloadIdentities.list on project.+ operationId: bytebase.v1.WorkloadIdentityService.ListWorkloadIdentitiesparameters:- name: Connect-Protocol-Versionin: header@@ -5739,7 +6200,7 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/bytebase.v1.UndeleteUserRequest'+ $ref: '#/components/schemas/bytebase.v1.ListWorkloadIdentitiesRequest'required: trueresponses:default:@@ -5753,16 +6214,16 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/bytebase.v1.User'- /bytebase.v1.UserService/UpdateEmail:+ $ref: '#/components/schemas/bytebase.v1.ListWorkloadIdentitiesResponse'+ /bytebase.v1.WorkloadIdentityService/UndeleteWorkloadIdentity:post:tags:- - bytebase.v1.UserService- summary: 'Updates a user''s email address. Permissions required: bb.users.updateEmail'+ - bytebase.v1.WorkloadIdentityService+ summary: 'Restores a deleted workload identity. Permissions required: bb.workloadIdentities.undelete'description: |-- Updates a user's email address.- Permissions required: bb.users.updateEmail- operationId: bytebase.v1.UserService.UpdateEmail+ Restores a deleted workload identity.+ Permissions required: bb.workloadIdentities.undelete+ operationId: bytebase.v1.WorkloadIdentityService.UndeleteWorkloadIdentityparameters:- name: Connect-Protocol-Versionin: header@@ -5777,7 +6238,7 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/bytebase.v1.UpdateEmailRequest'+ $ref: '#/components/schemas/bytebase.v1.UndeleteWorkloadIdentityRequest'required: trueresponses:default:@@ -5791,17 +6252,16 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/bytebase.v1.User'- /bytebase.v1.UserService/UpdateUser:+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'+ /bytebase.v1.WorkloadIdentityService/UpdateWorkloadIdentity:post:tags:- - bytebase.v1.UserService- summary: 'Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user. Note: Email updates are not supported through this API. Use UpdateEmail instead. Permissions required: bb.users.update (or self)'+ - bytebase.v1.WorkloadIdentityService+ summary: 'Updates a workload identity. Permissions required: bb.workloadIdentities.update'description: |-- Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user.- Note: Email updates are not supported through this API. Use UpdateEmail instead.- Permissions required: bb.users.update (or self)- operationId: bytebase.v1.UserService.UpdateUser+ Updates a workload identity.+ Permissions required: bb.workloadIdentities.update+ operationId: bytebase.v1.WorkloadIdentityService.UpdateWorkloadIdentityparameters:- name: Connect-Protocol-Versionin: header@@ -5816,7 +6276,7 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/bytebase.v1.UpdateUserRequest'+ $ref: '#/components/schemas/bytebase.v1.UpdateWorkloadIdentityRequest'required: trueresponses:default:@@ -5830,7 +6290,7 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/bytebase.v1.User'+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'/bytebase.v1.WorksheetService/BatchUpdateWorksheetOrganizer:post:tags:@@ -8099,6 +8559,29 @@ components:If set to "", no stages are created.title: CreateRolloutRequestadditionalProperties: false+ bytebase.v1.CreateServiceAccountRequest:+ type: object+ properties:+ parent:+ type: string+ title: parent+ description: |-+ The parent resource where this service account will be created.+ Format: projects/{project} for project-level, empty for workspace-level.+ serviceAccountId:+ type: string+ title: service_account_id+ description: |-+ The ID to use for the service account, which will become the final component+ of the service account's email in the format: {service_account_id}@service.bytebase.com+ or {service_account_id}@{project-id}.service.bytebase.com+ serviceAccount:+ title: service_account+ description: The service account to create.+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'+ title: CreateServiceAccountRequest+ additionalProperties: false+ description: Request message for creating a service account.bytebase.v1.CreateSheetRequest:type: objectproperties:@@ -8123,6 +8606,29 @@ components:$ref: '#/components/schemas/bytebase.v1.User'title: CreateUserRequestadditionalProperties: false+ bytebase.v1.CreateWorkloadIdentityRequest:+ type: object+ properties:+ parent:+ type: string+ title: parent+ description: |-+ The parent resource where this workload identity will be created.+ Format: projects/{project} for project-level, empty for workspace-level.+ workloadIdentityId:+ type: string+ title: workload_identity_id+ description: |-+ The ID to use for the workload identity, which will become the final component+ of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.com+ or {workload_identity_id}@{project-id}.workload.bytebase.com+ workloadIdentity:+ title: workload_identity+ description: The workload identity to create.+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'+ title: CreateWorkloadIdentityRequest+ additionalProperties: false+ description: Request message for creating a workload identity.bytebase.v1.CreateWorksheetRequest:type: objectproperties:@@ -8993,6 +9499,18 @@ components:Format: roles/{role}title: DeleteRoleRequestadditionalProperties: false+ bytebase.v1.DeleteServiceAccountRequest:+ type: object+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the service account to delete.+ Format: serviceAccounts/{email}+ title: DeleteServiceAccountRequest+ additionalProperties: false+ description: Request message for deleting a service account.bytebase.v1.DeleteUserRequest:type: objectproperties:@@ -9004,6 +9522,18 @@ components:Format: users/{email}title: DeleteUserRequestadditionalProperties: false+ bytebase.v1.DeleteWorkloadIdentityRequest:+ type: object+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the workload identity to delete.+ Format: workloadIdentities/{email}+ title: DeleteWorkloadIdentityRequest+ additionalProperties: false+ description: Request message for deleting a workload identity.bytebase.v1.DeleteWorksheetRequest:type: objectproperties:@@ -9993,6 +10523,18 @@ components:title: schema_stringtitle: GetSchemaStringResponseadditionalProperties: false+ bytebase.v1.GetServiceAccountRequest:+ type: object+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the service account to retrieve.+ Format: serviceAccounts/{email}+ title: GetServiceAccountRequest+ additionalProperties: false+ description: Request message for getting a service account.bytebase.v1.GetSettingRequest:type: objectproperties:@@ -10069,6 +10611,18 @@ components:Format: users/{email}title: GetUserRequestadditionalProperties: false+ bytebase.v1.GetWorkloadIdentityRequest:+ type: object+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the workload identity to retrieve.+ Format: workloadIdentities/{email}+ title: GetWorkloadIdentityRequest+ additionalProperties: false+ description: Request message for getting a workload identity.bytebase.v1.GetWorksheetRequest:type: objectproperties:@@ -11875,6 +12429,58 @@ components:If this field is omitted, there are no subsequent pages.title: ListRolloutsResponseadditionalProperties: false+ bytebase.v1.ListServiceAccountsRequest:+ type: object+ properties:+ parent:+ type: string+ title: parent+ description: |-+ The parent resource.+ Format: projects/{project} for project-level, empty for workspace-level.+ pageSize:+ type: integer+ title: page_size+ format: int32+ description: |-+ The maximum number of service accounts to return. The service may return fewer than+ this value.+ If unspecified, at most 10 service accounts will be returned.+ The maximum value is 1000; values above 1000 will be coerced to 1000.+ pageToken:+ type: string+ title: page_token+ description: |-+ A page token, received from a previous `ListServiceAccounts` call.+ Provide this to retrieve the subsequent page.++ When paginating, all other parameters provided to `ListServiceAccounts` must match+ the call that provided the page token.+ showDeleted:+ type: boolean+ title: show_deleted+ description: Show deleted service accounts if specified.+ title: ListServiceAccountsRequest+ additionalProperties: false+ description: Request message for listing service accounts.+ bytebase.v1.ListServiceAccountsResponse:+ type: object+ properties:+ serviceAccounts:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'+ title: service_accounts+ description: The service accounts from the specified request.+ nextPageToken:+ type: string+ title: next_page_token+ description: |-+ A token, which can be sent as `page_token` to retrieve the next page.+ If this field is omitted, there are no subsequent pages.+ title: ListServiceAccountsResponse+ additionalProperties: false+ description: Response message for listing service accounts.bytebase.v1.ListSettingsRequest:type: objecttitle: ListSettingsRequest@@ -11984,6 +12590,58 @@ components:If this field is omitted, there are no subsequent pages.title: ListUsersResponseadditionalProperties: false+ bytebase.v1.ListWorkloadIdentitiesRequest:+ type: object+ properties:+ parent:+ type: string+ title: parent+ description: |-+ The parent resource.+ Format: projects/{project} for project-level, empty for workspace-level.+ pageSize:+ type: integer+ title: page_size+ format: int32+ description: |-+ The maximum number of workload identities to return. The service may return fewer than+ this value.+ If unspecified, at most 10 workload identities will be returned.+ The maximum value is 1000; values above 1000 will be coerced to 1000.+ pageToken:+ type: string+ title: page_token+ description: |-+ A page token, received from a previous `ListWorkloadIdentities` call.+ Provide this to retrieve the subsequent page.++ When paginating, all other parameters provided to `ListWorkloadIdentities` must match+ the call that provided the page token.+ showDeleted:+ type: boolean+ title: show_deleted+ description: Show deleted workload identities if specified.+ title: ListWorkloadIdentitiesRequest+ additionalProperties: false+ description: Request message for listing workload identities.+ bytebase.v1.ListWorkloadIdentitiesResponse:+ type: object+ properties:+ workloadIdentities:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'+ title: workload_identities+ description: The workload identities from the specified request.+ nextPageToken:+ type: string+ title: next_page_token+ description: |-+ A token, which can be sent as `page_token` to retrieve the next page.+ If this field is omitted, there are no subsequent pages.+ title: ListWorkloadIdentitiesResponse+ additionalProperties: false+ description: Response message for listing workload identities.bytebase.v1.LoginRequest:type: objectproperties:@@ -15040,6 +15698,42 @@ components:description: Whether to skip this sequence during schema dump operations.title: SequenceMetadataadditionalProperties: false+ bytebase.v1.ServiceAccount:+ type: object+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the service account.+ Format: serviceAccounts/{email}+ state:+ title: state+ description: The state of the service account.+ $ref: '#/components/schemas/bytebase.v1.State'+ email:+ type: string+ title: email+ description: |-+ The email of the service account.+ For workspace-level: {name}@service.bytebase.com+ For project-level: {name}@{project-id}.service.bytebase.com+ title:+ type: string+ title: title+ maxLength: 200+ description: The display title of the service account.+ serviceKey:+ type: string+ title: service_key+ description: The service key for authentication. Only returned on creation or key rotation.+ createTime:+ title: create_time+ description: The timestamp when the service account was created.+ $ref: '#/components/schemas/google.protobuf.Timestamp'+ title: ServiceAccount+ additionalProperties: false+ description: ServiceAccount represents an API integration account.bytebase.v1.SetIamPolicyRequest:type: objectproperties:@@ -16661,6 +17355,18 @@ components:Format: projects/{project}/releases/{release}title: UndeleteReleaseRequestadditionalProperties: false+ bytebase.v1.UndeleteServiceAccountRequest:+ type: object+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the deleted service account.+ Format: serviceAccounts/{email}+ title: UndeleteServiceAccountRequest+ additionalProperties: false+ description: Request message for restoring a deleted service account.bytebase.v1.UndeleteUserRequest:type: objectproperties:@@ -16672,6 +17378,18 @@ components:Format: users/{email}title: UndeleteUserRequestadditionalProperties: false+ bytebase.v1.UndeleteWorkloadIdentityRequest:+ type: object+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the deleted workload identity.+ Format: workloadIdentities/{email}+ title: UndeleteWorkloadIdentityRequest+ additionalProperties: false+ description: Request message for restoring a deleted workload identity.bytebase.v1.UpdateDataSourceRequest:type: objectproperties:@@ -17029,6 +17747,26 @@ components:In this situation, `update_mask` is ignored.title: UpdateRoleRequestadditionalProperties: false+ bytebase.v1.UpdateServiceAccountRequest:+ type: object+ properties:+ serviceAccount:+ title: service_account+ description: |-+ The service account to update.++ The service account's `name` field is used to identify the service account to update.+ Format: serviceAccounts/{email}+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'+ updateMask:+ title: update_mask+ description: |-+ The list of fields to update.+ Supported fields: title, service_key (triggers key rotation)+ $ref: '#/components/schemas/google.protobuf.FieldMask'+ title: UpdateServiceAccountRequest+ additionalProperties: false+ description: Request message for updating a service account.bytebase.v1.UpdateSettingRequest:type: objectproperties:@@ -17123,6 +17861,26 @@ components:In this situation, `update_mask` is ignored.title: UpdateWebhookRequestadditionalProperties: false+ bytebase.v1.UpdateWorkloadIdentityRequest:+ type: object+ properties:+ workloadIdentity:+ title: workload_identity+ description: |-+ The workload identity to update.++ The workload identity's `name` field is used to identify the workload identity to update.+ Format: workloadIdentities/{email}+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'+ updateMask:+ title: update_mask+ description: |-+ The list of fields to update.+ Supported fields: title, workload_identity_config+ $ref: '#/components/schemas/google.protobuf.FieldMask'+ title: UpdateWorkloadIdentityRequest+ additionalProperties: false+ description: Request message for updating a workload identity.bytebase.v1.UpdateWorksheetOrganizerRequest:type: objectproperties:@@ -17385,6 +18143,42 @@ components:- WECOM- LARKdescription: Webhook integration type.+ bytebase.v1.WorkloadIdentity:+ type: object+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the workload identity.+ Format: workloadIdentities/{email}+ state:+ title: state+ description: The state of the workload identity.+ $ref: '#/components/schemas/bytebase.v1.State'+ email:+ type: string+ title: email+ description: |-+ The email of the workload identity.+ For workspace-level: {name}@workload.bytebase.com+ For project-level: {name}@{project-id}.workload.bytebase.com+ title:+ type: string+ title: title+ maxLength: 200+ description: The display title of the workload identity.+ createTime:+ title: create_time+ description: The timestamp when the workload identity was created.+ $ref: '#/components/schemas/google.protobuf.Timestamp'+ workloadIdentityConfig:+ title: workload_identity_config+ description: The workload identity configuration for OIDC token validation.+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentityConfig'+ title: WorkloadIdentity+ additionalProperties: false+ description: WorkloadIdentity represents an external CI/CD workload identity.bytebase.v1.WorkloadIdentityConfig:type: objectproperties:@@ -18836,10 +19630,14 @@ tags:description: RoleService manages workspace roles and permissions.- name: bytebase.v1.RolloutServicedescription: RolloutService manages the execution of deployment plans.+ - name: bytebase.v1.ServiceAccountService+ description: ServiceAccountService manages service accounts for API integrations.- name: bytebase.v1.SheetServicedescription: SheetService manages SQL scripts and saved queries.- name: bytebase.v1.SubscriptionServicedescription: SubscriptionService manages enterprise subscriptions and licensing.+ - name: bytebase.v1.WorkloadIdentityService+ description: WorkloadIdentityService manages workload identities for external CI/CD integrations.- name: bytebase.v1.WorksheetServicedescription: WorksheetService manages SQL worksheets for query development.- name: bytebase.v1.WorkspaceServicediff --git a/backend/generated-go/v1/service_account_service.pb.go b/backend/generated-go/v1/service_account_service.pb.gonew file mode 100644index 0000000000..a8f46148c7--- /dev/null+++ b/backend/generated-go/v1/service_account_service.pb.go@@ -0,0 +1,657 @@+// Code generated by protoc-gen-go. DO NOT EDIT.+// versions:+// protoc-gen-go v1.36.11+// protoc (unknown)+// source: v1/service_account_service.proto++package v1++import (+ _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"+ _ "google.golang.org/genproto/googleapis/api/annotations"+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"+ emptypb "google.golang.org/protobuf/types/known/emptypb"+ fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"+ reflect "reflect"+ sync "sync"+ unsafe "unsafe"+)++const (+ // Verify that this generated code is sufficiently up-to-date.+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)+ // Verify that runtime/protoimpl is sufficiently up-to-date.+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)+)++// ServiceAccount represents an API integration account.+type ServiceAccount struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The name of the service account.+ // Format: serviceAccounts/{email}+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ // The state of the service account.+ State State `protobuf:"varint,2,opt,name=state,proto3,enum=bytebase.v1.State" json:"state,omitempty"`+ // The email of the service account.+ // For workspace-level: {name}@service.bytebase.com+ // For project-level: {name}@{project-id}.service.bytebase.com+ Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`+ // The display title of the service account.+ Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`+ // The service key for authentication. Only returned on creation or key rotation.+ ServiceKey string `protobuf:"bytes,5,opt,name=service_key,json=serviceKey,proto3" json:"service_key,omitempty"`+ // The timestamp when the service account was created.+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *ServiceAccount) Reset() {+ *x = ServiceAccount{}+ mi := &file_v1_service_account_service_proto_msgTypes[0]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *ServiceAccount) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ServiceAccount) ProtoMessage() {}++func (x *ServiceAccount) ProtoReflect() protoreflect.Message {+ mi := &file_v1_service_account_service_proto_msgTypes[0]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use ServiceAccount.ProtoReflect.Descriptor instead.+func (*ServiceAccount) Descriptor() ([]byte, []int) {+ return file_v1_service_account_service_proto_rawDescGZIP(), []int{0}+}++func (x *ServiceAccount) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *ServiceAccount) GetState() State {+ if x != nil {+ return x.State+ }+ return State_STATE_UNSPECIFIED+}++func (x *ServiceAccount) GetEmail() string {+ if x != nil {+ return x.Email+ }+ return ""+}++func (x *ServiceAccount) GetTitle() string {+ if x != nil {+ return x.Title+ }+ return ""+}++func (x *ServiceAccount) GetServiceKey() string {+ if x != nil {+ return x.ServiceKey+ }+ return ""+}++func (x *ServiceAccount) GetCreateTime() *timestamppb.Timestamp {+ if x != nil {+ return x.CreateTime+ }+ return nil+}++// Request message for creating a service account.+type CreateServiceAccountRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The parent resource where this service account will be created.+ // Format: projects/{project} for project-level, empty for workspace-level.+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`+ // The ID to use for the service account, which will become the final component+ // of the service account's email in the format: {service_account_id}@service.bytebase.com+ // or {service_account_id}@{project-id}.service.bytebase.com+ ServiceAccountId string `protobuf:"bytes,2,opt,name=service_account_id,json=serviceAccountId,proto3" json:"service_account_id,omitempty"`+ // The service account to create.+ ServiceAccount *ServiceAccount `protobuf:"bytes,3,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *CreateServiceAccountRequest) Reset() {+ *x = CreateServiceAccountRequest{}+ mi := &file_v1_service_account_service_proto_msgTypes[1]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *CreateServiceAccountRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*CreateServiceAccountRequest) ProtoMessage() {}++func (x *CreateServiceAccountRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_service_account_service_proto_msgTypes[1]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use CreateServiceAccountRequest.ProtoReflect.Descriptor instead.+func (*CreateServiceAccountRequest) Descriptor() ([]byte, []int) {+ return file_v1_service_account_service_proto_rawDescGZIP(), []int{1}+}++func (x *CreateServiceAccountRequest) GetParent() string {+ if x != nil {+ return x.Parent+ }+ return ""+}++func (x *CreateServiceAccountRequest) GetServiceAccountId() string {+ if x != nil {+ return x.ServiceAccountId+ }+ return ""+}++func (x *CreateServiceAccountRequest) GetServiceAccount() *ServiceAccount {+ if x != nil {+ return x.ServiceAccount+ }+ return nil+}++// Request message for getting a service account.+type GetServiceAccountRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The name of the service account to retrieve.+ // Format: serviceAccounts/{email}+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *GetServiceAccountRequest) Reset() {+ *x = GetServiceAccountRequest{}+ mi := &file_v1_service_account_service_proto_msgTypes[2]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *GetServiceAccountRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*GetServiceAccountRequest) ProtoMessage() {}++func (x *GetServiceAccountRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_service_account_service_proto_msgTypes[2]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use GetServiceAccountRequest.ProtoReflect.Descriptor instead.+func (*GetServiceAccountRequest) Descriptor() ([]byte, []int) {+ return file_v1_service_account_service_proto_rawDescGZIP(), []int{2}+}++func (x *GetServiceAccountRequest) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++// Request message for listing service accounts.+type ListServiceAccountsRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The parent resource.+ // Format: projects/{project} for project-level, empty for workspace-level.+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`+ // The maximum number of service accounts to return. The service may return fewer than+ // this value.+ // If unspecified, at most 10 service accounts will be returned.+ // The maximum value is 1000; values above 1000 will be coerced to 1000.+ PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`+ // A page token, received from a previous `ListServiceAccounts` call.+ // Provide this to retrieve the subsequent page.+ //+ // When paginating, all other parameters provided to `ListServiceAccounts` must match+ // the call that provided the page token.+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`+ // Show deleted service accounts if specified.+ ShowDeleted bool `protobuf:"varint,4,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *ListServiceAccountsRequest) Reset() {+ *x = ListServiceAccountsRequest{}+ mi := &file_v1_service_account_service_proto_msgTypes[3]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *ListServiceAccountsRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ListServiceAccountsRequest) ProtoMessage() {}++func (x *ListServiceAccountsRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_service_account_service_proto_msgTypes[3]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use ListServiceAccountsRequest.ProtoReflect.Descriptor instead.+func (*ListServiceAccountsRequest) Descriptor() ([]byte, []int) {+ return file_v1_service_account_service_proto_rawDescGZIP(), []int{3}+}++func (x *ListServiceAccountsRequest) GetParent() string {+ if x != nil {+ return x.Parent+ }+ return ""+}++func (x *ListServiceAccountsRequest) GetPageSize() int32 {+ if x != nil {+ return x.PageSize+ }+ return 0+}++func (x *ListServiceAccountsRequest) GetPageToken() string {+ if x != nil {+ return x.PageToken+ }+ return ""+}++func (x *ListServiceAccountsRequest) GetShowDeleted() bool {+ if x != nil {+ return x.ShowDeleted+ }+ return false+}++// Response message for listing service accounts.+type ListServiceAccountsResponse struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The service accounts from the specified request.+ ServiceAccounts []*ServiceAccount `protobuf:"bytes,1,rep,name=service_accounts,json=serviceAccounts,proto3" json:"service_accounts,omitempty"`+ // A token, which can be sent as `page_token` to retrieve the next page.+ // If this field is omitted, there are no subsequent pages.+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *ListServiceAccountsResponse) Reset() {+ *x = ListServiceAccountsResponse{}+ mi := &file_v1_service_account_service_proto_msgTypes[4]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *ListServiceAccountsResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ListServiceAccountsResponse) ProtoMessage() {}++func (x *ListServiceAccountsResponse) ProtoReflect() protoreflect.Message {+ mi := &file_v1_service_account_service_proto_msgTypes[4]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use ListServiceAccountsResponse.ProtoReflect.Descriptor instead.+func (*ListServiceAccountsResponse) Descriptor() ([]byte, []int) {+ return file_v1_service_account_service_proto_rawDescGZIP(), []int{4}+}++func (x *ListServiceAccountsResponse) GetServiceAccounts() []*ServiceAccount {+ if x != nil {+ return x.ServiceAccounts+ }+ return nil+}++func (x *ListServiceAccountsResponse) GetNextPageToken() string {+ if x != nil {+ return x.NextPageToken+ }+ return ""+}++// Request message for updating a service account.+type UpdateServiceAccountRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The service account to update.+ //+ // The service account's `name` field is used to identify the service account to update.+ // Format: serviceAccounts/{email}+ ServiceAccount *ServiceAccount `protobuf:"bytes,1,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"`+ // The list of fields to update.+ // Supported fields: title, service_key (triggers key rotation)+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *UpdateServiceAccountRequest) Reset() {+ *x = UpdateServiceAccountRequest{}+ mi := &file_v1_service_account_service_proto_msgTypes[5]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *UpdateServiceAccountRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*UpdateServiceAccountRequest) ProtoMessage() {}++func (x *UpdateServiceAccountRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_service_account_service_proto_msgTypes[5]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use UpdateServiceAccountRequest.ProtoReflect.Descriptor instead.+func (*UpdateServiceAccountRequest) Descriptor() ([]byte, []int) {+ return file_v1_service_account_service_proto_rawDescGZIP(), []int{5}+}++func (x *UpdateServiceAccountRequest) GetServiceAccount() *ServiceAccount {+ if x != nil {+ return x.ServiceAccount+ }+ return nil+}++func (x *UpdateServiceAccountRequest) GetUpdateMask() *fieldmaskpb.FieldMask {+ if x != nil {+ return x.UpdateMask+ }+ return nil+}++// Request message for deleting a service account.+type DeleteServiceAccountRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The name of the service account to delete.+ // Format: serviceAccounts/{email}+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *DeleteServiceAccountRequest) Reset() {+ *x = DeleteServiceAccountRequest{}+ mi := &file_v1_service_account_service_proto_msgTypes[6]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *DeleteServiceAccountRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DeleteServiceAccountRequest) ProtoMessage() {}++func (x *DeleteServiceAccountRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_service_account_service_proto_msgTypes[6]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DeleteServiceAccountRequest.ProtoReflect.Descriptor instead.+func (*DeleteServiceAccountRequest) Descriptor() ([]byte, []int) {+ return file_v1_service_account_service_proto_rawDescGZIP(), []int{6}+}++func (x *DeleteServiceAccountRequest) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++// Request message for restoring a deleted service account.+type UndeleteServiceAccountRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The name of the deleted service account.+ // Format: serviceAccounts/{email}+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *UndeleteServiceAccountRequest) Reset() {+ *x = UndeleteServiceAccountRequest{}+ mi := &file_v1_service_account_service_proto_msgTypes[7]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *UndeleteServiceAccountRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*UndeleteServiceAccountRequest) ProtoMessage() {}++func (x *UndeleteServiceAccountRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_service_account_service_proto_msgTypes[7]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use UndeleteServiceAccountRequest.ProtoReflect.Descriptor instead.+func (*UndeleteServiceAccountRequest) Descriptor() ([]byte, []int) {+ return file_v1_service_account_service_proto_rawDescGZIP(), []int{7}+}++func (x *UndeleteServiceAccountRequest) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++var File_v1_service_account_service_proto protoreflect.FileDescriptor++const file_v1_service_account_service_proto_rawDesc = "" ++ "\n" ++ " v1/service_account_service.proto\x12\vbytebase.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\"\xb1\x02\n" ++ "\x0eServiceAccount\x12\x17\n" ++ "\x04name\x18\x01 \x01(\tB\x03\xe0A\x03R\x04name\x12(\n" ++ "\x05state\x18\x02 \x01(\x0e2\x12.bytebase.v1.StateR\x05state\x12\x19\n" ++ "\x05email\x18\x03 \x01(\tB\x03\xe0A\x03R\x05email\x12\x1e\n" ++ "\x05title\x18\x04 \x01(\tB\b\xbaH\x05r\x03\x18\xc8\x01R\x05title\x12$\n" ++ "\vservice_key\x18\x05 \x01(\tB\x03\xe0A\x03R\n" ++ "serviceKey\x12@\n" ++ "\vcreate_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" ++ "createTime:9\xeaA6\n" ++ "\x1bbytebase.com/ServiceAccount\x12\x17serviceAccounts/{email}\"\xce\x01\n" ++ "\x1bCreateServiceAccountRequest\x121\n" ++ "\x06parent\x18\x01 \x01(\tB\x19\xfaA\x16\n" ++ "\x14bytebase.com/ProjectR\x06parent\x121\n" ++ "\x12service_account_id\x18\x02 \x01(\tB\x03\xe0A\x02R\x10serviceAccountId\x12I\n" ++ "\x0fservice_account\x18\x03 \x01(\v2\x1b.bytebase.v1.ServiceAccountB\x03\xe0A\x02R\x0eserviceAccount\"S\n" ++ "\x18GetServiceAccountRequest\x127\n" ++ "\x04name\x18\x01 \x01(\tB#\xe0A\x02\xfaA\x1d\n" ++ "\x1bbytebase.com/ServiceAccountR\x04name\"\xae\x01\n" ++ "\x1aListServiceAccountsRequest\x121\n" ++ "\x06parent\x18\x01 \x01(\tB\x19\xfaA\x16\n" ++ "\x14bytebase.com/ProjectR\x06parent\x12\x1b\n" ++ "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" ++ "\n" ++ "page_token\x18\x03 \x01(\tR\tpageToken\x12!\n" ++ "\fshow_deleted\x18\x04 \x01(\bR\vshowDeleted\"\x8d\x01\n" ++ "\x1bListServiceAccountsResponse\x12F\n" ++ "\x10service_accounts\x18\x01 \x03(\v2\x1b.bytebase.v1.ServiceAccountR\x0fserviceAccounts\x12&\n" ++ "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xa5\x01\n" ++ "\x1bUpdateServiceAccountRequest\x12I\n" ++ "\x0fservice_account\x18\x01 \x01(\v2\x1b.bytebase.v1.ServiceAccountB\x03\xe0A\x02R\x0eserviceAccount\x12;\n" ++ "\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" ++ "updateMask\"V\n" ++ "\x1bDeleteServiceAccountRequest\x127\n" ++ "\x04name\x18\x01 \x01(\tB#\xe0A\x02\xfaA\x1d\n" ++ "\x1bbytebase.com/ServiceAccountR\x04name\"X\n" ++ "\x1dUndeleteServiceAccountRequest\x127\n" ++ "\x04name\x18\x01 \x01(\tB#\xe0A\x02\xfaA\x1d\n" ++ "\x1bbytebase.com/ServiceAccountR\x04name2\x88\n" ++ "\n" ++ "\x15ServiceAccountService\x12\x99\x02\n" ++ "\x14CreateServiceAccount\x12(.bytebase.v1.CreateServiceAccountRequest\x1a\x1b.bytebase.v1.ServiceAccount\"\xb9\x01\xdaA)parent,service_account,service_account_id\x8a\xea0\x19bb.serviceAccounts.create\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02b:\x0fservice_accountZ&:\x0fservice_account\"\x13/v1/serviceAccounts\"'/v1/{parent=projects/*}/serviceAccounts\x12\xa2\x01\n" ++ "\x11GetServiceAccount\x12%.bytebase.v1.GetServiceAccountRequest\x1a\x1b.bytebase.v1.ServiceAccount\"I\xdaA\x04name\x8a\xea0\x16bb.serviceAccounts.get\x90\xea0\x01\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{name=serviceAccounts/*}\x12\xd8\x01\n" ++ "\x13ListServiceAccounts\x12'.bytebase.v1.ListServiceAccountsRequest\x1a(.bytebase.v1.ListServiceAccountsResponse\"n\xdaA\x06parent\x8a\xea0\x17bb.serviceAccounts.list\x90\xea0\x01\x82\xd3\xe4\x93\x02@Z\x15\x12\x13/v1/serviceAccounts\x12'/v1/{parent=projects/*}/serviceAccounts\x12\xe8\x01\n" ++ "\x14UpdateServiceAccount\x12(.bytebase.v1.UpdateServiceAccountRequest\x1a\x1b.bytebase.v1.ServiceAccount\"\x88\x01\xdaA\x1bservice_account,update_mask\x8a\xea0\x19bb.serviceAccounts.update\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02?:\x0fservice_account2,/v1/{service_account.name=serviceAccounts/*}\x12\xaa\x01\n" ++ "\x14DeleteServiceAccount\x12(.bytebase.v1.DeleteServiceAccountRequest\x1a\x16.google.protobuf.Empty\"P\xdaA\x04name\x8a\xea0\x19bb.serviceAccounts.delete\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02\x1e*\x1c/v1/{name=serviceAccounts/*}\x12\xba\x01\n" ++ "\x16UndeleteServiceAccount\x12*.bytebase.v1.UndeleteServiceAccountRequest\x1a\x1b.bytebase.v1.ServiceAccount\"W\x8a\xea0\x1bbb.serviceAccounts.undelete\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02*:\x01*\"%/v1/{name=serviceAccounts/*}:undeleteB\xb0\x01\n" ++ "\x0fcom.bytebase.v1B\x1aServiceAccountServiceProtoP\x01Z4github.com/bytebase/bytebase/backend/generated-go/v1\xa2\x02\x03BXX\xaa\x02\vBytebase.V1\xca\x02\vBytebase\\V1\xe2\x02\x17Bytebase\\V1\\GPBMetadata\xea\x02\fBytebase::V1b\x06proto3"++var (+ file_v1_service_account_service_proto_rawDescOnce sync.Once+ file_v1_service_account_service_proto_rawDescData []byte+)++func file_v1_service_account_service_proto_rawDescGZIP() []byte {+ file_v1_service_account_service_proto_rawDescOnce.Do(func() {+ file_v1_service_account_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_v1_service_account_service_proto_rawDesc), len(file_v1_service_account_service_proto_rawDesc)))+ })+ return file_v1_service_account_service_proto_rawDescData+}++var file_v1_service_account_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8)+var file_v1_service_account_service_proto_goTypes = []any{+ (*ServiceAccount)(nil), // 0: bytebase.v1.ServiceAccount+ (*CreateServiceAccountRequest)(nil), // 1: bytebase.v1.CreateServiceAccountRequest+ (*GetServiceAccountRequest)(nil), // 2: bytebase.v1.GetServiceAccountRequest+ (*ListServiceAccountsRequest)(nil), // 3: bytebase.v1.ListServiceAccountsRequest+ (*ListServiceAccountsResponse)(nil), // 4: bytebase.v1.ListServiceAccountsResponse+ (*UpdateServiceAccountRequest)(nil), // 5: bytebase.v1.UpdateServiceAccountRequest+ (*DeleteServiceAccountRequest)(nil), // 6: bytebase.v1.DeleteServiceAccountRequest+ (*UndeleteServiceAccountRequest)(nil), // 7: bytebase.v1.UndeleteServiceAccountRequest+ (State)(0), // 8: bytebase.v1.State+ (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp+ (*fieldmaskpb.FieldMask)(nil), // 10: google.protobuf.FieldMask+ (*emptypb.Empty)(nil), // 11: google.protobuf.Empty+}+var file_v1_service_account_service_proto_depIdxs = []int32{+ 8, // 0: bytebase.v1.ServiceAccount.state:type_name -> bytebase.v1.State+ 9, // 1: bytebase.v1.ServiceAccount.create_time:type_name -> google.protobuf.Timestamp+ 0, // 2: bytebase.v1.CreateServiceAccountRequest.service_account:type_name -> bytebase.v1.ServiceAccount+ 0, // 3: bytebase.v1.ListServiceAccountsResponse.service_accounts:type_name -> bytebase.v1.ServiceAccount+ 0, // 4: bytebase.v1.UpdateServiceAccountRequest.service_account:type_name -> bytebase.v1.ServiceAccount+ 10, // 5: bytebase.v1.UpdateServiceAccountRequest.update_mask:type_name -> google.protobuf.FieldMask+ 1, // 6: bytebase.v1.ServiceAccountService.CreateServiceAccount:input_type -> bytebase.v1.CreateServiceAccountRequest+ 2, // 7: bytebase.v1.ServiceAccountService.GetServiceAccount:input_type -> bytebase.v1.GetServiceAccountRequest+ 3, // 8: bytebase.v1.ServiceAccountService.ListServiceAccounts:input_type -> bytebase.v1.ListServiceAccountsRequest+ 5, // 9: bytebase.v1.ServiceAccountService.UpdateServiceAccount:input_type -> bytebase.v1.UpdateServiceAccountRequest+ 6, // 10: bytebase.v1.ServiceAccountService.DeleteServiceAccount:input_type -> bytebase.v1.DeleteServiceAccountRequest+ 7, // 11: bytebase.v1.ServiceAccountService.UndeleteServiceAccount:input_type -> bytebase.v1.UndeleteServiceAccountRequest+ 0, // 12: bytebase.v1.ServiceAccountService.CreateServiceAccount:output_type -> bytebase.v1.ServiceAccount+ 0, // 13: bytebase.v1.ServiceAccountService.GetServiceAccount:output_type -> bytebase.v1.ServiceAccount+ 4, // 14: bytebase.v1.ServiceAccountService.ListServiceAccounts:output_type -> bytebase.v1.ListServiceAccountsResponse+ 0, // 15: bytebase.v1.ServiceAccountService.UpdateServiceAccount:output_type -> bytebase.v1.ServiceAccount+ 11, // 16: bytebase.v1.ServiceAccountService.DeleteServiceAccount:output_type -> google.protobuf.Empty+ 0, // 17: bytebase.v1.ServiceAccountService.UndeleteServiceAccount:output_type -> bytebase.v1.ServiceAccount+ 12, // [12:18] is the sub-list for method output_type+ 6, // [6:12] is the sub-list for method input_type+ 6, // [6:6] is the sub-list for extension type_name+ 6, // [6:6] is the sub-list for extension extendee+ 0, // [0:6] is the sub-list for field type_name+}++func init() { file_v1_service_account_service_proto_init() }+func file_v1_service_account_service_proto_init() {+ if File_v1_service_account_service_proto != nil {+ return+ }+ file_v1_annotation_proto_init()+ file_v1_common_proto_init()+ type x struct{}+ out := protoimpl.TypeBuilder{+ File: protoimpl.DescBuilder{+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_service_account_service_proto_rawDesc), len(file_v1_service_account_service_proto_rawDesc)),+ NumEnums: 0,+ NumMessages: 8,+ NumExtensions: 0,+ NumServices: 1,+ },+ GoTypes: file_v1_service_account_service_proto_goTypes,+ DependencyIndexes: file_v1_service_account_service_proto_depIdxs,+ MessageInfos: file_v1_service_account_service_proto_msgTypes,+ }.Build()+ File_v1_service_account_service_proto = out.File+ file_v1_service_account_service_proto_goTypes = nil+ file_v1_service_account_service_proto_depIdxs = nil+}diff --git a/backend/generated-go/v1/service_account_service.pb.gw.go b/backend/generated-go/v1/service_account_service.pb.gw.gonew file mode 100644index 0000000000..2cc486d11b--- /dev/null+++ b/backend/generated-go/v1/service_account_service.pb.gw.go@@ -0,0 +1,795 @@+// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.+// source: v1/service_account_service.proto++/*+Package v1 is a reverse proxy.++It translates gRPC into RESTful JSON APIs.+*/+package v1++import (+ "context"+ "errors"+ "io"+ "net/http"++ "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"+ "google.golang.org/grpc"+ "google.golang.org/grpc/codes"+ "google.golang.org/grpc/grpclog"+ "google.golang.org/grpc/metadata"+ "google.golang.org/grpc/status"+ "google.golang.org/protobuf/proto"+)++// Suppress "imported and not used" errors+var (+ _ codes.Code+ _ io.Reader+ _ status.Status+ _ = errors.New+ _ = runtime.String+ _ = utilities.NewDoubleArray+ _ = metadata.Join+)++var filter_ServiceAccountService_CreateServiceAccount_0 = &utilities.DoubleArray{Encoding: map[string]int{"service_account": 0, "parent": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}++func request_ServiceAccountService_CreateServiceAccount_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceAccountServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq CreateServiceAccountRequest+ metadata runtime.ServerMetadata+ err error+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.ServiceAccount); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServiceAccountService_CreateServiceAccount_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := client.CreateServiceAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_ServiceAccountService_CreateServiceAccount_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceAccountServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq CreateServiceAccountRequest+ metadata runtime.ServerMetadata+ err error+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.ServiceAccount); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServiceAccountService_CreateServiceAccount_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := server.CreateServiceAccount(ctx, &protoReq)+ return msg, metadata, err+}++var filter_ServiceAccountService_CreateServiceAccount_1 = &utilities.DoubleArray{Encoding: map[string]int{"service_account": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}++func request_ServiceAccountService_CreateServiceAccount_1(ctx context.Context, marshaler runtime.Marshaler, client ServiceAccountServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq CreateServiceAccountRequest+ metadata runtime.ServerMetadata+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.ServiceAccount); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServiceAccountService_CreateServiceAccount_1); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := client.CreateServiceAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_ServiceAccountService_CreateServiceAccount_1(ctx context.Context, marshaler runtime.Marshaler, server ServiceAccountServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq CreateServiceAccountRequest+ metadata runtime.ServerMetadata+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.ServiceAccount); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServiceAccountService_CreateServiceAccount_1); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := server.CreateServiceAccount(ctx, &protoReq)+ return msg, metadata, err+}++func request_ServiceAccountService_GetServiceAccount_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceAccountServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq GetServiceAccountRequest+ metadata runtime.ServerMetadata+ err error+ )+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ 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.GetServiceAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_ServiceAccountService_GetServiceAccount_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceAccountServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq GetServiceAccountRequest+ metadata runtime.ServerMetadata+ err error+ )+ 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 := server.GetServiceAccount(ctx, &protoReq)+ return msg, metadata, err+}++var filter_ServiceAccountService_ListServiceAccounts_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}++func request_ServiceAccountService_ListServiceAccounts_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceAccountServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq ListServiceAccountsRequest+ metadata runtime.ServerMetadata+ err error+ )+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServiceAccountService_ListServiceAccounts_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := client.ListServiceAccounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_ServiceAccountService_ListServiceAccounts_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceAccountServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq ListServiceAccountsRequest+ metadata runtime.ServerMetadata+ err error+ )+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServiceAccountService_ListServiceAccounts_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := server.ListServiceAccounts(ctx, &protoReq)+ return msg, metadata, err+}++var filter_ServiceAccountService_ListServiceAccounts_1 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}++func request_ServiceAccountService_ListServiceAccounts_1(ctx context.Context, marshaler runtime.Marshaler, client ServiceAccountServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq ListServiceAccountsRequest+ metadata runtime.ServerMetadata+ )+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServiceAccountService_ListServiceAccounts_1); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := client.ListServiceAccounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_ServiceAccountService_ListServiceAccounts_1(ctx context.Context, marshaler runtime.Marshaler, server ServiceAccountServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq ListServiceAccountsRequest+ metadata runtime.ServerMetadata+ )+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServiceAccountService_ListServiceAccounts_1); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := server.ListServiceAccounts(ctx, &protoReq)+ return msg, metadata, err+}++var filter_ServiceAccountService_UpdateServiceAccount_0 = &utilities.DoubleArray{Encoding: map[string]int{"service_account": 0, "name": 1}, Base: []int{1, 2, 1, 0, 0}, Check: []int{0, 1, 2, 3, 2}}++func request_ServiceAccountService_UpdateServiceAccount_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceAccountServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq UpdateServiceAccountRequest+ metadata runtime.ServerMetadata+ err error+ )+ newReader, berr := utilities.IOReaderFactory(req.Body)+ if berr != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)+ }+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.ServiceAccount); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.ServiceAccount); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ } else {+ protoReq.UpdateMask = fieldMask+ }+ }+ val, ok := pathParams["service_account.name"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "service_account.name")+ }+ err = runtime.PopulateFieldFromPath(&protoReq, "service_account.name", val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "service_account.name", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServiceAccountService_UpdateServiceAccount_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := client.UpdateServiceAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_ServiceAccountService_UpdateServiceAccount_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceAccountServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq UpdateServiceAccountRequest+ metadata runtime.ServerMetadata+ err error+ )+ newReader, berr := utilities.IOReaderFactory(req.Body)+ if berr != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)+ }+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.ServiceAccount); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.ServiceAccount); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ } else {+ protoReq.UpdateMask = fieldMask+ }+ }+ val, ok := pathParams["service_account.name"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "service_account.name")+ }+ err = runtime.PopulateFieldFromPath(&protoReq, "service_account.name", val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "service_account.name", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServiceAccountService_UpdateServiceAccount_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := server.UpdateServiceAccount(ctx, &protoReq)+ return msg, metadata, err+}++func request_ServiceAccountService_DeleteServiceAccount_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceAccountServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq DeleteServiceAccountRequest+ metadata runtime.ServerMetadata+ err error+ )+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ 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.DeleteServiceAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_ServiceAccountService_DeleteServiceAccount_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceAccountServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq DeleteServiceAccountRequest+ metadata runtime.ServerMetadata+ err error+ )+ 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 := server.DeleteServiceAccount(ctx, &protoReq)+ return msg, metadata, err+}++func request_ServiceAccountService_UndeleteServiceAccount_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceAccountServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq UndeleteServiceAccountRequest+ metadata runtime.ServerMetadata+ err error+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ 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.UndeleteServiceAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_ServiceAccountService_UndeleteServiceAccount_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceAccountServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq UndeleteServiceAccountRequest+ metadata runtime.ServerMetadata+ err error+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", 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 := server.UndeleteServiceAccount(ctx, &protoReq)+ return msg, metadata, err+}++// RegisterServiceAccountServiceHandlerServer registers the http handlers for service ServiceAccountService to "mux".+// UnaryRPC :call ServiceAccountServiceServer directly.+// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServiceAccountServiceHandlerFromEndpoint instead.+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.+func RegisterServiceAccountServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceAccountServiceServer) error {+ mux.Handle(http.MethodPost, pattern_ServiceAccountService_CreateServiceAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.ServiceAccountService/CreateServiceAccount", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/serviceAccounts"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_ServiceAccountService_CreateServiceAccount_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_ServiceAccountService_CreateServiceAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodPost, pattern_ServiceAccountService_CreateServiceAccount_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.ServiceAccountService/CreateServiceAccount", runtime.WithHTTPPathPattern("/v1/serviceAccounts"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_ServiceAccountService_CreateServiceAccount_1(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_ServiceAccountService_CreateServiceAccount_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodGet, pattern_ServiceAccountService_GetServiceAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.ServiceAccountService/GetServiceAccount", runtime.WithHTTPPathPattern("/v1/{name=serviceAccounts/*}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_ServiceAccountService_GetServiceAccount_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_ServiceAccountService_GetServiceAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodGet, pattern_ServiceAccountService_ListServiceAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.ServiceAccountService/ListServiceAccounts", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/serviceAccounts"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_ServiceAccountService_ListServiceAccounts_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_ServiceAccountService_ListServiceAccounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodGet, pattern_ServiceAccountService_ListServiceAccounts_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.ServiceAccountService/ListServiceAccounts", runtime.WithHTTPPathPattern("/v1/serviceAccounts"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_ServiceAccountService_ListServiceAccounts_1(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_ServiceAccountService_ListServiceAccounts_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodPatch, pattern_ServiceAccountService_UpdateServiceAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.ServiceAccountService/UpdateServiceAccount", runtime.WithHTTPPathPattern("/v1/{service_account.name=serviceAccounts/*}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_ServiceAccountService_UpdateServiceAccount_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_ServiceAccountService_UpdateServiceAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodDelete, pattern_ServiceAccountService_DeleteServiceAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.ServiceAccountService/DeleteServiceAccount", runtime.WithHTTPPathPattern("/v1/{name=serviceAccounts/*}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_ServiceAccountService_DeleteServiceAccount_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_ServiceAccountService_DeleteServiceAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodPost, pattern_ServiceAccountService_UndeleteServiceAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.ServiceAccountService/UndeleteServiceAccount", runtime.WithHTTPPathPattern("/v1/{name=serviceAccounts/*}:undelete"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_ServiceAccountService_UndeleteServiceAccount_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_ServiceAccountService_UndeleteServiceAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })++ return nil+}++// RegisterServiceAccountServiceHandlerFromEndpoint is same as RegisterServiceAccountServiceHandler but+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.+func RegisterServiceAccountServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {+ conn, err := grpc.NewClient(endpoint, opts...)+ if err != nil {+ return err+ }+ defer func() {+ if err != nil {+ if cerr := conn.Close(); cerr != nil {+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)+ }+ return+ }+ go func() {+ <-ctx.Done()+ if cerr := conn.Close(); cerr != nil {+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)+ }+ }()+ }()+ return RegisterServiceAccountServiceHandler(ctx, mux, conn)+}++// RegisterServiceAccountServiceHandler registers the http handlers for service ServiceAccountService to "mux".+// The handlers forward requests to the grpc endpoint over "conn".+func RegisterServiceAccountServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {+ return RegisterServiceAccountServiceHandlerClient(ctx, mux, NewServiceAccountServiceClient(conn))+}++// RegisterServiceAccountServiceHandlerClient registers the http handlers for service ServiceAccountService+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServiceAccountServiceClient".+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServiceAccountServiceClient"+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in+// "ServiceAccountServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.+func RegisterServiceAccountServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceAccountServiceClient) error {+ mux.Handle(http.MethodPost, pattern_ServiceAccountService_CreateServiceAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.ServiceAccountService/CreateServiceAccount", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/serviceAccounts"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_ServiceAccountService_CreateServiceAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_ServiceAccountService_CreateServiceAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodPost, pattern_ServiceAccountService_CreateServiceAccount_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.ServiceAccountService/CreateServiceAccount", runtime.WithHTTPPathPattern("/v1/serviceAccounts"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_ServiceAccountService_CreateServiceAccount_1(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_ServiceAccountService_CreateServiceAccount_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodGet, pattern_ServiceAccountService_GetServiceAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.ServiceAccountService/GetServiceAccount", runtime.WithHTTPPathPattern("/v1/{name=serviceAccounts/*}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_ServiceAccountService_GetServiceAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_ServiceAccountService_GetServiceAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodGet, pattern_ServiceAccountService_ListServiceAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.ServiceAccountService/ListServiceAccounts", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/serviceAccounts"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_ServiceAccountService_ListServiceAccounts_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_ServiceAccountService_ListServiceAccounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodGet, pattern_ServiceAccountService_ListServiceAccounts_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.ServiceAccountService/ListServiceAccounts", runtime.WithHTTPPathPattern("/v1/serviceAccounts"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_ServiceAccountService_ListServiceAccounts_1(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_ServiceAccountService_ListServiceAccounts_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodPatch, pattern_ServiceAccountService_UpdateServiceAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.ServiceAccountService/UpdateServiceAccount", runtime.WithHTTPPathPattern("/v1/{service_account.name=serviceAccounts/*}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_ServiceAccountService_UpdateServiceAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_ServiceAccountService_UpdateServiceAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodDelete, pattern_ServiceAccountService_DeleteServiceAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.ServiceAccountService/DeleteServiceAccount", runtime.WithHTTPPathPattern("/v1/{name=serviceAccounts/*}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_ServiceAccountService_DeleteServiceAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_ServiceAccountService_DeleteServiceAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodPost, pattern_ServiceAccountService_UndeleteServiceAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.ServiceAccountService/UndeleteServiceAccount", runtime.WithHTTPPathPattern("/v1/{name=serviceAccounts/*}:undelete"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_ServiceAccountService_UndeleteServiceAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_ServiceAccountService_UndeleteServiceAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ return nil+}++var (+ pattern_ServiceAccountService_CreateServiceAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "serviceAccounts"}, ""))+ pattern_ServiceAccountService_CreateServiceAccount_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "serviceAccounts"}, ""))+ pattern_ServiceAccountService_GetServiceAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "serviceAccounts", "name"}, ""))+ pattern_ServiceAccountService_ListServiceAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "serviceAccounts"}, ""))+ pattern_ServiceAccountService_ListServiceAccounts_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "serviceAccounts"}, ""))+ pattern_ServiceAccountService_UpdateServiceAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "serviceAccounts", "service_account.name"}, ""))+ pattern_ServiceAccountService_DeleteServiceAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "serviceAccounts", "name"}, ""))+ pattern_ServiceAccountService_UndeleteServiceAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "serviceAccounts", "name"}, "undelete"))+)++var (+ forward_ServiceAccountService_CreateServiceAccount_0 = runtime.ForwardResponseMessage+ forward_ServiceAccountService_CreateServiceAccount_1 = runtime.ForwardResponseMessage+ forward_ServiceAccountService_GetServiceAccount_0 = runtime.ForwardResponseMessage+ forward_ServiceAccountService_ListServiceAccounts_0 = runtime.ForwardResponseMessage+ forward_ServiceAccountService_ListServiceAccounts_1 = runtime.ForwardResponseMessage+ forward_ServiceAccountService_UpdateServiceAccount_0 = runtime.ForwardResponseMessage+ forward_ServiceAccountService_DeleteServiceAccount_0 = runtime.ForwardResponseMessage+ forward_ServiceAccountService_UndeleteServiceAccount_0 = runtime.ForwardResponseMessage+)diff --git a/backend/generated-go/v1/service_account_service_equal.pb.go b/backend/generated-go/v1/service_account_service_equal.pb.gonew file mode 100644index 0000000000..b8724f1202--- /dev/null+++ b/backend/generated-go/v1/service_account_service_equal.pb.go@@ -0,0 +1,158 @@+// Code generated by protoc-gen-equal-go. DO NOT EDIT.+// source: v1/service_account_service.proto++package v1++import (+ proto "google.golang.org/protobuf/proto"+ fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"+)++func (x *ServiceAccount) Equal(y *ServiceAccount) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Name != y.Name {+ return false+ }+ if x.State != y.State {+ return false+ }+ if x.Email != y.Email {+ return false+ }+ if x.Title != y.Title {+ return false+ }+ if x.ServiceKey != y.ServiceKey {+ return false+ }+ if p, q := x.CreateTime, y.CreateTime; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) {+ return false+ }+ return true+}++func (x *CreateServiceAccountRequest) Equal(y *CreateServiceAccountRequest) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Parent != y.Parent {+ return false+ }+ if x.ServiceAccountId != y.ServiceAccountId {+ return false+ }+ if !x.ServiceAccount.Equal(y.ServiceAccount) {+ return false+ }+ return true+}++func (x *GetServiceAccountRequest) Equal(y *GetServiceAccountRequest) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Name != y.Name {+ return false+ }+ return true+}++func (x *ListServiceAccountsRequest) Equal(y *ListServiceAccountsRequest) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Parent != y.Parent {+ return false+ }+ if x.PageSize != y.PageSize {+ return false+ }+ if x.PageToken != y.PageToken {+ return false+ }+ if x.ShowDeleted != y.ShowDeleted {+ return false+ }+ return true+}++func (x *ListServiceAccountsResponse) Equal(y *ListServiceAccountsResponse) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if len(x.ServiceAccounts) != len(y.ServiceAccounts) {+ return false+ }+ for i := 0; i < len(x.ServiceAccounts); i++ {+ if !x.ServiceAccounts[i].Equal(y.ServiceAccounts[i]) {+ return false+ }+ }+ if x.NextPageToken != y.NextPageToken {+ return false+ }+ return true+}++func (x *UpdateServiceAccountRequest) Equal(y *UpdateServiceAccountRequest) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if !x.ServiceAccount.Equal(y.ServiceAccount) {+ return false+ }+ if equal, ok := interface{}(x.UpdateMask).(interface {+ Equal(*fieldmaskpb.FieldMask) bool+ }); !ok || !equal.Equal(y.UpdateMask) {+ return false+ } else if !proto.Equal(x.UpdateMask, y.UpdateMask) {+ return false+ }+ return true+}++func (x *DeleteServiceAccountRequest) Equal(y *DeleteServiceAccountRequest) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Name != y.Name {+ return false+ }+ return true+}++func (x *UndeleteServiceAccountRequest) Equal(y *UndeleteServiceAccountRequest) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Name != y.Name {+ return false+ }+ return true+}diff --git a/backend/generated-go/v1/service_account_service_grpc.pb.go b/backend/generated-go/v1/service_account_service_grpc.pb.gonew file mode 100644index 0000000000..bbae41e49a--- /dev/null+++ b/backend/generated-go/v1/service_account_service_grpc.pb.go@@ -0,0 +1,344 @@+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.+// versions:+// - protoc-gen-go-grpc v1.6.0+// - protoc (unknown)+// source: v1/service_account_service.proto++package v1++import (+ context "context"+ grpc "google.golang.org/grpc"+ codes "google.golang.org/grpc/codes"+ status "google.golang.org/grpc/status"+ emptypb "google.golang.org/protobuf/types/known/emptypb"+)++// This is a compile-time assertion to ensure that this generated file+// is compatible with the grpc package it is being compiled against.+// Requires gRPC-Go v1.64.0 or later.+const _ = grpc.SupportPackageIsVersion9++const (+ ServiceAccountService_CreateServiceAccount_FullMethodName = "/bytebase.v1.ServiceAccountService/CreateServiceAccount"+ ServiceAccountService_GetServiceAccount_FullMethodName = "/bytebase.v1.ServiceAccountService/GetServiceAccount"+ ServiceAccountService_ListServiceAccounts_FullMethodName = "/bytebase.v1.ServiceAccountService/ListServiceAccounts"+ ServiceAccountService_UpdateServiceAccount_FullMethodName = "/bytebase.v1.ServiceAccountService/UpdateServiceAccount"+ ServiceAccountService_DeleteServiceAccount_FullMethodName = "/bytebase.v1.ServiceAccountService/DeleteServiceAccount"+ ServiceAccountService_UndeleteServiceAccount_FullMethodName = "/bytebase.v1.ServiceAccountService/UndeleteServiceAccount"+)++// ServiceAccountServiceClient is the client API for ServiceAccountService service.+//+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.+//+// ServiceAccountService manages service accounts for API integrations.+type ServiceAccountServiceClient interface {+ // Creates a new service account.+ // For workspace-level: parent is empty, permission bb.serviceAccounts.create on workspace.+ // For project-level: parent is projects/{project}, permission bb.serviceAccounts.create on project.+ CreateServiceAccount(ctx context.Context, in *CreateServiceAccountRequest, opts ...grpc.CallOption) (*ServiceAccount, error)+ // Gets a service account by name.+ // Permissions required: bb.serviceAccounts.get+ GetServiceAccount(ctx context.Context, in *GetServiceAccountRequest, opts ...grpc.CallOption) (*ServiceAccount, error)+ // Lists service accounts.+ // For workspace-level: parent is empty, permission bb.serviceAccounts.list on workspace.+ // For project-level: parent is projects/{project}, permission bb.serviceAccounts.list on project.+ ListServiceAccounts(ctx context.Context, in *ListServiceAccountsRequest, opts ...grpc.CallOption) (*ListServiceAccountsResponse, error)+ // Updates a service account.+ // Permissions required: bb.serviceAccounts.update+ UpdateServiceAccount(ctx context.Context, in *UpdateServiceAccountRequest, opts ...grpc.CallOption) (*ServiceAccount, error)+ // Deletes a service account.+ // Permissions required: bb.serviceAccounts.delete+ DeleteServiceAccount(ctx context.Context, in *DeleteServiceAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)+ // Restores a deleted service account.+ // Permissions required: bb.serviceAccounts.undelete+ UndeleteServiceAccount(ctx context.Context, in *UndeleteServiceAccountRequest, opts ...grpc.CallOption) (*ServiceAccount, error)+}++type serviceAccountServiceClient struct {+ cc grpc.ClientConnInterface+}++func NewServiceAccountServiceClient(cc grpc.ClientConnInterface) ServiceAccountServiceClient {+ return &serviceAccountServiceClient{cc}+}++func (c *serviceAccountServiceClient) CreateServiceAccount(ctx context.Context, in *CreateServiceAccountRequest, opts ...grpc.CallOption) (*ServiceAccount, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(ServiceAccount)+ err := c.cc.Invoke(ctx, ServiceAccountService_CreateServiceAccount_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *serviceAccountServiceClient) GetServiceAccount(ctx context.Context, in *GetServiceAccountRequest, opts ...grpc.CallOption) (*ServiceAccount, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(ServiceAccount)+ err := c.cc.Invoke(ctx, ServiceAccountService_GetServiceAccount_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *serviceAccountServiceClient) ListServiceAccounts(ctx context.Context, in *ListServiceAccountsRequest, opts ...grpc.CallOption) (*ListServiceAccountsResponse, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(ListServiceAccountsResponse)+ err := c.cc.Invoke(ctx, ServiceAccountService_ListServiceAccounts_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *serviceAccountServiceClient) UpdateServiceAccount(ctx context.Context, in *UpdateServiceAccountRequest, opts ...grpc.CallOption) (*ServiceAccount, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(ServiceAccount)+ err := c.cc.Invoke(ctx, ServiceAccountService_UpdateServiceAccount_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *serviceAccountServiceClient) DeleteServiceAccount(ctx context.Context, in *DeleteServiceAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(emptypb.Empty)+ err := c.cc.Invoke(ctx, ServiceAccountService_DeleteServiceAccount_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *serviceAccountServiceClient) UndeleteServiceAccount(ctx context.Context, in *UndeleteServiceAccountRequest, opts ...grpc.CallOption) (*ServiceAccount, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(ServiceAccount)+ err := c.cc.Invoke(ctx, ServiceAccountService_UndeleteServiceAccount_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++// ServiceAccountServiceServer is the server API for ServiceAccountService service.+// All implementations must embed UnimplementedServiceAccountServiceServer+// for forward compatibility.+//+// ServiceAccountService manages service accounts for API integrations.+type ServiceAccountServiceServer interface {+ // Creates a new service account.+ // For workspace-level: parent is empty, permission bb.serviceAccounts.create on workspace.+ // For project-level: parent is projects/{project}, permission bb.serviceAccounts.create on project.+ CreateServiceAccount(context.Context, *CreateServiceAccountRequest) (*ServiceAccount, error)+ // Gets a service account by name.+ // Permissions required: bb.serviceAccounts.get+ GetServiceAccount(context.Context, *GetServiceAccountRequest) (*ServiceAccount, error)+ // Lists service accounts.+ // For workspace-level: parent is empty, permission bb.serviceAccounts.list on workspace.+ // For project-level: parent is projects/{project}, permission bb.serviceAccounts.list on project.+ ListServiceAccounts(context.Context, *ListServiceAccountsRequest) (*ListServiceAccountsResponse, error)+ // Updates a service account.+ // Permissions required: bb.serviceAccounts.update+ UpdateServiceAccount(context.Context, *UpdateServiceAccountRequest) (*ServiceAccount, error)+ // Deletes a service account.+ // Permissions required: bb.serviceAccounts.delete+ DeleteServiceAccount(context.Context, *DeleteServiceAccountRequest) (*emptypb.Empty, error)+ // Restores a deleted service account.+ // Permissions required: bb.serviceAccounts.undelete+ UndeleteServiceAccount(context.Context, *UndeleteServiceAccountRequest) (*ServiceAccount, error)+ mustEmbedUnimplementedServiceAccountServiceServer()+}++// UnimplementedServiceAccountServiceServer must be embedded to have+// forward compatible implementations.+//+// NOTE: this should be embedded by value instead of pointer to avoid a nil+// pointer dereference when methods are called.+type UnimplementedServiceAccountServiceServer struct{}++func (UnimplementedServiceAccountServiceServer) CreateServiceAccount(context.Context, *CreateServiceAccountRequest) (*ServiceAccount, error) {+ return nil, status.Error(codes.Unimplemented, "method CreateServiceAccount not implemented")+}+func (UnimplementedServiceAccountServiceServer) GetServiceAccount(context.Context, *GetServiceAccountRequest) (*ServiceAccount, error) {+ return nil, status.Error(codes.Unimplemented, "method GetServiceAccount not implemented")+}+func (UnimplementedServiceAccountServiceServer) ListServiceAccounts(context.Context, *ListServiceAccountsRequest) (*ListServiceAccountsResponse, error) {+ return nil, status.Error(codes.Unimplemented, "method ListServiceAccounts not implemented")+}+func (UnimplementedServiceAccountServiceServer) UpdateServiceAccount(context.Context, *UpdateServiceAccountRequest) (*ServiceAccount, error) {+ return nil, status.Error(codes.Unimplemented, "method UpdateServiceAccount not implemented")+}+func (UnimplementedServiceAccountServiceServer) DeleteServiceAccount(context.Context, *DeleteServiceAccountRequest) (*emptypb.Empty, error) {+ return nil, status.Error(codes.Unimplemented, "method DeleteServiceAccount not implemented")+}+func (UnimplementedServiceAccountServiceServer) UndeleteServiceAccount(context.Context, *UndeleteServiceAccountRequest) (*ServiceAccount, error) {+ return nil, status.Error(codes.Unimplemented, "method UndeleteServiceAccount not implemented")+}+func (UnimplementedServiceAccountServiceServer) mustEmbedUnimplementedServiceAccountServiceServer() {}+func (UnimplementedServiceAccountServiceServer) testEmbeddedByValue() {}++// UnsafeServiceAccountServiceServer may be embedded to opt out of forward compatibility for this service.+// Use of this interface is not recommended, as added methods to ServiceAccountServiceServer will+// result in compilation errors.+type UnsafeServiceAccountServiceServer interface {+ mustEmbedUnimplementedServiceAccountServiceServer()+}++func RegisterServiceAccountServiceServer(s grpc.ServiceRegistrar, srv ServiceAccountServiceServer) {+ // If the following call panics, it indicates UnimplementedServiceAccountServiceServer was+ // embedded by pointer and is nil. This will cause panics if an+ // unimplemented method is ever invoked, so we test this at initialization+ // time to prevent it from happening at runtime later due to I/O.+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {+ t.testEmbeddedByValue()+ }+ s.RegisterService(&ServiceAccountService_ServiceDesc, srv)+}++func _ServiceAccountService_CreateServiceAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(CreateServiceAccountRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(ServiceAccountServiceServer).CreateServiceAccount(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: ServiceAccountService_CreateServiceAccount_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(ServiceAccountServiceServer).CreateServiceAccount(ctx, req.(*CreateServiceAccountRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _ServiceAccountService_GetServiceAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(GetServiceAccountRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(ServiceAccountServiceServer).GetServiceAccount(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: ServiceAccountService_GetServiceAccount_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(ServiceAccountServiceServer).GetServiceAccount(ctx, req.(*GetServiceAccountRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _ServiceAccountService_ListServiceAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(ListServiceAccountsRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(ServiceAccountServiceServer).ListServiceAccounts(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: ServiceAccountService_ListServiceAccounts_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(ServiceAccountServiceServer).ListServiceAccounts(ctx, req.(*ListServiceAccountsRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _ServiceAccountService_UpdateServiceAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(UpdateServiceAccountRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(ServiceAccountServiceServer).UpdateServiceAccount(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: ServiceAccountService_UpdateServiceAccount_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(ServiceAccountServiceServer).UpdateServiceAccount(ctx, req.(*UpdateServiceAccountRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _ServiceAccountService_DeleteServiceAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(DeleteServiceAccountRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(ServiceAccountServiceServer).DeleteServiceAccount(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: ServiceAccountService_DeleteServiceAccount_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(ServiceAccountServiceServer).DeleteServiceAccount(ctx, req.(*DeleteServiceAccountRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _ServiceAccountService_UndeleteServiceAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(UndeleteServiceAccountRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(ServiceAccountServiceServer).UndeleteServiceAccount(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: ServiceAccountService_UndeleteServiceAccount_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(ServiceAccountServiceServer).UndeleteServiceAccount(ctx, req.(*UndeleteServiceAccountRequest))+ }+ return interceptor(ctx, in, info, handler)+}++// ServiceAccountService_ServiceDesc is the grpc.ServiceDesc for ServiceAccountService service.+// It's only intended for direct use with grpc.RegisterService,+// and not to be introspected or modified (even as a copy)+var ServiceAccountService_ServiceDesc = grpc.ServiceDesc{+ ServiceName: "bytebase.v1.ServiceAccountService",+ HandlerType: (*ServiceAccountServiceServer)(nil),+ Methods: []grpc.MethodDesc{+ {+ MethodName: "CreateServiceAccount",+ Handler: _ServiceAccountService_CreateServiceAccount_Handler,+ },+ {+ MethodName: "GetServiceAccount",+ Handler: _ServiceAccountService_GetServiceAccount_Handler,+ },+ {+ MethodName: "ListServiceAccounts",+ Handler: _ServiceAccountService_ListServiceAccounts_Handler,+ },+ {+ MethodName: "UpdateServiceAccount",+ Handler: _ServiceAccountService_UpdateServiceAccount_Handler,+ },+ {+ MethodName: "DeleteServiceAccount",+ Handler: _ServiceAccountService_DeleteServiceAccount_Handler,+ },+ {+ MethodName: "UndeleteServiceAccount",+ Handler: _ServiceAccountService_UndeleteServiceAccount_Handler,+ },+ },+ Streams: []grpc.StreamDesc{},+ Metadata: "v1/service_account_service.proto",+}diff --git a/backend/generated-go/v1/v1connect/service_account_service.connect.go b/backend/generated-go/v1/v1connect/service_account_service.connect.gonew file mode 100644index 0000000000..47f989bfe5--- /dev/null+++ b/backend/generated-go/v1/v1connect/service_account_service.connect.go@@ -0,0 +1,284 @@+// Code generated by protoc-gen-connect-go. DO NOT EDIT.+//+// Source: v1/service_account_service.proto++package v1connect++import (+ connect "connectrpc.com/connect"+ context "context"+ errors "errors"+ v1 "github.com/bytebase/bytebase/backend/generated-go/v1"+ emptypb "google.golang.org/protobuf/types/known/emptypb"+ http "net/http"+ strings "strings"+)++// This is a compile-time assertion to ensure that this generated file and the connect package are+// compatible. If you get a compiler error that this constant is not defined, this code was+// generated with a version of connect newer than the one compiled into your binary. You can fix the+// problem by either regenerating this code with an older version of connect or updating the connect+// version compiled into your binary.+const _ = connect.IsAtLeastVersion1_13_0++const (+ // ServiceAccountServiceName is the fully-qualified name of the ServiceAccountService service.+ ServiceAccountServiceName = "bytebase.v1.ServiceAccountService"+)++// These constants are the fully-qualified names of the RPCs defined in this package. They're+// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.+//+// Note that these are different from the fully-qualified method names used by+// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to+// reflection-formatted method names, remove the leading slash and convert the remaining slash to a+// period.+const (+ // ServiceAccountServiceCreateServiceAccountProcedure is the fully-qualified name of the+ // ServiceAccountService's CreateServiceAccount RPC.+ ServiceAccountServiceCreateServiceAccountProcedure = "/bytebase.v1.ServiceAccountService/CreateServiceAccount"+ // ServiceAccountServiceGetServiceAccountProcedure is the fully-qualified name of the+ // ServiceAccountService's GetServiceAccount RPC.+ ServiceAccountServiceGetServiceAccountProcedure = "/bytebase.v1.ServiceAccountService/GetServiceAccount"+ // ServiceAccountServiceListServiceAccountsProcedure is the fully-qualified name of the+ // ServiceAccountService's ListServiceAccounts RPC.+ ServiceAccountServiceListServiceAccountsProcedure = "/bytebase.v1.ServiceAccountService/ListServiceAccounts"+ // ServiceAccountServiceUpdateServiceAccountProcedure is the fully-qualified name of the+ // ServiceAccountService's UpdateServiceAccount RPC.+ ServiceAccountServiceUpdateServiceAccountProcedure = "/bytebase.v1.ServiceAccountService/UpdateServiceAccount"+ // ServiceAccountServiceDeleteServiceAccountProcedure is the fully-qualified name of the+ // ServiceAccountService's DeleteServiceAccount RPC.+ ServiceAccountServiceDeleteServiceAccountProcedure = "/bytebase.v1.ServiceAccountService/DeleteServiceAccount"+ // ServiceAccountServiceUndeleteServiceAccountProcedure is the fully-qualified name of the+ // ServiceAccountService's UndeleteServiceAccount RPC.+ ServiceAccountServiceUndeleteServiceAccountProcedure = "/bytebase.v1.ServiceAccountService/UndeleteServiceAccount"+)++// ServiceAccountServiceClient is a client for the bytebase.v1.ServiceAccountService service.+type ServiceAccountServiceClient interface {+ // Creates a new service account.+ // For workspace-level: parent is empty, permission bb.serviceAccounts.create on workspace.+ // For project-level: parent is projects/{project}, permission bb.serviceAccounts.create on project.+ CreateServiceAccount(context.Context, *connect.Request[v1.CreateServiceAccountRequest]) (*connect.Response[v1.ServiceAccount], error)+ // Gets a service account by name.+ // Permissions required: bb.serviceAccounts.get+ GetServiceAccount(context.Context, *connect.Request[v1.GetServiceAccountRequest]) (*connect.Response[v1.ServiceAccount], error)+ // Lists service accounts.+ // For workspace-level: parent is empty, permission bb.serviceAccounts.list on workspace.+ // For project-level: parent is projects/{project}, permission bb.serviceAccounts.list on project.+ ListServiceAccounts(context.Context, *connect.Request[v1.ListServiceAccountsRequest]) (*connect.Response[v1.ListServiceAccountsResponse], error)+ // Updates a service account.+ // Permissions required: bb.serviceAccounts.update+ UpdateServiceAccount(context.Context, *connect.Request[v1.UpdateServiceAccountRequest]) (*connect.Response[v1.ServiceAccount], error)+ // Deletes a service account.+ // Permissions required: bb.serviceAccounts.delete+ DeleteServiceAccount(context.Context, *connect.Request[v1.DeleteServiceAccountRequest]) (*connect.Response[emptypb.Empty], error)+ // Restores a deleted service account.+ // Permissions required: bb.serviceAccounts.undelete+ UndeleteServiceAccount(context.Context, *connect.Request[v1.UndeleteServiceAccountRequest]) (*connect.Response[v1.ServiceAccount], error)+}++// NewServiceAccountServiceClient constructs a client for the bytebase.v1.ServiceAccountService+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply+// the connect.WithGRPC() or connect.WithGRPCWeb() options.+//+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,+// http://api.acme.com or https://acme.com/grpc).+func NewServiceAccountServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ServiceAccountServiceClient {+ baseURL = strings.TrimRight(baseURL, "/")+ serviceAccountServiceMethods := v1.File_v1_service_account_service_proto.Services().ByName("ServiceAccountService").Methods()+ return &serviceAccountServiceClient{+ createServiceAccount: connect.NewClient[v1.CreateServiceAccountRequest, v1.ServiceAccount](+ httpClient,+ baseURL+ServiceAccountServiceCreateServiceAccountProcedure,+ connect.WithSchema(serviceAccountServiceMethods.ByName("CreateServiceAccount")),+ connect.WithClientOptions(opts...),+ ),+ getServiceAccount: connect.NewClient[v1.GetServiceAccountRequest, v1.ServiceAccount](+ httpClient,+ baseURL+ServiceAccountServiceGetServiceAccountProcedure,+ connect.WithSchema(serviceAccountServiceMethods.ByName("GetServiceAccount")),+ connect.WithClientOptions(opts...),+ ),+ listServiceAccounts: connect.NewClient[v1.ListServiceAccountsRequest, v1.ListServiceAccountsResponse](+ httpClient,+ baseURL+ServiceAccountServiceListServiceAccountsProcedure,+ connect.WithSchema(serviceAccountServiceMethods.ByName("ListServiceAccounts")),+ connect.WithClientOptions(opts...),+ ),+ updateServiceAccount: connect.NewClient[v1.UpdateServiceAccountRequest, v1.ServiceAccount](+ httpClient,+ baseURL+ServiceAccountServiceUpdateServiceAccountProcedure,+ connect.WithSchema(serviceAccountServiceMethods.ByName("UpdateServiceAccount")),+ connect.WithClientOptions(opts...),+ ),+ deleteServiceAccount: connect.NewClient[v1.DeleteServiceAccountRequest, emptypb.Empty](+ httpClient,+ baseURL+ServiceAccountServiceDeleteServiceAccountProcedure,+ connect.WithSchema(serviceAccountServiceMethods.ByName("DeleteServiceAccount")),+ connect.WithClientOptions(opts...),+ ),+ undeleteServiceAccount: connect.NewClient[v1.UndeleteServiceAccountRequest, v1.ServiceAccount](+ httpClient,+ baseURL+ServiceAccountServiceUndeleteServiceAccountProcedure,+ connect.WithSchema(serviceAccountServiceMethods.ByName("UndeleteServiceAccount")),+ connect.WithClientOptions(opts...),+ ),+ }+}++// serviceAccountServiceClient implements ServiceAccountServiceClient.+type serviceAccountServiceClient struct {+ createServiceAccount *connect.Client[v1.CreateServiceAccountRequest, v1.ServiceAccount]+ getServiceAccount *connect.Client[v1.GetServiceAccountRequest, v1.ServiceAccount]+ listServiceAccounts *connect.Client[v1.ListServiceAccountsRequest, v1.ListServiceAccountsResponse]+ updateServiceAccount *connect.Client[v1.UpdateServiceAccountRequest, v1.ServiceAccount]+ deleteServiceAccount *connect.Client[v1.DeleteServiceAccountRequest, emptypb.Empty]+ undeleteServiceAccount *connect.Client[v1.UndeleteServiceAccountRequest, v1.ServiceAccount]+}++// CreateServiceAccount calls bytebase.v1.ServiceAccountService.CreateServiceAccount.+func (c *serviceAccountServiceClient) CreateServiceAccount(ctx context.Context, req *connect.Request[v1.CreateServiceAccountRequest]) (*connect.Response[v1.ServiceAccount], error) {+ return c.createServiceAccount.CallUnary(ctx, req)+}++// GetServiceAccount calls bytebase.v1.ServiceAccountService.GetServiceAccount.+func (c *serviceAccountServiceClient) GetServiceAccount(ctx context.Context, req *connect.Request[v1.GetServiceAccountRequest]) (*connect.Response[v1.ServiceAccount], error) {+ return c.getServiceAccount.CallUnary(ctx, req)+}++// ListServiceAccounts calls bytebase.v1.ServiceAccountService.ListServiceAccounts.+func (c *serviceAccountServiceClient) ListServiceAccounts(ctx context.Context, req *connect.Request[v1.ListServiceAccountsRequest]) (*connect.Response[v1.ListServiceAccountsResponse], error) {+ return c.listServiceAccounts.CallUnary(ctx, req)+}++// UpdateServiceAccount calls bytebase.v1.ServiceAccountService.UpdateServiceAccount.+func (c *serviceAccountServiceClient) UpdateServiceAccount(ctx context.Context, req *connect.Request[v1.UpdateServiceAccountRequest]) (*connect.Response[v1.ServiceAccount], error) {+ return c.updateServiceAccount.CallUnary(ctx, req)+}++// DeleteServiceAccount calls bytebase.v1.ServiceAccountService.DeleteServiceAccount.+func (c *serviceAccountServiceClient) DeleteServiceAccount(ctx context.Context, req *connect.Request[v1.DeleteServiceAccountRequest]) (*connect.Response[emptypb.Empty], error) {+ return c.deleteServiceAccount.CallUnary(ctx, req)+}++// UndeleteServiceAccount calls bytebase.v1.ServiceAccountService.UndeleteServiceAccount.+func (c *serviceAccountServiceClient) UndeleteServiceAccount(ctx context.Context, req *connect.Request[v1.UndeleteServiceAccountRequest]) (*connect.Response[v1.ServiceAccount], error) {+ return c.undeleteServiceAccount.CallUnary(ctx, req)+}++// ServiceAccountServiceHandler is an implementation of the bytebase.v1.ServiceAccountService+// service.+type ServiceAccountServiceHandler interface {+ // Creates a new service account.+ // For workspace-level: parent is empty, permission bb.serviceAccounts.create on workspace.+ // For project-level: parent is projects/{project}, permission bb.serviceAccounts.create on project.+ CreateServiceAccount(context.Context, *connect.Request[v1.CreateServiceAccountRequest]) (*connect.Response[v1.ServiceAccount], error)+ // Gets a service account by name.+ // Permissions required: bb.serviceAccounts.get+ GetServiceAccount(context.Context, *connect.Request[v1.GetServiceAccountRequest]) (*connect.Response[v1.ServiceAccount], error)+ // Lists service accounts.+ // For workspace-level: parent is empty, permission bb.serviceAccounts.list on workspace.+ // For project-level: parent is projects/{project}, permission bb.serviceAccounts.list on project.+ ListServiceAccounts(context.Context, *connect.Request[v1.ListServiceAccountsRequest]) (*connect.Response[v1.ListServiceAccountsResponse], error)+ // Updates a service account.+ // Permissions required: bb.serviceAccounts.update+ UpdateServiceAccount(context.Context, *connect.Request[v1.UpdateServiceAccountRequest]) (*connect.Response[v1.ServiceAccount], error)+ // Deletes a service account.+ // Permissions required: bb.serviceAccounts.delete+ DeleteServiceAccount(context.Context, *connect.Request[v1.DeleteServiceAccountRequest]) (*connect.Response[emptypb.Empty], error)+ // Restores a deleted service account.+ // Permissions required: bb.serviceAccounts.undelete+ UndeleteServiceAccount(context.Context, *connect.Request[v1.UndeleteServiceAccountRequest]) (*connect.Response[v1.ServiceAccount], error)+}++// NewServiceAccountServiceHandler builds an HTTP handler from the service implementation. It+// returns the path on which to mount the handler and the handler itself.+//+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf+// and JSON codecs. They also support gzip compression.+func NewServiceAccountServiceHandler(svc ServiceAccountServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {+ serviceAccountServiceMethods := v1.File_v1_service_account_service_proto.Services().ByName("ServiceAccountService").Methods()+ serviceAccountServiceCreateServiceAccountHandler := connect.NewUnaryHandler(+ ServiceAccountServiceCreateServiceAccountProcedure,+ svc.CreateServiceAccount,+ connect.WithSchema(serviceAccountServiceMethods.ByName("CreateServiceAccount")),+ connect.WithHandlerOptions(opts...),+ )+ serviceAccountServiceGetServiceAccountHandler := connect.NewUnaryHandler(+ ServiceAccountServiceGetServiceAccountProcedure,+ svc.GetServiceAccount,+ connect.WithSchema(serviceAccountServiceMethods.ByName("GetServiceAccount")),+ connect.WithHandlerOptions(opts...),+ )+ serviceAccountServiceListServiceAccountsHandler := connect.NewUnaryHandler(+ ServiceAccountServiceListServiceAccountsProcedure,+ svc.ListServiceAccounts,+ connect.WithSchema(serviceAccountServiceMethods.ByName("ListServiceAccounts")),+ connect.WithHandlerOptions(opts...),+ )+ serviceAccountServiceUpdateServiceAccountHandler := connect.NewUnaryHandler(+ ServiceAccountServiceUpdateServiceAccountProcedure,+ svc.UpdateServiceAccount,+ connect.WithSchema(serviceAccountServiceMethods.ByName("UpdateServiceAccount")),+ connect.WithHandlerOptions(opts...),+ )+ serviceAccountServiceDeleteServiceAccountHandler := connect.NewUnaryHandler(+ ServiceAccountServiceDeleteServiceAccountProcedure,+ svc.DeleteServiceAccount,+ connect.WithSchema(serviceAccountServiceMethods.ByName("DeleteServiceAccount")),+ connect.WithHandlerOptions(opts...),+ )+ serviceAccountServiceUndeleteServiceAccountHandler := connect.NewUnaryHandler(+ ServiceAccountServiceUndeleteServiceAccountProcedure,+ svc.UndeleteServiceAccount,+ connect.WithSchema(serviceAccountServiceMethods.ByName("UndeleteServiceAccount")),+ connect.WithHandlerOptions(opts...),+ )+ return "/bytebase.v1.ServiceAccountService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {+ switch r.URL.Path {+ case ServiceAccountServiceCreateServiceAccountProcedure:+ serviceAccountServiceCreateServiceAccountHandler.ServeHTTP(w, r)+ case ServiceAccountServiceGetServiceAccountProcedure:+ serviceAccountServiceGetServiceAccountHandler.ServeHTTP(w, r)+ case ServiceAccountServiceListServiceAccountsProcedure:+ serviceAccountServiceListServiceAccountsHandler.ServeHTTP(w, r)+ case ServiceAccountServiceUpdateServiceAccountProcedure:+ serviceAccountServiceUpdateServiceAccountHandler.ServeHTTP(w, r)+ case ServiceAccountServiceDeleteServiceAccountProcedure:+ serviceAccountServiceDeleteServiceAccountHandler.ServeHTTP(w, r)+ case ServiceAccountServiceUndeleteServiceAccountProcedure:+ serviceAccountServiceUndeleteServiceAccountHandler.ServeHTTP(w, r)+ default:+ http.NotFound(w, r)+ }+ })+}++// UnimplementedServiceAccountServiceHandler returns CodeUnimplemented from all methods.+type UnimplementedServiceAccountServiceHandler struct{}++func (UnimplementedServiceAccountServiceHandler) CreateServiceAccount(context.Context, *connect.Request[v1.CreateServiceAccountRequest]) (*connect.Response[v1.ServiceAccount], error) {+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.ServiceAccountService.CreateServiceAccount is not implemented"))+}++func (UnimplementedServiceAccountServiceHandler) GetServiceAccount(context.Context, *connect.Request[v1.GetServiceAccountRequest]) (*connect.Response[v1.ServiceAccount], error) {+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.ServiceAccountService.GetServiceAccount is not implemented"))+}++func (UnimplementedServiceAccountServiceHandler) ListServiceAccounts(context.Context, *connect.Request[v1.ListServiceAccountsRequest]) (*connect.Response[v1.ListServiceAccountsResponse], error) {+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.ServiceAccountService.ListServiceAccounts is not implemented"))+}++func (UnimplementedServiceAccountServiceHandler) UpdateServiceAccount(context.Context, *connect.Request[v1.UpdateServiceAccountRequest]) (*connect.Response[v1.ServiceAccount], error) {+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.ServiceAccountService.UpdateServiceAccount is not implemented"))+}++func (UnimplementedServiceAccountServiceHandler) DeleteServiceAccount(context.Context, *connect.Request[v1.DeleteServiceAccountRequest]) (*connect.Response[emptypb.Empty], error) {+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.ServiceAccountService.DeleteServiceAccount is not implemented"))+}++func (UnimplementedServiceAccountServiceHandler) UndeleteServiceAccount(context.Context, *connect.Request[v1.UndeleteServiceAccountRequest]) (*connect.Response[v1.ServiceAccount], error) {+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.ServiceAccountService.UndeleteServiceAccount is not implemented"))+}diff --git a/backend/generated-go/v1/v1connect/workload_identity_service.connect.go b/backend/generated-go/v1/v1connect/workload_identity_service.connect.gonew file mode 100644index 0000000000..818dd8e76e--- /dev/null+++ b/backend/generated-go/v1/v1connect/workload_identity_service.connect.go@@ -0,0 +1,284 @@+// Code generated by protoc-gen-connect-go. DO NOT EDIT.+//+// Source: v1/workload_identity_service.proto++package v1connect++import (+ connect "connectrpc.com/connect"+ context "context"+ errors "errors"+ v1 "github.com/bytebase/bytebase/backend/generated-go/v1"+ emptypb "google.golang.org/protobuf/types/known/emptypb"+ http "net/http"+ strings "strings"+)++// This is a compile-time assertion to ensure that this generated file and the connect package are+// compatible. If you get a compiler error that this constant is not defined, this code was+// generated with a version of connect newer than the one compiled into your binary. You can fix the+// problem by either regenerating this code with an older version of connect or updating the connect+// version compiled into your binary.+const _ = connect.IsAtLeastVersion1_13_0++const (+ // WorkloadIdentityServiceName is the fully-qualified name of the WorkloadIdentityService service.+ WorkloadIdentityServiceName = "bytebase.v1.WorkloadIdentityService"+)++// These constants are the fully-qualified names of the RPCs defined in this package. They're+// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.+//+// Note that these are different from the fully-qualified method names used by+// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to+// reflection-formatted method names, remove the leading slash and convert the remaining slash to a+// period.+const (+ // WorkloadIdentityServiceCreateWorkloadIdentityProcedure is the fully-qualified name of the+ // WorkloadIdentityService's CreateWorkloadIdentity RPC.+ WorkloadIdentityServiceCreateWorkloadIdentityProcedure = "/bytebase.v1.WorkloadIdentityService/CreateWorkloadIdentity"+ // WorkloadIdentityServiceGetWorkloadIdentityProcedure is the fully-qualified name of the+ // WorkloadIdentityService's GetWorkloadIdentity RPC.+ WorkloadIdentityServiceGetWorkloadIdentityProcedure = "/bytebase.v1.WorkloadIdentityService/GetWorkloadIdentity"+ // WorkloadIdentityServiceListWorkloadIdentitiesProcedure is the fully-qualified name of the+ // WorkloadIdentityService's ListWorkloadIdentities RPC.+ WorkloadIdentityServiceListWorkloadIdentitiesProcedure = "/bytebase.v1.WorkloadIdentityService/ListWorkloadIdentities"+ // WorkloadIdentityServiceUpdateWorkloadIdentityProcedure is the fully-qualified name of the+ // WorkloadIdentityService's UpdateWorkloadIdentity RPC.+ WorkloadIdentityServiceUpdateWorkloadIdentityProcedure = "/bytebase.v1.WorkloadIdentityService/UpdateWorkloadIdentity"+ // WorkloadIdentityServiceDeleteWorkloadIdentityProcedure is the fully-qualified name of the+ // WorkloadIdentityService's DeleteWorkloadIdentity RPC.+ WorkloadIdentityServiceDeleteWorkloadIdentityProcedure = "/bytebase.v1.WorkloadIdentityService/DeleteWorkloadIdentity"+ // WorkloadIdentityServiceUndeleteWorkloadIdentityProcedure is the fully-qualified name of the+ // WorkloadIdentityService's UndeleteWorkloadIdentity RPC.+ WorkloadIdentityServiceUndeleteWorkloadIdentityProcedure = "/bytebase.v1.WorkloadIdentityService/UndeleteWorkloadIdentity"+)++// WorkloadIdentityServiceClient is a client for the bytebase.v1.WorkloadIdentityService service.+type WorkloadIdentityServiceClient interface {+ // Creates a new workload identity.+ // For workspace-level: parent is empty, permission bb.workloadIdentities.create on workspace.+ // For project-level: parent is projects/{project}, permission bb.workloadIdentities.create on project.+ CreateWorkloadIdentity(context.Context, *connect.Request[v1.CreateWorkloadIdentityRequest]) (*connect.Response[v1.WorkloadIdentity], error)+ // Gets a workload identity by name.+ // Permissions required: bb.workloadIdentities.get+ GetWorkloadIdentity(context.Context, *connect.Request[v1.GetWorkloadIdentityRequest]) (*connect.Response[v1.WorkloadIdentity], error)+ // Lists workload identities.+ // For workspace-level: parent is empty, permission bb.workloadIdentities.list on workspace.+ // For project-level: parent is projects/{project}, permission bb.workloadIdentities.list on project.+ ListWorkloadIdentities(context.Context, *connect.Request[v1.ListWorkloadIdentitiesRequest]) (*connect.Response[v1.ListWorkloadIdentitiesResponse], error)+ // Updates a workload identity.+ // Permissions required: bb.workloadIdentities.update+ UpdateWorkloadIdentity(context.Context, *connect.Request[v1.UpdateWorkloadIdentityRequest]) (*connect.Response[v1.WorkloadIdentity], error)+ // Deletes a workload identity.+ // Permissions required: bb.workloadIdentities.delete+ DeleteWorkloadIdentity(context.Context, *connect.Request[v1.DeleteWorkloadIdentityRequest]) (*connect.Response[emptypb.Empty], error)+ // Restores a deleted workload identity.+ // Permissions required: bb.workloadIdentities.undelete+ UndeleteWorkloadIdentity(context.Context, *connect.Request[v1.UndeleteWorkloadIdentityRequest]) (*connect.Response[v1.WorkloadIdentity], error)+}++// NewWorkloadIdentityServiceClient constructs a client for the bytebase.v1.WorkloadIdentityService+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply+// the connect.WithGRPC() or connect.WithGRPCWeb() options.+//+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,+// http://api.acme.com or https://acme.com/grpc).+func NewWorkloadIdentityServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) WorkloadIdentityServiceClient {+ baseURL = strings.TrimRight(baseURL, "/")+ workloadIdentityServiceMethods := v1.File_v1_workload_identity_service_proto.Services().ByName("WorkloadIdentityService").Methods()+ return &workloadIdentityServiceClient{+ createWorkloadIdentity: connect.NewClient[v1.CreateWorkloadIdentityRequest, v1.WorkloadIdentity](+ httpClient,+ baseURL+WorkloadIdentityServiceCreateWorkloadIdentityProcedure,+ connect.WithSchema(workloadIdentityServiceMethods.ByName("CreateWorkloadIdentity")),+ connect.WithClientOptions(opts...),+ ),+ getWorkloadIdentity: connect.NewClient[v1.GetWorkloadIdentityRequest, v1.WorkloadIdentity](+ httpClient,+ baseURL+WorkloadIdentityServiceGetWorkloadIdentityProcedure,+ connect.WithSchema(workloadIdentityServiceMethods.ByName("GetWorkloadIdentity")),+ connect.WithClientOptions(opts...),+ ),+ listWorkloadIdentities: connect.NewClient[v1.ListWorkloadIdentitiesRequest, v1.ListWorkloadIdentitiesResponse](+ httpClient,+ baseURL+WorkloadIdentityServiceListWorkloadIdentitiesProcedure,+ connect.WithSchema(workloadIdentityServiceMethods.ByName("ListWorkloadIdentities")),+ connect.WithClientOptions(opts...),+ ),+ updateWorkloadIdentity: connect.NewClient[v1.UpdateWorkloadIdentityRequest, v1.WorkloadIdentity](+ httpClient,+ baseURL+WorkloadIdentityServiceUpdateWorkloadIdentityProcedure,+ connect.WithSchema(workloadIdentityServiceMethods.ByName("UpdateWorkloadIdentity")),+ connect.WithClientOptions(opts...),+ ),+ deleteWorkloadIdentity: connect.NewClient[v1.DeleteWorkloadIdentityRequest, emptypb.Empty](+ httpClient,+ baseURL+WorkloadIdentityServiceDeleteWorkloadIdentityProcedure,+ connect.WithSchema(workloadIdentityServiceMethods.ByName("DeleteWorkloadIdentity")),+ connect.WithClientOptions(opts...),+ ),+ undeleteWorkloadIdentity: connect.NewClient[v1.UndeleteWorkloadIdentityRequest, v1.WorkloadIdentity](+ httpClient,+ baseURL+WorkloadIdentityServiceUndeleteWorkloadIdentityProcedure,+ connect.WithSchema(workloadIdentityServiceMethods.ByName("UndeleteWorkloadIdentity")),+ connect.WithClientOptions(opts...),+ ),+ }+}++// workloadIdentityServiceClient implements WorkloadIdentityServiceClient.+type workloadIdentityServiceClient struct {+ createWorkloadIdentity *connect.Client[v1.CreateWorkloadIdentityRequest, v1.WorkloadIdentity]+ getWorkloadIdentity *connect.Client[v1.GetWorkloadIdentityRequest, v1.WorkloadIdentity]+ listWorkloadIdentities *connect.Client[v1.ListWorkloadIdentitiesRequest, v1.ListWorkloadIdentitiesResponse]+ updateWorkloadIdentity *connect.Client[v1.UpdateWorkloadIdentityRequest, v1.WorkloadIdentity]+ deleteWorkloadIdentity *connect.Client[v1.DeleteWorkloadIdentityRequest, emptypb.Empty]+ undeleteWorkloadIdentity *connect.Client[v1.UndeleteWorkloadIdentityRequest, v1.WorkloadIdentity]+}++// CreateWorkloadIdentity calls bytebase.v1.WorkloadIdentityService.CreateWorkloadIdentity.+func (c *workloadIdentityServiceClient) CreateWorkloadIdentity(ctx context.Context, req *connect.Request[v1.CreateWorkloadIdentityRequest]) (*connect.Response[v1.WorkloadIdentity], error) {+ return c.createWorkloadIdentity.CallUnary(ctx, req)+}++// GetWorkloadIdentity calls bytebase.v1.WorkloadIdentityService.GetWorkloadIdentity.+func (c *workloadIdentityServiceClient) GetWorkloadIdentity(ctx context.Context, req *connect.Request[v1.GetWorkloadIdentityRequest]) (*connect.Response[v1.WorkloadIdentity], error) {+ return c.getWorkloadIdentity.CallUnary(ctx, req)+}++// ListWorkloadIdentities calls bytebase.v1.WorkloadIdentityService.ListWorkloadIdentities.+func (c *workloadIdentityServiceClient) ListWorkloadIdentities(ctx context.Context, req *connect.Request[v1.ListWorkloadIdentitiesRequest]) (*connect.Response[v1.ListWorkloadIdentitiesResponse], error) {+ return c.listWorkloadIdentities.CallUnary(ctx, req)+}++// UpdateWorkloadIdentity calls bytebase.v1.WorkloadIdentityService.UpdateWorkloadIdentity.+func (c *workloadIdentityServiceClient) UpdateWorkloadIdentity(ctx context.Context, req *connect.Request[v1.UpdateWorkloadIdentityRequest]) (*connect.Response[v1.WorkloadIdentity], error) {+ return c.updateWorkloadIdentity.CallUnary(ctx, req)+}++// DeleteWorkloadIdentity calls bytebase.v1.WorkloadIdentityService.DeleteWorkloadIdentity.+func (c *workloadIdentityServiceClient) DeleteWorkloadIdentity(ctx context.Context, req *connect.Request[v1.DeleteWorkloadIdentityRequest]) (*connect.Response[emptypb.Empty], error) {+ return c.deleteWorkloadIdentity.CallUnary(ctx, req)+}++// UndeleteWorkloadIdentity calls bytebase.v1.WorkloadIdentityService.UndeleteWorkloadIdentity.+func (c *workloadIdentityServiceClient) UndeleteWorkloadIdentity(ctx context.Context, req *connect.Request[v1.UndeleteWorkloadIdentityRequest]) (*connect.Response[v1.WorkloadIdentity], error) {+ return c.undeleteWorkloadIdentity.CallUnary(ctx, req)+}++// WorkloadIdentityServiceHandler is an implementation of the bytebase.v1.WorkloadIdentityService+// service.+type WorkloadIdentityServiceHandler interface {+ // Creates a new workload identity.+ // For workspace-level: parent is empty, permission bb.workloadIdentities.create on workspace.+ // For project-level: parent is projects/{project}, permission bb.workloadIdentities.create on project.+ CreateWorkloadIdentity(context.Context, *connect.Request[v1.CreateWorkloadIdentityRequest]) (*connect.Response[v1.WorkloadIdentity], error)+ // Gets a workload identity by name.+ // Permissions required: bb.workloadIdentities.get+ GetWorkloadIdentity(context.Context, *connect.Request[v1.GetWorkloadIdentityRequest]) (*connect.Response[v1.WorkloadIdentity], error)+ // Lists workload identities.+ // For workspace-level: parent is empty, permission bb.workloadIdentities.list on workspace.+ // For project-level: parent is projects/{project}, permission bb.workloadIdentities.list on project.+ ListWorkloadIdentities(context.Context, *connect.Request[v1.ListWorkloadIdentitiesRequest]) (*connect.Response[v1.ListWorkloadIdentitiesResponse], error)+ // Updates a workload identity.+ // Permissions required: bb.workloadIdentities.update+ UpdateWorkloadIdentity(context.Context, *connect.Request[v1.UpdateWorkloadIdentityRequest]) (*connect.Response[v1.WorkloadIdentity], error)+ // Deletes a workload identity.+ // Permissions required: bb.workloadIdentities.delete+ DeleteWorkloadIdentity(context.Context, *connect.Request[v1.DeleteWorkloadIdentityRequest]) (*connect.Response[emptypb.Empty], error)+ // Restores a deleted workload identity.+ // Permissions required: bb.workloadIdentities.undelete+ UndeleteWorkloadIdentity(context.Context, *connect.Request[v1.UndeleteWorkloadIdentityRequest]) (*connect.Response[v1.WorkloadIdentity], error)+}++// NewWorkloadIdentityServiceHandler builds an HTTP handler from the service implementation. It+// returns the path on which to mount the handler and the handler itself.+//+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf+// and JSON codecs. They also support gzip compression.+func NewWorkloadIdentityServiceHandler(svc WorkloadIdentityServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {+ workloadIdentityServiceMethods := v1.File_v1_workload_identity_service_proto.Services().ByName("WorkloadIdentityService").Methods()+ workloadIdentityServiceCreateWorkloadIdentityHandler := connect.NewUnaryHandler(+ WorkloadIdentityServiceCreateWorkloadIdentityProcedure,+ svc.CreateWorkloadIdentity,+ connect.WithSchema(workloadIdentityServiceMethods.ByName("CreateWorkloadIdentity")),+ connect.WithHandlerOptions(opts...),+ )+ workloadIdentityServiceGetWorkloadIdentityHandler := connect.NewUnaryHandler(+ WorkloadIdentityServiceGetWorkloadIdentityProcedure,+ svc.GetWorkloadIdentity,+ connect.WithSchema(workloadIdentityServiceMethods.ByName("GetWorkloadIdentity")),+ connect.WithHandlerOptions(opts...),+ )+ workloadIdentityServiceListWorkloadIdentitiesHandler := connect.NewUnaryHandler(+ WorkloadIdentityServiceListWorkloadIdentitiesProcedure,+ svc.ListWorkloadIdentities,+ connect.WithSchema(workloadIdentityServiceMethods.ByName("ListWorkloadIdentities")),+ connect.WithHandlerOptions(opts...),+ )+ workloadIdentityServiceUpdateWorkloadIdentityHandler := connect.NewUnaryHandler(+ WorkloadIdentityServiceUpdateWorkloadIdentityProcedure,+ svc.UpdateWorkloadIdentity,+ connect.WithSchema(workloadIdentityServiceMethods.ByName("UpdateWorkloadIdentity")),+ connect.WithHandlerOptions(opts...),+ )+ workloadIdentityServiceDeleteWorkloadIdentityHandler := connect.NewUnaryHandler(+ WorkloadIdentityServiceDeleteWorkloadIdentityProcedure,+ svc.DeleteWorkloadIdentity,+ connect.WithSchema(workloadIdentityServiceMethods.ByName("DeleteWorkloadIdentity")),+ connect.WithHandlerOptions(opts...),+ )+ workloadIdentityServiceUndeleteWorkloadIdentityHandler := connect.NewUnaryHandler(+ WorkloadIdentityServiceUndeleteWorkloadIdentityProcedure,+ svc.UndeleteWorkloadIdentity,+ connect.WithSchema(workloadIdentityServiceMethods.ByName("UndeleteWorkloadIdentity")),+ connect.WithHandlerOptions(opts...),+ )+ return "/bytebase.v1.WorkloadIdentityService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {+ switch r.URL.Path {+ case WorkloadIdentityServiceCreateWorkloadIdentityProcedure:+ workloadIdentityServiceCreateWorkloadIdentityHandler.ServeHTTP(w, r)+ case WorkloadIdentityServiceGetWorkloadIdentityProcedure:+ workloadIdentityServiceGetWorkloadIdentityHandler.ServeHTTP(w, r)+ case WorkloadIdentityServiceListWorkloadIdentitiesProcedure:+ workloadIdentityServiceListWorkloadIdentitiesHandler.ServeHTTP(w, r)+ case WorkloadIdentityServiceUpdateWorkloadIdentityProcedure:+ workloadIdentityServiceUpdateWorkloadIdentityHandler.ServeHTTP(w, r)+ case WorkloadIdentityServiceDeleteWorkloadIdentityProcedure:+ workloadIdentityServiceDeleteWorkloadIdentityHandler.ServeHTTP(w, r)+ case WorkloadIdentityServiceUndeleteWorkloadIdentityProcedure:+ workloadIdentityServiceUndeleteWorkloadIdentityHandler.ServeHTTP(w, r)+ default:+ http.NotFound(w, r)+ }+ })+}++// UnimplementedWorkloadIdentityServiceHandler returns CodeUnimplemented from all methods.+type UnimplementedWorkloadIdentityServiceHandler struct{}++func (UnimplementedWorkloadIdentityServiceHandler) CreateWorkloadIdentity(context.Context, *connect.Request[v1.CreateWorkloadIdentityRequest]) (*connect.Response[v1.WorkloadIdentity], error) {+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.WorkloadIdentityService.CreateWorkloadIdentity is not implemented"))+}++func (UnimplementedWorkloadIdentityServiceHandler) GetWorkloadIdentity(context.Context, *connect.Request[v1.GetWorkloadIdentityRequest]) (*connect.Response[v1.WorkloadIdentity], error) {+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.WorkloadIdentityService.GetWorkloadIdentity is not implemented"))+}++func (UnimplementedWorkloadIdentityServiceHandler) ListWorkloadIdentities(context.Context, *connect.Request[v1.ListWorkloadIdentitiesRequest]) (*connect.Response[v1.ListWorkloadIdentitiesResponse], error) {+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.WorkloadIdentityService.ListWorkloadIdentities is not implemented"))+}++func (UnimplementedWorkloadIdentityServiceHandler) UpdateWorkloadIdentity(context.Context, *connect.Request[v1.UpdateWorkloadIdentityRequest]) (*connect.Response[v1.WorkloadIdentity], error) {+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.WorkloadIdentityService.UpdateWorkloadIdentity is not implemented"))+}++func (UnimplementedWorkloadIdentityServiceHandler) DeleteWorkloadIdentity(context.Context, *connect.Request[v1.DeleteWorkloadIdentityRequest]) (*connect.Response[emptypb.Empty], error) {+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.WorkloadIdentityService.DeleteWorkloadIdentity is not implemented"))+}++func (UnimplementedWorkloadIdentityServiceHandler) UndeleteWorkloadIdentity(context.Context, *connect.Request[v1.UndeleteWorkloadIdentityRequest]) (*connect.Response[v1.WorkloadIdentity], error) {+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.WorkloadIdentityService.UndeleteWorkloadIdentity is not implemented"))+}diff --git a/backend/generated-go/v1/workload_identity_service.pb.go b/backend/generated-go/v1/workload_identity_service.pb.gonew file mode 100644index 0000000000..f63bf6b059--- /dev/null+++ b/backend/generated-go/v1/workload_identity_service.pb.go@@ -0,0 +1,659 @@+// Code generated by protoc-gen-go. DO NOT EDIT.+// versions:+// protoc-gen-go v1.36.11+// protoc (unknown)+// source: v1/workload_identity_service.proto++package v1++import (+ _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"+ _ "google.golang.org/genproto/googleapis/api/annotations"+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"+ emptypb "google.golang.org/protobuf/types/known/emptypb"+ fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"+ reflect "reflect"+ sync "sync"+ unsafe "unsafe"+)++const (+ // Verify that this generated code is sufficiently up-to-date.+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)+ // Verify that runtime/protoimpl is sufficiently up-to-date.+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)+)++// WorkloadIdentity represents an external CI/CD workload identity.+type WorkloadIdentity struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The name of the workload identity.+ // Format: workloadIdentities/{email}+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ // The state of the workload identity.+ State State `protobuf:"varint,2,opt,name=state,proto3,enum=bytebase.v1.State" json:"state,omitempty"`+ // The email of the workload identity.+ // For workspace-level: {name}@workload.bytebase.com+ // For project-level: {name}@{project-id}.workload.bytebase.com+ Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`+ // The display title of the workload identity.+ Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`+ // The timestamp when the workload identity was created.+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`+ // The workload identity configuration for OIDC token validation.+ WorkloadIdentityConfig *WorkloadIdentityConfig `protobuf:"bytes,6,opt,name=workload_identity_config,json=workloadIdentityConfig,proto3" json:"workload_identity_config,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *WorkloadIdentity) Reset() {+ *x = WorkloadIdentity{}+ mi := &file_v1_workload_identity_service_proto_msgTypes[0]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *WorkloadIdentity) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*WorkloadIdentity) ProtoMessage() {}++func (x *WorkloadIdentity) ProtoReflect() protoreflect.Message {+ mi := &file_v1_workload_identity_service_proto_msgTypes[0]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use WorkloadIdentity.ProtoReflect.Descriptor instead.+func (*WorkloadIdentity) Descriptor() ([]byte, []int) {+ return file_v1_workload_identity_service_proto_rawDescGZIP(), []int{0}+}++func (x *WorkloadIdentity) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *WorkloadIdentity) GetState() State {+ if x != nil {+ return x.State+ }+ return State_STATE_UNSPECIFIED+}++func (x *WorkloadIdentity) GetEmail() string {+ if x != nil {+ return x.Email+ }+ return ""+}++func (x *WorkloadIdentity) GetTitle() string {+ if x != nil {+ return x.Title+ }+ return ""+}++func (x *WorkloadIdentity) GetCreateTime() *timestamppb.Timestamp {+ if x != nil {+ return x.CreateTime+ }+ return nil+}++func (x *WorkloadIdentity) GetWorkloadIdentityConfig() *WorkloadIdentityConfig {+ if x != nil {+ return x.WorkloadIdentityConfig+ }+ return nil+}++// Request message for creating a workload identity.+type CreateWorkloadIdentityRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The parent resource where this workload identity will be created.+ // Format: projects/{project} for project-level, empty for workspace-level.+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`+ // The ID to use for the workload identity, which will become the final component+ // of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.com+ // or {workload_identity_id}@{project-id}.workload.bytebase.com+ WorkloadIdentityId string `protobuf:"bytes,2,opt,name=workload_identity_id,json=workloadIdentityId,proto3" json:"workload_identity_id,omitempty"`+ // The workload identity to create.+ WorkloadIdentity *WorkloadIdentity `protobuf:"bytes,3,opt,name=workload_identity,json=workloadIdentity,proto3" json:"workload_identity,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *CreateWorkloadIdentityRequest) Reset() {+ *x = CreateWorkloadIdentityRequest{}+ mi := &file_v1_workload_identity_service_proto_msgTypes[1]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *CreateWorkloadIdentityRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*CreateWorkloadIdentityRequest) ProtoMessage() {}++func (x *CreateWorkloadIdentityRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_workload_identity_service_proto_msgTypes[1]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use CreateWorkloadIdentityRequest.ProtoReflect.Descriptor instead.+func (*CreateWorkloadIdentityRequest) Descriptor() ([]byte, []int) {+ return file_v1_workload_identity_service_proto_rawDescGZIP(), []int{1}+}++func (x *CreateWorkloadIdentityRequest) GetParent() string {+ if x != nil {+ return x.Parent+ }+ return ""+}++func (x *CreateWorkloadIdentityRequest) GetWorkloadIdentityId() string {+ if x != nil {+ return x.WorkloadIdentityId+ }+ return ""+}++func (x *CreateWorkloadIdentityRequest) GetWorkloadIdentity() *WorkloadIdentity {+ if x != nil {+ return x.WorkloadIdentity+ }+ return nil+}++// Request message for getting a workload identity.+type GetWorkloadIdentityRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The name of the workload identity to retrieve.+ // Format: workloadIdentities/{email}+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *GetWorkloadIdentityRequest) Reset() {+ *x = GetWorkloadIdentityRequest{}+ mi := &file_v1_workload_identity_service_proto_msgTypes[2]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *GetWorkloadIdentityRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*GetWorkloadIdentityRequest) ProtoMessage() {}++func (x *GetWorkloadIdentityRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_workload_identity_service_proto_msgTypes[2]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use GetWorkloadIdentityRequest.ProtoReflect.Descriptor instead.+func (*GetWorkloadIdentityRequest) Descriptor() ([]byte, []int) {+ return file_v1_workload_identity_service_proto_rawDescGZIP(), []int{2}+}++func (x *GetWorkloadIdentityRequest) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++// Request message for listing workload identities.+type ListWorkloadIdentitiesRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The parent resource.+ // Format: projects/{project} for project-level, empty for workspace-level.+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`+ // The maximum number of workload identities to return. The service may return fewer than+ // this value.+ // If unspecified, at most 10 workload identities will be returned.+ // The maximum value is 1000; values above 1000 will be coerced to 1000.+ PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`+ // A page token, received from a previous `ListWorkloadIdentities` call.+ // Provide this to retrieve the subsequent page.+ //+ // When paginating, all other parameters provided to `ListWorkloadIdentities` must match+ // the call that provided the page token.+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`+ // Show deleted workload identities if specified.+ ShowDeleted bool `protobuf:"varint,4,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *ListWorkloadIdentitiesRequest) Reset() {+ *x = ListWorkloadIdentitiesRequest{}+ mi := &file_v1_workload_identity_service_proto_msgTypes[3]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *ListWorkloadIdentitiesRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ListWorkloadIdentitiesRequest) ProtoMessage() {}++func (x *ListWorkloadIdentitiesRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_workload_identity_service_proto_msgTypes[3]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use ListWorkloadIdentitiesRequest.ProtoReflect.Descriptor instead.+func (*ListWorkloadIdentitiesRequest) Descriptor() ([]byte, []int) {+ return file_v1_workload_identity_service_proto_rawDescGZIP(), []int{3}+}++func (x *ListWorkloadIdentitiesRequest) GetParent() string {+ if x != nil {+ return x.Parent+ }+ return ""+}++func (x *ListWorkloadIdentitiesRequest) GetPageSize() int32 {+ if x != nil {+ return x.PageSize+ }+ return 0+}++func (x *ListWorkloadIdentitiesRequest) GetPageToken() string {+ if x != nil {+ return x.PageToken+ }+ return ""+}++func (x *ListWorkloadIdentitiesRequest) GetShowDeleted() bool {+ if x != nil {+ return x.ShowDeleted+ }+ return false+}++// Response message for listing workload identities.+type ListWorkloadIdentitiesResponse struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The workload identities from the specified request.+ WorkloadIdentities []*WorkloadIdentity `protobuf:"bytes,1,rep,name=workload_identities,json=workloadIdentities,proto3" json:"workload_identities,omitempty"`+ // A token, which can be sent as `page_token` to retrieve the next page.+ // If this field is omitted, there are no subsequent pages.+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *ListWorkloadIdentitiesResponse) Reset() {+ *x = ListWorkloadIdentitiesResponse{}+ mi := &file_v1_workload_identity_service_proto_msgTypes[4]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *ListWorkloadIdentitiesResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ListWorkloadIdentitiesResponse) ProtoMessage() {}++func (x *ListWorkloadIdentitiesResponse) ProtoReflect() protoreflect.Message {+ mi := &file_v1_workload_identity_service_proto_msgTypes[4]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use ListWorkloadIdentitiesResponse.ProtoReflect.Descriptor instead.+func (*ListWorkloadIdentitiesResponse) Descriptor() ([]byte, []int) {+ return file_v1_workload_identity_service_proto_rawDescGZIP(), []int{4}+}++func (x *ListWorkloadIdentitiesResponse) GetWorkloadIdentities() []*WorkloadIdentity {+ if x != nil {+ return x.WorkloadIdentities+ }+ return nil+}++func (x *ListWorkloadIdentitiesResponse) GetNextPageToken() string {+ if x != nil {+ return x.NextPageToken+ }+ return ""+}++// Request message for updating a workload identity.+type UpdateWorkloadIdentityRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The workload identity to update.+ //+ // The workload identity's `name` field is used to identify the workload identity to update.+ // Format: workloadIdentities/{email}+ WorkloadIdentity *WorkloadIdentity `protobuf:"bytes,1,opt,name=workload_identity,json=workloadIdentity,proto3" json:"workload_identity,omitempty"`+ // The list of fields to update.+ // Supported fields: title, workload_identity_config+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *UpdateWorkloadIdentityRequest) Reset() {+ *x = UpdateWorkloadIdentityRequest{}+ mi := &file_v1_workload_identity_service_proto_msgTypes[5]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *UpdateWorkloadIdentityRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*UpdateWorkloadIdentityRequest) ProtoMessage() {}++func (x *UpdateWorkloadIdentityRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_workload_identity_service_proto_msgTypes[5]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use UpdateWorkloadIdentityRequest.ProtoReflect.Descriptor instead.+func (*UpdateWorkloadIdentityRequest) Descriptor() ([]byte, []int) {+ return file_v1_workload_identity_service_proto_rawDescGZIP(), []int{5}+}++func (x *UpdateWorkloadIdentityRequest) GetWorkloadIdentity() *WorkloadIdentity {+ if x != nil {+ return x.WorkloadIdentity+ }+ return nil+}++func (x *UpdateWorkloadIdentityRequest) GetUpdateMask() *fieldmaskpb.FieldMask {+ if x != nil {+ return x.UpdateMask+ }+ return nil+}++// Request message for deleting a workload identity.+type DeleteWorkloadIdentityRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The name of the workload identity to delete.+ // Format: workloadIdentities/{email}+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *DeleteWorkloadIdentityRequest) Reset() {+ *x = DeleteWorkloadIdentityRequest{}+ mi := &file_v1_workload_identity_service_proto_msgTypes[6]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *DeleteWorkloadIdentityRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DeleteWorkloadIdentityRequest) ProtoMessage() {}++func (x *DeleteWorkloadIdentityRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_workload_identity_service_proto_msgTypes[6]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DeleteWorkloadIdentityRequest.ProtoReflect.Descriptor instead.+func (*DeleteWorkloadIdentityRequest) Descriptor() ([]byte, []int) {+ return file_v1_workload_identity_service_proto_rawDescGZIP(), []int{6}+}++func (x *DeleteWorkloadIdentityRequest) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++// Request message for restoring a deleted workload identity.+type UndeleteWorkloadIdentityRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The name of the deleted workload identity.+ // Format: workloadIdentities/{email}+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *UndeleteWorkloadIdentityRequest) Reset() {+ *x = UndeleteWorkloadIdentityRequest{}+ mi := &file_v1_workload_identity_service_proto_msgTypes[7]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *UndeleteWorkloadIdentityRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*UndeleteWorkloadIdentityRequest) ProtoMessage() {}++func (x *UndeleteWorkloadIdentityRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_workload_identity_service_proto_msgTypes[7]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use UndeleteWorkloadIdentityRequest.ProtoReflect.Descriptor instead.+func (*UndeleteWorkloadIdentityRequest) Descriptor() ([]byte, []int) {+ return file_v1_workload_identity_service_proto_rawDescGZIP(), []int{7}+}++func (x *UndeleteWorkloadIdentityRequest) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++var File_v1_workload_identity_service_proto protoreflect.FileDescriptor++const file_v1_workload_identity_service_proto_rawDesc = "" ++ "\n" ++ "\"v1/workload_identity_service.proto\x12\vbytebase.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\x1a\x15v1/user_service.proto\"\xf1\x02\n" ++ "\x10WorkloadIdentity\x12\x17\n" ++ "\x04name\x18\x01 \x01(\tB\x03\xe0A\x03R\x04name\x12(\n" ++ "\x05state\x18\x02 \x01(\x0e2\x12.bytebase.v1.StateR\x05state\x12\x19\n" ++ "\x05email\x18\x03 \x01(\tB\x03\xe0A\x03R\x05email\x12\x1e\n" ++ "\x05title\x18\x04 \x01(\tB\b\xbaH\x05r\x03\x18\xc8\x01R\x05title\x12@\n" ++ "\vcreate_time\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" ++ "createTime\x12]\n" ++ "\x18workload_identity_config\x18\x06 \x01(\v2#.bytebase.v1.WorkloadIdentityConfigR\x16workloadIdentityConfig:>\xeaA;\n" ++ "\x1dbytebase.com/WorkloadIdentity\x12\x1aworkloadIdentities/{email}\"\xda\x01\n" ++ "\x1dCreateWorkloadIdentityRequest\x121\n" ++ "\x06parent\x18\x01 \x01(\tB\x19\xfaA\x16\n" ++ "\x14bytebase.com/ProjectR\x06parent\x125\n" ++ "\x14workload_identity_id\x18\x02 \x01(\tB\x03\xe0A\x02R\x12workloadIdentityId\x12O\n" ++ "\x11workload_identity\x18\x03 \x01(\v2\x1d.bytebase.v1.WorkloadIdentityB\x03\xe0A\x02R\x10workloadIdentity\"W\n" ++ "\x1aGetWorkloadIdentityRequest\x129\n" ++ "\x04name\x18\x01 \x01(\tB%\xe0A\x02\xfaA\x1f\n" ++ "\x1dbytebase.com/WorkloadIdentityR\x04name\"\xb1\x01\n" ++ "\x1dListWorkloadIdentitiesRequest\x121\n" ++ "\x06parent\x18\x01 \x01(\tB\x19\xfaA\x16\n" ++ "\x14bytebase.com/ProjectR\x06parent\x12\x1b\n" ++ "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" ++ "\n" ++ "page_token\x18\x03 \x01(\tR\tpageToken\x12!\n" ++ "\fshow_deleted\x18\x04 \x01(\bR\vshowDeleted\"\x98\x01\n" ++ "\x1eListWorkloadIdentitiesResponse\x12N\n" ++ "\x13workload_identities\x18\x01 \x03(\v2\x1d.bytebase.v1.WorkloadIdentityR\x12workloadIdentities\x12&\n" ++ "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xad\x01\n" ++ "\x1dUpdateWorkloadIdentityRequest\x12O\n" ++ "\x11workload_identity\x18\x01 \x01(\v2\x1d.bytebase.v1.WorkloadIdentityB\x03\xe0A\x02R\x10workloadIdentity\x12;\n" ++ "\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" ++ "updateMask\"Z\n" ++ "\x1dDeleteWorkloadIdentityRequest\x129\n" ++ "\x04name\x18\x01 \x01(\tB%\xe0A\x02\xfaA\x1f\n" ++ "\x1dbytebase.com/WorkloadIdentityR\x04name\"\\\n" ++ "\x1fUndeleteWorkloadIdentityRequest\x129\n" ++ "\x04name\x18\x01 \x01(\tB%\xe0A\x02\xfaA\x1f\n" ++ "\x1dbytebase.com/WorkloadIdentityR\x04name2\xe7\n" ++ "\n" ++ "\x17WorkloadIdentityService\x12\xb0\x02\n" ++ "\x16CreateWorkloadIdentity\x12*.bytebase.v1.CreateWorkloadIdentityRequest\x1a\x1d.bytebase.v1.WorkloadIdentity\"\xca\x01\xdaA-parent,workload_identity,workload_identity_id\x8a\xea0\x1cbb.workloadIdentities.create\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02l:\x11workload_identityZ+:\x11workload_identity\"\x16/v1/workloadIdentities\"*/v1/{parent=projects/*}/workloadIdentities\x12\xae\x01\n" ++ "\x13GetWorkloadIdentity\x12'.bytebase.v1.GetWorkloadIdentityRequest\x1a\x1d.bytebase.v1.WorkloadIdentity\"O\xdaA\x04name\x8a\xea0\x19bb.workloadIdentities.get\x90\xea0\x01\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{name=workloadIdentities/*}\x12\xea\x01\n" ++ "\x16ListWorkloadIdentities\x12*.bytebase.v1.ListWorkloadIdentitiesRequest\x1a+.bytebase.v1.ListWorkloadIdentitiesResponse\"w\xdaA\x06parent\x8a\xea0\x1abb.workloadIdentities.list\x90\xea0\x01\x82\xd3\xe4\x93\x02FZ\x18\x12\x16/v1/workloadIdentities\x12*/v1/{parent=projects/*}/workloadIdentities\x12\xfa\x01\n" ++ "\x16UpdateWorkloadIdentity\x12*.bytebase.v1.UpdateWorkloadIdentityRequest\x1a\x1d.bytebase.v1.WorkloadIdentity\"\x94\x01\xdaA\x1dworkload_identity,update_mask\x8a\xea0\x1cbb.workloadIdentities.update\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02F:\x11workload_identity21/v1/{workload_identity.name=workloadIdentities/*}\x12\xb4\x01\n" ++ "\x16DeleteWorkloadIdentity\x12*.bytebase.v1.DeleteWorkloadIdentityRequest\x1a\x16.google.protobuf.Empty\"V\xdaA\x04name\x8a\xea0\x1cbb.workloadIdentities.delete\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02!*\x1f/v1/{name=workloadIdentities/*}\x12\xc6\x01\n" ++ "\x18UndeleteWorkloadIdentity\x12,.bytebase.v1.UndeleteWorkloadIdentityRequest\x1a\x1d.bytebase.v1.WorkloadIdentity\"]\x8a\xea0\x1ebb.workloadIdentities.undelete\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02-:\x01*\"(/v1/{name=workloadIdentities/*}:undeleteB\xb2\x01\n" ++ "\x0fcom.bytebase.v1B\x1cWorkloadIdentityServiceProtoP\x01Z4github.com/bytebase/bytebase/backend/generated-go/v1\xa2\x02\x03BXX\xaa\x02\vBytebase.V1\xca\x02\vBytebase\\V1\xe2\x02\x17Bytebase\\V1\\GPBMetadata\xea\x02\fBytebase::V1b\x06proto3"++var (+ file_v1_workload_identity_service_proto_rawDescOnce sync.Once+ file_v1_workload_identity_service_proto_rawDescData []byte+)++func file_v1_workload_identity_service_proto_rawDescGZIP() []byte {+ file_v1_workload_identity_service_proto_rawDescOnce.Do(func() {+ file_v1_workload_identity_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_v1_workload_identity_service_proto_rawDesc), len(file_v1_workload_identity_service_proto_rawDesc)))+ })+ return file_v1_workload_identity_service_proto_rawDescData+}++var file_v1_workload_identity_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8)+var file_v1_workload_identity_service_proto_goTypes = []any{+ (*WorkloadIdentity)(nil), // 0: bytebase.v1.WorkloadIdentity+ (*CreateWorkloadIdentityRequest)(nil), // 1: bytebase.v1.CreateWorkloadIdentityRequest+ (*GetWorkloadIdentityRequest)(nil), // 2: bytebase.v1.GetWorkloadIdentityRequest+ (*ListWorkloadIdentitiesRequest)(nil), // 3: bytebase.v1.ListWorkloadIdentitiesRequest+ (*ListWorkloadIdentitiesResponse)(nil), // 4: bytebase.v1.ListWorkloadIdentitiesResponse+ (*UpdateWorkloadIdentityRequest)(nil), // 5: bytebase.v1.UpdateWorkloadIdentityRequest+ (*DeleteWorkloadIdentityRequest)(nil), // 6: bytebase.v1.DeleteWorkloadIdentityRequest+ (*UndeleteWorkloadIdentityRequest)(nil), // 7: bytebase.v1.UndeleteWorkloadIdentityRequest+ (State)(0), // 8: bytebase.v1.State+ (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp+ (*WorkloadIdentityConfig)(nil), // 10: bytebase.v1.WorkloadIdentityConfig+ (*fieldmaskpb.FieldMask)(nil), // 11: google.protobuf.FieldMask+ (*emptypb.Empty)(nil), // 12: google.protobuf.Empty+}+var file_v1_workload_identity_service_proto_depIdxs = []int32{+ 8, // 0: bytebase.v1.WorkloadIdentity.state:type_name -> bytebase.v1.State+ 9, // 1: bytebase.v1.WorkloadIdentity.create_time:type_name -> google.protobuf.Timestamp+ 10, // 2: bytebase.v1.WorkloadIdentity.workload_identity_config:type_name -> bytebase.v1.WorkloadIdentityConfig+ 0, // 3: bytebase.v1.CreateWorkloadIdentityRequest.workload_identity:type_name -> bytebase.v1.WorkloadIdentity+ 0, // 4: bytebase.v1.ListWorkloadIdentitiesResponse.workload_identities:type_name -> bytebase.v1.WorkloadIdentity+ 0, // 5: bytebase.v1.UpdateWorkloadIdentityRequest.workload_identity:type_name -> bytebase.v1.WorkloadIdentity+ 11, // 6: bytebase.v1.UpdateWorkloadIdentityRequest.update_mask:type_name -> google.protobuf.FieldMask+ 1, // 7: bytebase.v1.WorkloadIdentityService.CreateWorkloadIdentity:input_type -> bytebase.v1.CreateWorkloadIdentityRequest+ 2, // 8: bytebase.v1.WorkloadIdentityService.GetWorkloadIdentity:input_type -> bytebase.v1.GetWorkloadIdentityRequest+ 3, // 9: bytebase.v1.WorkloadIdentityService.ListWorkloadIdentities:input_type -> bytebase.v1.ListWorkloadIdentitiesRequest+ 5, // 10: bytebase.v1.WorkloadIdentityService.UpdateWorkloadIdentity:input_type -> bytebase.v1.UpdateWorkloadIdentityRequest+ 6, // 11: bytebase.v1.WorkloadIdentityService.DeleteWorkloadIdentity:input_type -> bytebase.v1.DeleteWorkloadIdentityRequest+ 7, // 12: bytebase.v1.WorkloadIdentityService.UndeleteWorkloadIdentity:input_type -> bytebase.v1.UndeleteWorkloadIdentityRequest+ 0, // 13: bytebase.v1.WorkloadIdentityService.CreateWorkloadIdentity:output_type -> bytebase.v1.WorkloadIdentity+ 0, // 14: bytebase.v1.WorkloadIdentityService.GetWorkloadIdentity:output_type -> bytebase.v1.WorkloadIdentity+ 4, // 15: bytebase.v1.WorkloadIdentityService.ListWorkloadIdentities:output_type -> bytebase.v1.ListWorkloadIdentitiesResponse+ 0, // 16: bytebase.v1.WorkloadIdentityService.UpdateWorkloadIdentity:output_type -> bytebase.v1.WorkloadIdentity+ 12, // 17: bytebase.v1.WorkloadIdentityService.DeleteWorkloadIdentity:output_type -> google.protobuf.Empty+ 0, // 18: bytebase.v1.WorkloadIdentityService.UndeleteWorkloadIdentity:output_type -> bytebase.v1.WorkloadIdentity+ 13, // [13:19] is the sub-list for method output_type+ 7, // [7:13] is the sub-list for method input_type+ 7, // [7:7] is the sub-list for extension type_name+ 7, // [7:7] is the sub-list for extension extendee+ 0, // [0:7] is the sub-list for field type_name+}++func init() { file_v1_workload_identity_service_proto_init() }+func file_v1_workload_identity_service_proto_init() {+ if File_v1_workload_identity_service_proto != nil {+ return+ }+ file_v1_annotation_proto_init()+ file_v1_common_proto_init()+ file_v1_user_service_proto_init()+ type x struct{}+ out := protoimpl.TypeBuilder{+ File: protoimpl.DescBuilder{+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_workload_identity_service_proto_rawDesc), len(file_v1_workload_identity_service_proto_rawDesc)),+ NumEnums: 0,+ NumMessages: 8,+ NumExtensions: 0,+ NumServices: 1,+ },+ GoTypes: file_v1_workload_identity_service_proto_goTypes,+ DependencyIndexes: file_v1_workload_identity_service_proto_depIdxs,+ MessageInfos: file_v1_workload_identity_service_proto_msgTypes,+ }.Build()+ File_v1_workload_identity_service_proto = out.File+ file_v1_workload_identity_service_proto_goTypes = nil+ file_v1_workload_identity_service_proto_depIdxs = nil+}diff --git a/backend/generated-go/v1/workload_identity_service.pb.gw.go b/backend/generated-go/v1/workload_identity_service.pb.gw.gonew file mode 100644index 0000000000..aa7735207a--- /dev/null+++ b/backend/generated-go/v1/workload_identity_service.pb.gw.go@@ -0,0 +1,795 @@+// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.+// source: v1/workload_identity_service.proto++/*+Package v1 is a reverse proxy.++It translates gRPC into RESTful JSON APIs.+*/+package v1++import (+ "context"+ "errors"+ "io"+ "net/http"++ "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"+ "google.golang.org/grpc"+ "google.golang.org/grpc/codes"+ "google.golang.org/grpc/grpclog"+ "google.golang.org/grpc/metadata"+ "google.golang.org/grpc/status"+ "google.golang.org/protobuf/proto"+)++// Suppress "imported and not used" errors+var (+ _ codes.Code+ _ io.Reader+ _ status.Status+ _ = errors.New+ _ = runtime.String+ _ = utilities.NewDoubleArray+ _ = metadata.Join+)++var filter_WorkloadIdentityService_CreateWorkloadIdentity_0 = &utilities.DoubleArray{Encoding: map[string]int{"workload_identity": 0, "parent": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}++func request_WorkloadIdentityService_CreateWorkloadIdentity_0(ctx context.Context, marshaler runtime.Marshaler, client WorkloadIdentityServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq CreateWorkloadIdentityRequest+ metadata runtime.ServerMetadata+ err error+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.WorkloadIdentity); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkloadIdentityService_CreateWorkloadIdentity_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := client.CreateWorkloadIdentity(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_WorkloadIdentityService_CreateWorkloadIdentity_0(ctx context.Context, marshaler runtime.Marshaler, server WorkloadIdentityServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq CreateWorkloadIdentityRequest+ metadata runtime.ServerMetadata+ err error+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.WorkloadIdentity); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkloadIdentityService_CreateWorkloadIdentity_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := server.CreateWorkloadIdentity(ctx, &protoReq)+ return msg, metadata, err+}++var filter_WorkloadIdentityService_CreateWorkloadIdentity_1 = &utilities.DoubleArray{Encoding: map[string]int{"workload_identity": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}++func request_WorkloadIdentityService_CreateWorkloadIdentity_1(ctx context.Context, marshaler runtime.Marshaler, client WorkloadIdentityServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq CreateWorkloadIdentityRequest+ metadata runtime.ServerMetadata+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.WorkloadIdentity); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkloadIdentityService_CreateWorkloadIdentity_1); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := client.CreateWorkloadIdentity(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_WorkloadIdentityService_CreateWorkloadIdentity_1(ctx context.Context, marshaler runtime.Marshaler, server WorkloadIdentityServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq CreateWorkloadIdentityRequest+ metadata runtime.ServerMetadata+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.WorkloadIdentity); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkloadIdentityService_CreateWorkloadIdentity_1); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := server.CreateWorkloadIdentity(ctx, &protoReq)+ return msg, metadata, err+}++func request_WorkloadIdentityService_GetWorkloadIdentity_0(ctx context.Context, marshaler runtime.Marshaler, client WorkloadIdentityServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq GetWorkloadIdentityRequest+ metadata runtime.ServerMetadata+ err error+ )+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ 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.GetWorkloadIdentity(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_WorkloadIdentityService_GetWorkloadIdentity_0(ctx context.Context, marshaler runtime.Marshaler, server WorkloadIdentityServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq GetWorkloadIdentityRequest+ metadata runtime.ServerMetadata+ err error+ )+ 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 := server.GetWorkloadIdentity(ctx, &protoReq)+ return msg, metadata, err+}++var filter_WorkloadIdentityService_ListWorkloadIdentities_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}++func request_WorkloadIdentityService_ListWorkloadIdentities_0(ctx context.Context, marshaler runtime.Marshaler, client WorkloadIdentityServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq ListWorkloadIdentitiesRequest+ metadata runtime.ServerMetadata+ err error+ )+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkloadIdentityService_ListWorkloadIdentities_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := client.ListWorkloadIdentities(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_WorkloadIdentityService_ListWorkloadIdentities_0(ctx context.Context, marshaler runtime.Marshaler, server WorkloadIdentityServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq ListWorkloadIdentitiesRequest+ metadata runtime.ServerMetadata+ err error+ )+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkloadIdentityService_ListWorkloadIdentities_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := server.ListWorkloadIdentities(ctx, &protoReq)+ return msg, metadata, err+}++var filter_WorkloadIdentityService_ListWorkloadIdentities_1 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}++func request_WorkloadIdentityService_ListWorkloadIdentities_1(ctx context.Context, marshaler runtime.Marshaler, client WorkloadIdentityServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq ListWorkloadIdentitiesRequest+ metadata runtime.ServerMetadata+ )+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkloadIdentityService_ListWorkloadIdentities_1); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := client.ListWorkloadIdentities(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_WorkloadIdentityService_ListWorkloadIdentities_1(ctx context.Context, marshaler runtime.Marshaler, server WorkloadIdentityServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq ListWorkloadIdentitiesRequest+ metadata runtime.ServerMetadata+ )+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkloadIdentityService_ListWorkloadIdentities_1); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := server.ListWorkloadIdentities(ctx, &protoReq)+ return msg, metadata, err+}++var filter_WorkloadIdentityService_UpdateWorkloadIdentity_0 = &utilities.DoubleArray{Encoding: map[string]int{"workload_identity": 0, "name": 1}, Base: []int{1, 2, 1, 0, 0}, Check: []int{0, 1, 2, 3, 2}}++func request_WorkloadIdentityService_UpdateWorkloadIdentity_0(ctx context.Context, marshaler runtime.Marshaler, client WorkloadIdentityServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq UpdateWorkloadIdentityRequest+ metadata runtime.ServerMetadata+ err error+ )+ newReader, berr := utilities.IOReaderFactory(req.Body)+ if berr != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)+ }+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkloadIdentity); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.WorkloadIdentity); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ } else {+ protoReq.UpdateMask = fieldMask+ }+ }+ val, ok := pathParams["workload_identity.name"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "workload_identity.name")+ }+ err = runtime.PopulateFieldFromPath(&protoReq, "workload_identity.name", val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "workload_identity.name", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkloadIdentityService_UpdateWorkloadIdentity_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := client.UpdateWorkloadIdentity(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_WorkloadIdentityService_UpdateWorkloadIdentity_0(ctx context.Context, marshaler runtime.Marshaler, server WorkloadIdentityServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq UpdateWorkloadIdentityRequest+ metadata runtime.ServerMetadata+ err error+ )+ newReader, berr := utilities.IOReaderFactory(req.Body)+ if berr != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)+ }+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkloadIdentity); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.WorkloadIdentity); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ } else {+ protoReq.UpdateMask = fieldMask+ }+ }+ val, ok := pathParams["workload_identity.name"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "workload_identity.name")+ }+ err = runtime.PopulateFieldFromPath(&protoReq, "workload_identity.name", val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "workload_identity.name", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkloadIdentityService_UpdateWorkloadIdentity_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := server.UpdateWorkloadIdentity(ctx, &protoReq)+ return msg, metadata, err+}++func request_WorkloadIdentityService_DeleteWorkloadIdentity_0(ctx context.Context, marshaler runtime.Marshaler, client WorkloadIdentityServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq DeleteWorkloadIdentityRequest+ metadata runtime.ServerMetadata+ err error+ )+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ 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.DeleteWorkloadIdentity(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_WorkloadIdentityService_DeleteWorkloadIdentity_0(ctx context.Context, marshaler runtime.Marshaler, server WorkloadIdentityServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq DeleteWorkloadIdentityRequest+ metadata runtime.ServerMetadata+ err error+ )+ 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 := server.DeleteWorkloadIdentity(ctx, &protoReq)+ return msg, metadata, err+}++func request_WorkloadIdentityService_UndeleteWorkloadIdentity_0(ctx context.Context, marshaler runtime.Marshaler, client WorkloadIdentityServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq UndeleteWorkloadIdentityRequest+ metadata runtime.ServerMetadata+ err error+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ 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.UndeleteWorkloadIdentity(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_WorkloadIdentityService_UndeleteWorkloadIdentity_0(ctx context.Context, marshaler runtime.Marshaler, server WorkloadIdentityServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq UndeleteWorkloadIdentityRequest+ metadata runtime.ServerMetadata+ err error+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", 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 := server.UndeleteWorkloadIdentity(ctx, &protoReq)+ return msg, metadata, err+}++// RegisterWorkloadIdentityServiceHandlerServer registers the http handlers for service WorkloadIdentityService to "mux".+// UnaryRPC :call WorkloadIdentityServiceServer directly.+// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWorkloadIdentityServiceHandlerFromEndpoint instead.+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.+func RegisterWorkloadIdentityServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WorkloadIdentityServiceServer) error {+ mux.Handle(http.MethodPost, pattern_WorkloadIdentityService_CreateWorkloadIdentity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.WorkloadIdentityService/CreateWorkloadIdentity", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/workloadIdentities"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_WorkloadIdentityService_CreateWorkloadIdentity_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_WorkloadIdentityService_CreateWorkloadIdentity_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodPost, pattern_WorkloadIdentityService_CreateWorkloadIdentity_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.WorkloadIdentityService/CreateWorkloadIdentity", runtime.WithHTTPPathPattern("/v1/workloadIdentities"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_WorkloadIdentityService_CreateWorkloadIdentity_1(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_WorkloadIdentityService_CreateWorkloadIdentity_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodGet, pattern_WorkloadIdentityService_GetWorkloadIdentity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.WorkloadIdentityService/GetWorkloadIdentity", runtime.WithHTTPPathPattern("/v1/{name=workloadIdentities/*}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_WorkloadIdentityService_GetWorkloadIdentity_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_WorkloadIdentityService_GetWorkloadIdentity_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodGet, pattern_WorkloadIdentityService_ListWorkloadIdentities_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.WorkloadIdentityService/ListWorkloadIdentities", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/workloadIdentities"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_WorkloadIdentityService_ListWorkloadIdentities_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_WorkloadIdentityService_ListWorkloadIdentities_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodGet, pattern_WorkloadIdentityService_ListWorkloadIdentities_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.WorkloadIdentityService/ListWorkloadIdentities", runtime.WithHTTPPathPattern("/v1/workloadIdentities"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_WorkloadIdentityService_ListWorkloadIdentities_1(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_WorkloadIdentityService_ListWorkloadIdentities_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodPatch, pattern_WorkloadIdentityService_UpdateWorkloadIdentity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.WorkloadIdentityService/UpdateWorkloadIdentity", runtime.WithHTTPPathPattern("/v1/{workload_identity.name=workloadIdentities/*}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_WorkloadIdentityService_UpdateWorkloadIdentity_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_WorkloadIdentityService_UpdateWorkloadIdentity_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodDelete, pattern_WorkloadIdentityService_DeleteWorkloadIdentity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.WorkloadIdentityService/DeleteWorkloadIdentity", runtime.WithHTTPPathPattern("/v1/{name=workloadIdentities/*}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_WorkloadIdentityService_DeleteWorkloadIdentity_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_WorkloadIdentityService_DeleteWorkloadIdentity_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodPost, pattern_WorkloadIdentityService_UndeleteWorkloadIdentity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.WorkloadIdentityService/UndeleteWorkloadIdentity", runtime.WithHTTPPathPattern("/v1/{name=workloadIdentities/*}:undelete"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_WorkloadIdentityService_UndeleteWorkloadIdentity_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_WorkloadIdentityService_UndeleteWorkloadIdentity_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })++ return nil+}++// RegisterWorkloadIdentityServiceHandlerFromEndpoint is same as RegisterWorkloadIdentityServiceHandler but+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.+func RegisterWorkloadIdentityServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {+ conn, err := grpc.NewClient(endpoint, opts...)+ if err != nil {+ return err+ }+ defer func() {+ if err != nil {+ if cerr := conn.Close(); cerr != nil {+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)+ }+ return+ }+ go func() {+ <-ctx.Done()+ if cerr := conn.Close(); cerr != nil {+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)+ }+ }()+ }()+ return RegisterWorkloadIdentityServiceHandler(ctx, mux, conn)+}++// RegisterWorkloadIdentityServiceHandler registers the http handlers for service WorkloadIdentityService to "mux".+// The handlers forward requests to the grpc endpoint over "conn".+func RegisterWorkloadIdentityServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {+ return RegisterWorkloadIdentityServiceHandlerClient(ctx, mux, NewWorkloadIdentityServiceClient(conn))+}++// RegisterWorkloadIdentityServiceHandlerClient registers the http handlers for service WorkloadIdentityService+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WorkloadIdentityServiceClient".+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WorkloadIdentityServiceClient"+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in+// "WorkloadIdentityServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.+func RegisterWorkloadIdentityServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WorkloadIdentityServiceClient) error {+ mux.Handle(http.MethodPost, pattern_WorkloadIdentityService_CreateWorkloadIdentity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.WorkloadIdentityService/CreateWorkloadIdentity", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/workloadIdentities"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_WorkloadIdentityService_CreateWorkloadIdentity_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_WorkloadIdentityService_CreateWorkloadIdentity_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodPost, pattern_WorkloadIdentityService_CreateWorkloadIdentity_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.WorkloadIdentityService/CreateWorkloadIdentity", runtime.WithHTTPPathPattern("/v1/workloadIdentities"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_WorkloadIdentityService_CreateWorkloadIdentity_1(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_WorkloadIdentityService_CreateWorkloadIdentity_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodGet, pattern_WorkloadIdentityService_GetWorkloadIdentity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.WorkloadIdentityService/GetWorkloadIdentity", runtime.WithHTTPPathPattern("/v1/{name=workloadIdentities/*}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_WorkloadIdentityService_GetWorkloadIdentity_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_WorkloadIdentityService_GetWorkloadIdentity_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodGet, pattern_WorkloadIdentityService_ListWorkloadIdentities_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.WorkloadIdentityService/ListWorkloadIdentities", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/workloadIdentities"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_WorkloadIdentityService_ListWorkloadIdentities_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_WorkloadIdentityService_ListWorkloadIdentities_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodGet, pattern_WorkloadIdentityService_ListWorkloadIdentities_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.WorkloadIdentityService/ListWorkloadIdentities", runtime.WithHTTPPathPattern("/v1/workloadIdentities"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_WorkloadIdentityService_ListWorkloadIdentities_1(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_WorkloadIdentityService_ListWorkloadIdentities_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodPatch, pattern_WorkloadIdentityService_UpdateWorkloadIdentity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.WorkloadIdentityService/UpdateWorkloadIdentity", runtime.WithHTTPPathPattern("/v1/{workload_identity.name=workloadIdentities/*}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_WorkloadIdentityService_UpdateWorkloadIdentity_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_WorkloadIdentityService_UpdateWorkloadIdentity_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodDelete, pattern_WorkloadIdentityService_DeleteWorkloadIdentity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.WorkloadIdentityService/DeleteWorkloadIdentity", runtime.WithHTTPPathPattern("/v1/{name=workloadIdentities/*}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_WorkloadIdentityService_DeleteWorkloadIdentity_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_WorkloadIdentityService_DeleteWorkloadIdentity_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ mux.Handle(http.MethodPost, pattern_WorkloadIdentityService_UndeleteWorkloadIdentity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.WorkloadIdentityService/UndeleteWorkloadIdentity", runtime.WithHTTPPathPattern("/v1/{name=workloadIdentities/*}:undelete"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_WorkloadIdentityService_UndeleteWorkloadIdentity_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_WorkloadIdentityService_UndeleteWorkloadIdentity_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })+ return nil+}++var (+ pattern_WorkloadIdentityService_CreateWorkloadIdentity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "workloadIdentities"}, ""))+ pattern_WorkloadIdentityService_CreateWorkloadIdentity_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "workloadIdentities"}, ""))+ pattern_WorkloadIdentityService_GetWorkloadIdentity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "workloadIdentities", "name"}, ""))+ pattern_WorkloadIdentityService_ListWorkloadIdentities_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "workloadIdentities"}, ""))+ pattern_WorkloadIdentityService_ListWorkloadIdentities_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "workloadIdentities"}, ""))+ pattern_WorkloadIdentityService_UpdateWorkloadIdentity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "workloadIdentities", "workload_identity.name"}, ""))+ pattern_WorkloadIdentityService_DeleteWorkloadIdentity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "workloadIdentities", "name"}, ""))+ pattern_WorkloadIdentityService_UndeleteWorkloadIdentity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "workloadIdentities", "name"}, "undelete"))+)++var (+ forward_WorkloadIdentityService_CreateWorkloadIdentity_0 = runtime.ForwardResponseMessage+ forward_WorkloadIdentityService_CreateWorkloadIdentity_1 = runtime.ForwardResponseMessage+ forward_WorkloadIdentityService_GetWorkloadIdentity_0 = runtime.ForwardResponseMessage+ forward_WorkloadIdentityService_ListWorkloadIdentities_0 = runtime.ForwardResponseMessage+ forward_WorkloadIdentityService_ListWorkloadIdentities_1 = runtime.ForwardResponseMessage+ forward_WorkloadIdentityService_UpdateWorkloadIdentity_0 = runtime.ForwardResponseMessage+ forward_WorkloadIdentityService_DeleteWorkloadIdentity_0 = runtime.ForwardResponseMessage+ forward_WorkloadIdentityService_UndeleteWorkloadIdentity_0 = runtime.ForwardResponseMessage+)diff --git a/backend/generated-go/v1/workload_identity_service_equal.pb.go b/backend/generated-go/v1/workload_identity_service_equal.pb.gonew file mode 100644index 0000000000..edbdbd7b40--- /dev/null+++ b/backend/generated-go/v1/workload_identity_service_equal.pb.go@@ -0,0 +1,158 @@+// Code generated by protoc-gen-equal-go. DO NOT EDIT.+// source: v1/workload_identity_service.proto++package v1++import (+ proto "google.golang.org/protobuf/proto"+ fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"+)++func (x *WorkloadIdentity) Equal(y *WorkloadIdentity) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Name != y.Name {+ return false+ }+ if x.State != y.State {+ return false+ }+ if x.Email != y.Email {+ return false+ }+ if x.Title != y.Title {+ return false+ }+ if p, q := x.CreateTime, y.CreateTime; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) {+ return false+ }+ if !x.WorkloadIdentityConfig.Equal(y.WorkloadIdentityConfig) {+ return false+ }+ return true+}++func (x *CreateWorkloadIdentityRequest) Equal(y *CreateWorkloadIdentityRequest) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Parent != y.Parent {+ return false+ }+ if x.WorkloadIdentityId != y.WorkloadIdentityId {+ return false+ }+ if !x.WorkloadIdentity.Equal(y.WorkloadIdentity) {+ return false+ }+ return true+}++func (x *GetWorkloadIdentityRequest) Equal(y *GetWorkloadIdentityRequest) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Name != y.Name {+ return false+ }+ return true+}++func (x *ListWorkloadIdentitiesRequest) Equal(y *ListWorkloadIdentitiesRequest) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Parent != y.Parent {+ return false+ }+ if x.PageSize != y.PageSize {+ return false+ }+ if x.PageToken != y.PageToken {+ return false+ }+ if x.ShowDeleted != y.ShowDeleted {+ return false+ }+ return true+}++func (x *ListWorkloadIdentitiesResponse) Equal(y *ListWorkloadIdentitiesResponse) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if len(x.WorkloadIdentities) != len(y.WorkloadIdentities) {+ return false+ }+ for i := 0; i < len(x.WorkloadIdentities); i++ {+ if !x.WorkloadIdentities[i].Equal(y.WorkloadIdentities[i]) {+ return false+ }+ }+ if x.NextPageToken != y.NextPageToken {+ return false+ }+ return true+}++func (x *UpdateWorkloadIdentityRequest) Equal(y *UpdateWorkloadIdentityRequest) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if !x.WorkloadIdentity.Equal(y.WorkloadIdentity) {+ return false+ }+ if equal, ok := interface{}(x.UpdateMask).(interface {+ Equal(*fieldmaskpb.FieldMask) bool+ }); !ok || !equal.Equal(y.UpdateMask) {+ return false+ } else if !proto.Equal(x.UpdateMask, y.UpdateMask) {+ return false+ }+ return true+}++func (x *DeleteWorkloadIdentityRequest) Equal(y *DeleteWorkloadIdentityRequest) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Name != y.Name {+ return false+ }+ return true+}++func (x *UndeleteWorkloadIdentityRequest) Equal(y *UndeleteWorkloadIdentityRequest) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Name != y.Name {+ return false+ }+ return true+}diff --git a/backend/generated-go/v1/workload_identity_service_grpc.pb.go b/backend/generated-go/v1/workload_identity_service_grpc.pb.gonew file mode 100644index 0000000000..874d733297--- /dev/null+++ b/backend/generated-go/v1/workload_identity_service_grpc.pb.go@@ -0,0 +1,345 @@+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.+// versions:+// - protoc-gen-go-grpc v1.6.0+// - protoc (unknown)+// source: v1/workload_identity_service.proto++package v1++import (+ context "context"+ grpc "google.golang.org/grpc"+ codes "google.golang.org/grpc/codes"+ status "google.golang.org/grpc/status"+ emptypb "google.golang.org/protobuf/types/known/emptypb"+)++// This is a compile-time assertion to ensure that this generated file+// is compatible with the grpc package it is being compiled against.+// Requires gRPC-Go v1.64.0 or later.+const _ = grpc.SupportPackageIsVersion9++const (+ WorkloadIdentityService_CreateWorkloadIdentity_FullMethodName = "/bytebase.v1.WorkloadIdentityService/CreateWorkloadIdentity"+ WorkloadIdentityService_GetWorkloadIdentity_FullMethodName = "/bytebase.v1.WorkloadIdentityService/GetWorkloadIdentity"+ WorkloadIdentityService_ListWorkloadIdentities_FullMethodName = "/bytebase.v1.WorkloadIdentityService/ListWorkloadIdentities"+ WorkloadIdentityService_UpdateWorkloadIdentity_FullMethodName = "/bytebase.v1.WorkloadIdentityService/UpdateWorkloadIdentity"+ WorkloadIdentityService_DeleteWorkloadIdentity_FullMethodName = "/bytebase.v1.WorkloadIdentityService/DeleteWorkloadIdentity"+ WorkloadIdentityService_UndeleteWorkloadIdentity_FullMethodName = "/bytebase.v1.WorkloadIdentityService/UndeleteWorkloadIdentity"+)++// WorkloadIdentityServiceClient is the client API for WorkloadIdentityService service.+//+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.+//+// WorkloadIdentityService manages workload identities for external CI/CD integrations.+type WorkloadIdentityServiceClient interface {+ // Creates a new workload identity.+ // For workspace-level: parent is empty, permission bb.workloadIdentities.create on workspace.+ // For project-level: parent is projects/{project}, permission bb.workloadIdentities.create on project.+ CreateWorkloadIdentity(ctx context.Context, in *CreateWorkloadIdentityRequest, opts ...grpc.CallOption) (*WorkloadIdentity, error)+ // Gets a workload identity by name.+ // Permissions required: bb.workloadIdentities.get+ GetWorkloadIdentity(ctx context.Context, in *GetWorkloadIdentityRequest, opts ...grpc.CallOption) (*WorkloadIdentity, error)+ // Lists workload identities.+ // For workspace-level: parent is empty, permission bb.workloadIdentities.list on workspace.+ // For project-level: parent is projects/{project}, permission bb.workloadIdentities.list on project.+ ListWorkloadIdentities(ctx context.Context, in *ListWorkloadIdentitiesRequest, opts ...grpc.CallOption) (*ListWorkloadIdentitiesResponse, error)+ // Updates a workload identity.+ // Permissions required: bb.workloadIdentities.update+ UpdateWorkloadIdentity(ctx context.Context, in *UpdateWorkloadIdentityRequest, opts ...grpc.CallOption) (*WorkloadIdentity, error)+ // Deletes a workload identity.+ // Permissions required: bb.workloadIdentities.delete+ DeleteWorkloadIdentity(ctx context.Context, in *DeleteWorkloadIdentityRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)+ // Restores a deleted workload identity.+ // Permissions required: bb.workloadIdentities.undelete+ UndeleteWorkloadIdentity(ctx context.Context, in *UndeleteWorkloadIdentityRequest, opts ...grpc.CallOption) (*WorkloadIdentity, error)+}++type workloadIdentityServiceClient struct {+ cc grpc.ClientConnInterface+}++func NewWorkloadIdentityServiceClient(cc grpc.ClientConnInterface) WorkloadIdentityServiceClient {+ return &workloadIdentityServiceClient{cc}+}++func (c *workloadIdentityServiceClient) CreateWorkloadIdentity(ctx context.Context, in *CreateWorkloadIdentityRequest, opts ...grpc.CallOption) (*WorkloadIdentity, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(WorkloadIdentity)+ err := c.cc.Invoke(ctx, WorkloadIdentityService_CreateWorkloadIdentity_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *workloadIdentityServiceClient) GetWorkloadIdentity(ctx context.Context, in *GetWorkloadIdentityRequest, opts ...grpc.CallOption) (*WorkloadIdentity, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(WorkloadIdentity)+ err := c.cc.Invoke(ctx, WorkloadIdentityService_GetWorkloadIdentity_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *workloadIdentityServiceClient) ListWorkloadIdentities(ctx context.Context, in *ListWorkloadIdentitiesRequest, opts ...grpc.CallOption) (*ListWorkloadIdentitiesResponse, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(ListWorkloadIdentitiesResponse)+ err := c.cc.Invoke(ctx, WorkloadIdentityService_ListWorkloadIdentities_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *workloadIdentityServiceClient) UpdateWorkloadIdentity(ctx context.Context, in *UpdateWorkloadIdentityRequest, opts ...grpc.CallOption) (*WorkloadIdentity, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(WorkloadIdentity)+ err := c.cc.Invoke(ctx, WorkloadIdentityService_UpdateWorkloadIdentity_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *workloadIdentityServiceClient) DeleteWorkloadIdentity(ctx context.Context, in *DeleteWorkloadIdentityRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(emptypb.Empty)+ err := c.cc.Invoke(ctx, WorkloadIdentityService_DeleteWorkloadIdentity_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++func (c *workloadIdentityServiceClient) UndeleteWorkloadIdentity(ctx context.Context, in *UndeleteWorkloadIdentityRequest, opts ...grpc.CallOption) (*WorkloadIdentity, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(WorkloadIdentity)+ err := c.cc.Invoke(ctx, WorkloadIdentityService_UndeleteWorkloadIdentity_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}++// WorkloadIdentityServiceServer is the server API for WorkloadIdentityService service.+// All implementations must embed UnimplementedWorkloadIdentityServiceServer+// for forward compatibility.+//+// WorkloadIdentityService manages workload identities for external CI/CD integrations.+type WorkloadIdentityServiceServer interface {+ // Creates a new workload identity.+ // For workspace-level: parent is empty, permission bb.workloadIdentities.create on workspace.+ // For project-level: parent is projects/{project}, permission bb.workloadIdentities.create on project.+ CreateWorkloadIdentity(context.Context, *CreateWorkloadIdentityRequest) (*WorkloadIdentity, error)+ // Gets a workload identity by name.+ // Permissions required: bb.workloadIdentities.get+ GetWorkloadIdentity(context.Context, *GetWorkloadIdentityRequest) (*WorkloadIdentity, error)+ // Lists workload identities.+ // For workspace-level: parent is empty, permission bb.workloadIdentities.list on workspace.+ // For project-level: parent is projects/{project}, permission bb.workloadIdentities.list on project.+ ListWorkloadIdentities(context.Context, *ListWorkloadIdentitiesRequest) (*ListWorkloadIdentitiesResponse, error)+ // Updates a workload identity.+ // Permissions required: bb.workloadIdentities.update+ UpdateWorkloadIdentity(context.Context, *UpdateWorkloadIdentityRequest) (*WorkloadIdentity, error)+ // Deletes a workload identity.+ // Permissions required: bb.workloadIdentities.delete+ DeleteWorkloadIdentity(context.Context, *DeleteWorkloadIdentityRequest) (*emptypb.Empty, error)+ // Restores a deleted workload identity.+ // Permissions required: bb.workloadIdentities.undelete+ UndeleteWorkloadIdentity(context.Context, *UndeleteWorkloadIdentityRequest) (*WorkloadIdentity, error)+ mustEmbedUnimplementedWorkloadIdentityServiceServer()+}++// UnimplementedWorkloadIdentityServiceServer must be embedded to have+// forward compatible implementations.+//+// NOTE: this should be embedded by value instead of pointer to avoid a nil+// pointer dereference when methods are called.+type UnimplementedWorkloadIdentityServiceServer struct{}++func (UnimplementedWorkloadIdentityServiceServer) CreateWorkloadIdentity(context.Context, *CreateWorkloadIdentityRequest) (*WorkloadIdentity, error) {+ return nil, status.Error(codes.Unimplemented, "method CreateWorkloadIdentity not implemented")+}+func (UnimplementedWorkloadIdentityServiceServer) GetWorkloadIdentity(context.Context, *GetWorkloadIdentityRequest) (*WorkloadIdentity, error) {+ return nil, status.Error(codes.Unimplemented, "method GetWorkloadIdentity not implemented")+}+func (UnimplementedWorkloadIdentityServiceServer) ListWorkloadIdentities(context.Context, *ListWorkloadIdentitiesRequest) (*ListWorkloadIdentitiesResponse, error) {+ return nil, status.Error(codes.Unimplemented, "method ListWorkloadIdentities not implemented")+}+func (UnimplementedWorkloadIdentityServiceServer) UpdateWorkloadIdentity(context.Context, *UpdateWorkloadIdentityRequest) (*WorkloadIdentity, error) {+ return nil, status.Error(codes.Unimplemented, "method UpdateWorkloadIdentity not implemented")+}+func (UnimplementedWorkloadIdentityServiceServer) DeleteWorkloadIdentity(context.Context, *DeleteWorkloadIdentityRequest) (*emptypb.Empty, error) {+ return nil, status.Error(codes.Unimplemented, "method DeleteWorkloadIdentity not implemented")+}+func (UnimplementedWorkloadIdentityServiceServer) UndeleteWorkloadIdentity(context.Context, *UndeleteWorkloadIdentityRequest) (*WorkloadIdentity, error) {+ return nil, status.Error(codes.Unimplemented, "method UndeleteWorkloadIdentity not implemented")+}+func (UnimplementedWorkloadIdentityServiceServer) mustEmbedUnimplementedWorkloadIdentityServiceServer() {+}+func (UnimplementedWorkloadIdentityServiceServer) testEmbeddedByValue() {}++// UnsafeWorkloadIdentityServiceServer may be embedded to opt out of forward compatibility for this service.+// Use of this interface is not recommended, as added methods to WorkloadIdentityServiceServer will+// result in compilation errors.+type UnsafeWorkloadIdentityServiceServer interface {+ mustEmbedUnimplementedWorkloadIdentityServiceServer()+}++func RegisterWorkloadIdentityServiceServer(s grpc.ServiceRegistrar, srv WorkloadIdentityServiceServer) {+ // If the following call panics, it indicates UnimplementedWorkloadIdentityServiceServer was+ // embedded by pointer and is nil. This will cause panics if an+ // unimplemented method is ever invoked, so we test this at initialization+ // time to prevent it from happening at runtime later due to I/O.+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {+ t.testEmbeddedByValue()+ }+ s.RegisterService(&WorkloadIdentityService_ServiceDesc, srv)+}++func _WorkloadIdentityService_CreateWorkloadIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(CreateWorkloadIdentityRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(WorkloadIdentityServiceServer).CreateWorkloadIdentity(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: WorkloadIdentityService_CreateWorkloadIdentity_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(WorkloadIdentityServiceServer).CreateWorkloadIdentity(ctx, req.(*CreateWorkloadIdentityRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _WorkloadIdentityService_GetWorkloadIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(GetWorkloadIdentityRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(WorkloadIdentityServiceServer).GetWorkloadIdentity(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: WorkloadIdentityService_GetWorkloadIdentity_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(WorkloadIdentityServiceServer).GetWorkloadIdentity(ctx, req.(*GetWorkloadIdentityRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _WorkloadIdentityService_ListWorkloadIdentities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(ListWorkloadIdentitiesRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(WorkloadIdentityServiceServer).ListWorkloadIdentities(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: WorkloadIdentityService_ListWorkloadIdentities_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(WorkloadIdentityServiceServer).ListWorkloadIdentities(ctx, req.(*ListWorkloadIdentitiesRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _WorkloadIdentityService_UpdateWorkloadIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(UpdateWorkloadIdentityRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(WorkloadIdentityServiceServer).UpdateWorkloadIdentity(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: WorkloadIdentityService_UpdateWorkloadIdentity_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(WorkloadIdentityServiceServer).UpdateWorkloadIdentity(ctx, req.(*UpdateWorkloadIdentityRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _WorkloadIdentityService_DeleteWorkloadIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(DeleteWorkloadIdentityRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(WorkloadIdentityServiceServer).DeleteWorkloadIdentity(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: WorkloadIdentityService_DeleteWorkloadIdentity_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(WorkloadIdentityServiceServer).DeleteWorkloadIdentity(ctx, req.(*DeleteWorkloadIdentityRequest))+ }+ return interceptor(ctx, in, info, handler)+}++func _WorkloadIdentityService_UndeleteWorkloadIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(UndeleteWorkloadIdentityRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(WorkloadIdentityServiceServer).UndeleteWorkloadIdentity(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: WorkloadIdentityService_UndeleteWorkloadIdentity_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(WorkloadIdentityServiceServer).UndeleteWorkloadIdentity(ctx, req.(*UndeleteWorkloadIdentityRequest))+ }+ return interceptor(ctx, in, info, handler)+}++// WorkloadIdentityService_ServiceDesc is the grpc.ServiceDesc for WorkloadIdentityService service.+// It's only intended for direct use with grpc.RegisterService,+// and not to be introspected or modified (even as a copy)+var WorkloadIdentityService_ServiceDesc = grpc.ServiceDesc{+ ServiceName: "bytebase.v1.WorkloadIdentityService",+ HandlerType: (*WorkloadIdentityServiceServer)(nil),+ Methods: []grpc.MethodDesc{+ {+ MethodName: "CreateWorkloadIdentity",+ Handler: _WorkloadIdentityService_CreateWorkloadIdentity_Handler,+ },+ {+ MethodName: "GetWorkloadIdentity",+ Handler: _WorkloadIdentityService_GetWorkloadIdentity_Handler,+ },+ {+ MethodName: "ListWorkloadIdentities",+ Handler: _WorkloadIdentityService_ListWorkloadIdentities_Handler,+ },+ {+ MethodName: "UpdateWorkloadIdentity",+ Handler: _WorkloadIdentityService_UpdateWorkloadIdentity_Handler,+ },+ {+ MethodName: "DeleteWorkloadIdentity",+ Handler: _WorkloadIdentityService_DeleteWorkloadIdentity_Handler,+ },+ {+ MethodName: "UndeleteWorkloadIdentity",+ Handler: _WorkloadIdentityService_UndeleteWorkloadIdentity_Handler,+ },+ },+ Streams: []grpc.StreamDesc{},+ Metadata: "v1/workload_identity_service.proto",+}diff --git a/frontend/src/types/proto-es/v1/service_account_service_pb.d.ts b/frontend/src/types/proto-es/v1/service_account_service_pb.d.tsnew file mode 100644index 0000000000..5e0296a10c--- /dev/null+++ b/frontend/src/types/proto-es/v1/service_account_service_pb.d.ts@@ -0,0 +1,356 @@+// @generated by protoc-gen-es v2.5.2+// @generated from file v1/service_account_service.proto (package bytebase.v1, syntax proto3)+/* eslint-disable */++import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";+import type { Message } from "@bufbuild/protobuf";+import type { State } from "./common_pb";+import type { EmptySchema, FieldMask, Timestamp } from "@bufbuild/protobuf/wkt";++/**+ * Describes the file v1/service_account_service.proto.+ */+export declare const file_v1_service_account_service: GenFile;++/**+ * ServiceAccount represents an API integration account.+ *+ * @generated from message bytebase.v1.ServiceAccount+ */+export declare type ServiceAccount = Message<"bytebase.v1.ServiceAccount"> & {+ /**+ * The name of the service account.+ * Format: serviceAccounts/{email}+ *+ * @generated from field: string name = 1;+ */+ name: string;++ /**+ * The state of the service account.+ *+ * @generated from field: bytebase.v1.State state = 2;+ */+ state: State;++ /**+ * The email of the service account.+ * For workspace-level: {name}@service.bytebase.com+ * For project-level: {name}@{project-id}.service.bytebase.com+ *+ * @generated from field: string email = 3;+ */+ email: string;++ /**+ * The display title of the service account.+ *+ * @generated from field: string title = 4;+ */+ title: string;++ /**+ * The service key for authentication. Only returned on creation or key rotation.+ *+ * @generated from field: string service_key = 5;+ */+ serviceKey: string;++ /**+ * The timestamp when the service account was created.+ *+ * @generated from field: google.protobuf.Timestamp create_time = 6;+ */+ createTime?: Timestamp;+};++/**+ * Describes the message bytebase.v1.ServiceAccount.+ * Use `create(ServiceAccountSchema)` to create a new message.+ */+export declare const ServiceAccountSchema: GenMessage<ServiceAccount>;++/**+ * Request message for creating a service account.+ *+ * @generated from message bytebase.v1.CreateServiceAccountRequest+ */+export declare type CreateServiceAccountRequest = Message<"bytebase.v1.CreateServiceAccountRequest"> & {+ /**+ * The parent resource where this service account will be created.+ * Format: projects/{project} for project-level, empty for workspace-level.+ *+ * @generated from field: string parent = 1;+ */+ parent: string;++ /**+ * The ID to use for the service account, which will become the final component+ * of the service account's email in the format: {service_account_id}@service.bytebase.com+ * or {service_account_id}@{project-id}.service.bytebase.com+ *+ * @generated from field: string service_account_id = 2;+ */+ serviceAccountId: string;++ /**+ * The service account to create.+ *+ * @generated from field: bytebase.v1.ServiceAccount service_account = 3;+ */+ serviceAccount?: ServiceAccount;+};++/**+ * Describes the message bytebase.v1.CreateServiceAccountRequest.+ * Use `create(CreateServiceAccountRequestSchema)` to create a new message.+ */+export declare const CreateServiceAccountRequestSchema: GenMessage<CreateServiceAccountRequest>;++/**+ * Request message for getting a service account.+ *+ * @generated from message bytebase.v1.GetServiceAccountRequest+ */+export declare type GetServiceAccountRequest = Message<"bytebase.v1.GetServiceAccountRequest"> & {+ /**+ * The name of the service account to retrieve.+ * Format: serviceAccounts/{email}+ *+ * @generated from field: string name = 1;+ */+ name: string;+};++/**+ * Describes the message bytebase.v1.GetServiceAccountRequest.+ * Use `create(GetServiceAccountRequestSchema)` to create a new message.+ */+export declare const GetServiceAccountRequestSchema: GenMessage<GetServiceAccountRequest>;++/**+ * Request message for listing service accounts.+ *+ * @generated from message bytebase.v1.ListServiceAccountsRequest+ */+export declare type ListServiceAccountsRequest = Message<"bytebase.v1.ListServiceAccountsRequest"> & {+ /**+ * The parent resource.+ * Format: projects/{project} for project-level, empty for workspace-level.+ *+ * @generated from field: string parent = 1;+ */+ parent: string;++ /**+ * The maximum number of service accounts to return. The service may return fewer than+ * this value.+ * If unspecified, at most 10 service accounts will be returned.+ * The maximum value is 1000; values above 1000 will be coerced to 1000.+ *+ * @generated from field: int32 page_size = 2;+ */+ pageSize: number;++ /**+ * A page token, received from a previous `ListServiceAccounts` call.+ * Provide this to retrieve the subsequent page.+ *+ * When paginating, all other parameters provided to `ListServiceAccounts` must match+ * the call that provided the page token.+ *+ * @generated from field: string page_token = 3;+ */+ pageToken: string;++ /**+ * Show deleted service accounts if specified.+ *+ * @generated from field: bool show_deleted = 4;+ */+ showDeleted: boolean;+};++/**+ * Describes the message bytebase.v1.ListServiceAccountsRequest.+ * Use `create(ListServiceAccountsRequestSchema)` to create a new message.+ */+export declare const ListServiceAccountsRequestSchema: GenMessage<ListServiceAccountsRequest>;++/**+ * Response message for listing service accounts.+ *+ * @generated from message bytebase.v1.ListServiceAccountsResponse+ */+export declare type ListServiceAccountsResponse = Message<"bytebase.v1.ListServiceAccountsResponse"> & {+ /**+ * The service accounts from the specified request.+ *+ * @generated from field: repeated bytebase.v1.ServiceAccount service_accounts = 1;+ */+ serviceAccounts: ServiceAccount[];++ /**+ * A token, which can be sent as `page_token` to retrieve the next page.+ * If this field is omitted, there are no subsequent pages.+ *+ * @generated from field: string next_page_token = 2;+ */+ nextPageToken: string;+};++/**+ * Describes the message bytebase.v1.ListServiceAccountsResponse.+ * Use `create(ListServiceAccountsResponseSchema)` to create a new message.+ */+export declare const ListServiceAccountsResponseSchema: GenMessage<ListServiceAccountsResponse>;++/**+ * Request message for updating a service account.+ *+ * @generated from message bytebase.v1.UpdateServiceAccountRequest+ */+export declare type UpdateServiceAccountRequest = Message<"bytebase.v1.UpdateServiceAccountRequest"> & {+ /**+ * The service account to update.+ *+ * The service account's `name` field is used to identify the service account to update.+ * Format: serviceAccounts/{email}+ *+ * @generated from field: bytebase.v1.ServiceAccount service_account = 1;+ */+ serviceAccount?: ServiceAccount;++ /**+ * The list of fields to update.+ * Supported fields: title, service_key (triggers key rotation)+ *+ * @generated from field: google.protobuf.FieldMask update_mask = 2;+ */+ updateMask?: FieldMask;+};++/**+ * Describes the message bytebase.v1.UpdateServiceAccountRequest.+ * Use `create(UpdateServiceAccountRequestSchema)` to create a new message.+ */+export declare const UpdateServiceAccountRequestSchema: GenMessage<UpdateServiceAccountRequest>;++/**+ * Request message for deleting a service account.+ *+ * @generated from message bytebase.v1.DeleteServiceAccountRequest+ */+export declare type DeleteServiceAccountRequest = Message<"bytebase.v1.DeleteServiceAccountRequest"> & {+ /**+ * The name of the service account to delete.+ * Format: serviceAccounts/{email}+ *+ * @generated from field: string name = 1;+ */+ name: string;+};++/**+ * Describes the message bytebase.v1.DeleteServiceAccountRequest.+ * Use `create(DeleteServiceAccountRequestSchema)` to create a new message.+ */+export declare const DeleteServiceAccountRequestSchema: GenMessage<DeleteServiceAccountRequest>;++/**+ * Request message for restoring a deleted service account.+ *+ * @generated from message bytebase.v1.UndeleteServiceAccountRequest+ */+export declare type UndeleteServiceAccountRequest = Message<"bytebase.v1.UndeleteServiceAccountRequest"> & {+ /**+ * The name of the deleted service account.+ * Format: serviceAccounts/{email}+ *+ * @generated from field: string name = 1;+ */+ name: string;+};++/**+ * Describes the message bytebase.v1.UndeleteServiceAccountRequest.+ * Use `create(UndeleteServiceAccountRequestSchema)` to create a new message.+ */+export declare const UndeleteServiceAccountRequestSchema: GenMessage<UndeleteServiceAccountRequest>;++/**+ * ServiceAccountService manages service accounts for API integrations.+ *+ * @generated from service bytebase.v1.ServiceAccountService+ */+export declare const ServiceAccountService: GenService<{+ /**+ * Creates a new service account.+ * For workspace-level: parent is empty, permission bb.serviceAccounts.create on workspace.+ * For project-level: parent is projects/{project}, permission bb.serviceAccounts.create on project.+ *+ * @generated from rpc bytebase.v1.ServiceAccountService.CreateServiceAccount+ */+ createServiceAccount: {+ methodKind: "unary";+ input: typeof CreateServiceAccountRequestSchema;+ output: typeof ServiceAccountSchema;+ },+ /**+ * Gets a service account by name.+ * Permissions required: bb.serviceAccounts.get+ *+ * @generated from rpc bytebase.v1.ServiceAccountService.GetServiceAccount+ */+ getServiceAccount: {+ methodKind: "unary";+ input: typeof GetServiceAccountRequestSchema;+ output: typeof ServiceAccountSchema;+ },+ /**+ * Lists service accounts.+ * For workspace-level: parent is empty, permission bb.serviceAccounts.list on workspace.+ * For project-level: parent is projects/{project}, permission bb.serviceAccounts.list on project.+ *+ * @generated from rpc bytebase.v1.ServiceAccountService.ListServiceAccounts+ */+ listServiceAccounts: {+ methodKind: "unary";+ input: typeof ListServiceAccountsRequestSchema;+ output: typeof ListServiceAccountsResponseSchema;+ },+ /**+ * Updates a service account.+ * Permissions required: bb.serviceAccounts.update+ *+ * @generated from rpc bytebase.v1.ServiceAccountService.UpdateServiceAccount+ */+ updateServiceAccount: {+ methodKind: "unary";+ input: typeof UpdateServiceAccountRequestSchema;+ output: typeof ServiceAccountSchema;+ },+ /**+ * Deletes a service account.+ * Permissions required: bb.serviceAccounts.delete+ *+ * @generated from rpc bytebase.v1.ServiceAccountService.DeleteServiceAccount+ */+ deleteServiceAccount: {+ methodKind: "unary";+ input: typeof DeleteServiceAccountRequestSchema;+ output: typeof EmptySchema;+ },+ /**+ * Restores a deleted service account.+ * Permissions required: bb.serviceAccounts.undelete+ *+ * @generated from rpc bytebase.v1.ServiceAccountService.UndeleteServiceAccount+ */+ undeleteServiceAccount: {+ methodKind: "unary";+ input: typeof UndeleteServiceAccountRequestSchema;+ output: typeof ServiceAccountSchema;+ },+}>;+diff --git a/frontend/src/types/proto-es/v1/service_account_service_pb.js b/frontend/src/types/proto-es/v1/service_account_service_pb.jsnew file mode 100644index 0000000000..c986d474cb--- /dev/null+++ b/frontend/src/types/proto-es/v1/service_account_service_pb.js@@ -0,0 +1,84 @@+// @generated by protoc-gen-es v2.5.2+// @generated from file v1/service_account_service.proto (package bytebase.v1, syntax proto3)+/* eslint-disable */++import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";+import { file_buf_validate_validate } from "../buf/validate/validate_pb";+import { file_google_api_annotations } from "../google/api/annotations_pb";+import { file_google_api_client } from "../google/api/client_pb";+import { file_google_api_field_behavior } from "../google/api/field_behavior_pb";+import { file_google_api_resource } from "../google/api/resource_pb";+import { file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";+import { file_v1_annotation } from "./annotation_pb";+import { file_v1_common } from "./common_pb";++/**+ * Describes the file v1/service_account_service.proto.+ */+export const file_v1_service_account_service = /*@__PURE__*/+ fileDesc("CiB2MS9zZXJ2aWNlX2FjY291bnRfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEi/gEKDlNlcnZpY2VBY2NvdW50EhEKBG5hbWUYASABKAlCA+BBAxIhCgVzdGF0ZRgCIAEoDjISLmJ5dGViYXNlLnYxLlN0YXRlEhIKBWVtYWlsGAMgASgJQgPgQQMSFwoFdGl0bGUYBCABKAlCCLpIBXIDGMgBEhgKC3NlcnZpY2Vfa2V5GAUgASgJQgPgQQMSNAoLY3JlYXRlX3RpbWUYBiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQM6OepBNgobYnl0ZWJhc2UuY29tL1NlcnZpY2VBY2NvdW50EhdzZXJ2aWNlQWNjb3VudHMve2VtYWlsfSKkAQobQ3JlYXRlU2VydmljZUFjY291bnRSZXF1ZXN0EikKBnBhcmVudBgBIAEoCUIZ+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBIfChJzZXJ2aWNlX2FjY291bnRfaWQYAiABKAlCA+BBAhI5Cg9zZXJ2aWNlX2FjY291bnQYAyABKAsyGy5ieXRlYmFzZS52MS5TZXJ2aWNlQWNjb3VudEID4EECIk0KGEdldFNlcnZpY2VBY2NvdW50UmVxdWVzdBIxCgRuYW1lGAEgASgJQiPgQQL6QR0KG2J5dGViYXNlLmNvbS9TZXJ2aWNlQWNjb3VudCKEAQoaTGlzdFNlcnZpY2VBY2NvdW50c1JlcXVlc3QSKQoGcGFyZW50GAEgASgJQhn6QRYKFGJ5dGViYXNlLmNvbS9Qcm9qZWN0EhEKCXBhZ2Vfc2l6ZRgCIAEoBRISCgpwYWdlX3Rva2VuGAMgASgJEhQKDHNob3dfZGVsZXRlZBgEIAEoCCJtChtMaXN0U2VydmljZUFjY291bnRzUmVzcG9uc2USNQoQc2VydmljZV9hY2NvdW50cxgBIAMoCzIbLmJ5dGViYXNlLnYxLlNlcnZpY2VBY2NvdW50EhcKD25leHRfcGFnZV90b2tlbhgCIAEoCSKJAQobVXBkYXRlU2VydmljZUFjY291bnRSZXF1ZXN0EjkKD3NlcnZpY2VfYWNjb3VudBgBIAEoCzIbLmJ5dGViYXNlLnYxLlNlcnZpY2VBY2NvdW50QgPgQQISLwoLdXBkYXRlX21hc2sYAiABKAsyGi5nb29nbGUucHJvdG9idWYuRmllbGRNYXNrIlAKG0RlbGV0ZVNlcnZpY2VBY2NvdW50UmVxdWVzdBIxCgRuYW1lGAEgASgJQiPgQQL6QR0KG2J5dGViYXNlLmNvbS9TZXJ2aWNlQWNjb3VudCJSCh1VbmRlbGV0ZVNlcnZpY2VBY2NvdW50UmVxdWVzdBIxCgRuYW1lGAEgASgJQiPgQQL6QR0KG2J5dGViYXNlLmNvbS9TZXJ2aWNlQWNjb3VudDKICgoVU2VydmljZUFjY291bnRTZXJ2aWNlEpkCChRDcmVhdGVTZXJ2aWNlQWNjb3VudBIoLmJ5dGViYXNlLnYxLkNyZWF0ZVNlcnZpY2VBY2NvdW50UmVxdWVzdBobLmJ5dGViYXNlLnYxLlNlcnZpY2VBY2NvdW50IrkB2kEpcGFyZW50LHNlcnZpY2VfYWNjb3VudCxzZXJ2aWNlX2FjY291bnRfaWSK6jAZYmIuc2VydmljZUFjY291bnRzLmNyZWF0ZZDqMAGY6jABgtPkkwJiOg9zZXJ2aWNlX2FjY291bnRaJjoPc2VydmljZV9hY2NvdW50IhMvdjEvc2VydmljZUFjY291bnRzIicvdjEve3BhcmVudD1wcm9qZWN0cy8qfS9zZXJ2aWNlQWNjb3VudHMSogEKEUdldFNlcnZpY2VBY2NvdW50EiUuYnl0ZWJhc2UudjEuR2V0U2VydmljZUFjY291bnRSZXF1ZXN0GhsuYnl0ZWJhc2UudjEuU2VydmljZUFjY291bnQiSdpBBG5hbWWK6jAWYmIuc2VydmljZUFjY291bnRzLmdldJDqMAGC0+STAh4SHC92MS97bmFtZT1zZXJ2aWNlQWNjb3VudHMvKn0S2AEKE0xpc3RTZXJ2aWNlQWNjb3VudHMSJy5ieXRlYmFzZS52MS5MaXN0U2VydmljZUFjY291bnRzUmVxdWVzdBooLmJ5dGViYXNlLnYxLkxpc3RTZXJ2aWNlQWNjb3VudHNSZXNwb25zZSJu2kEGcGFyZW50iuowF2JiLnNlcnZpY2VBY2NvdW50cy5saXN0kOowAYLT5JMCQFoVEhMvdjEvc2VydmljZUFjY291bnRzEicvdjEve3BhcmVudD1wcm9qZWN0cy8qfS9zZXJ2aWNlQWNjb3VudHMS6AEKFFVwZGF0ZVNlcnZpY2VBY2NvdW50EiguYnl0ZWJhc2UudjEuVXBkYXRlU2VydmljZUFjY291bnRSZXF1ZXN0GhsuYnl0ZWJhc2UudjEuU2VydmljZUFjY291bnQiiAHaQRtzZXJ2aWNlX2FjY291bnQsdXBkYXRlX21hc2uK6jAZYmIuc2VydmljZUFjY291bnRzLnVwZGF0ZZDqMAGY6jABgtPkkwI/Og9zZXJ2aWNlX2FjY291bnQyLC92MS97c2VydmljZV9hY2NvdW50Lm5hbWU9c2VydmljZUFjY291bnRzLyp9EqoBChREZWxldGVTZXJ2aWNlQWNjb3VudBIoLmJ5dGViYXNlLnYxLkRlbGV0ZVNlcnZpY2VBY2NvdW50UmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSJQ2kEEbmFtZYrqMBliYi5zZXJ2aWNlQWNjb3VudHMuZGVsZXRlkOowAZjqMAGC0+STAh4qHC92MS97bmFtZT1zZXJ2aWNlQWNjb3VudHMvKn0SugEKFlVuZGVsZXRlU2VydmljZUFjY291bnQSKi5ieXRlYmFzZS52MS5VbmRlbGV0ZVNlcnZpY2VBY2NvdW50UmVxdWVzdBobLmJ5dGViYXNlLnYxLlNlcnZpY2VBY2NvdW50IleK6jAbYmIuc2VydmljZUFjY291bnRzLnVuZGVsZXRlkOowAZjqMAGC0+STAio6ASoiJS92MS97bmFtZT1zZXJ2aWNlQWNjb3VudHMvKn06dW5kZWxldGVCsAEKD2NvbS5ieXRlYmFzZS52MUIaU2VydmljZUFjY291bnRTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common]);++/**+ * Describes the message bytebase.v1.ServiceAccount.+ * Use `create(ServiceAccountSchema)` to create a new message.+ */+export const ServiceAccountSchema = /*@__PURE__*/+ messageDesc(file_v1_service_account_service, 0);++/**+ * Describes the message bytebase.v1.CreateServiceAccountRequest.+ * Use `create(CreateServiceAccountRequestSchema)` to create a new message.+ */+export const CreateServiceAccountRequestSchema = /*@__PURE__*/+ messageDesc(file_v1_service_account_service, 1);++/**+ * Describes the message bytebase.v1.GetServiceAccountRequest.+ * Use `create(GetServiceAccountRequestSchema)` to create a new message.+ */+export const GetServiceAccountRequestSchema = /*@__PURE__*/+ messageDesc(file_v1_service_account_service, 2);++/**+ * Describes the message bytebase.v1.ListServiceAccountsRequest.+ * Use `create(ListServiceAccountsRequestSchema)` to create a new message.+ */+export const ListServiceAccountsRequestSchema = /*@__PURE__*/+ messageDesc(file_v1_service_account_service, 3);++/**+ * Describes the message bytebase.v1.ListServiceAccountsResponse.+ * Use `create(ListServiceAccountsResponseSchema)` to create a new message.+ */+export const ListServiceAccountsResponseSchema = /*@__PURE__*/+ messageDesc(file_v1_service_account_service, 4);++/**+ * Describes the message bytebase.v1.UpdateServiceAccountRequest.+ * Use `create(UpdateServiceAccountRequestSchema)` to create a new message.+ */+export const UpdateServiceAccountRequestSchema = /*@__PURE__*/+ messageDesc(file_v1_service_account_service, 5);++/**+ * Describes the message bytebase.v1.DeleteServiceAccountRequest.+ * Use `create(DeleteServiceAccountRequestSchema)` to create a new message.+ */+export const DeleteServiceAccountRequestSchema = /*@__PURE__*/+ messageDesc(file_v1_service_account_service, 6);++/**+ * Describes the message bytebase.v1.UndeleteServiceAccountRequest.+ * Use `create(UndeleteServiceAccountRequestSchema)` to create a new message.+ */+export const UndeleteServiceAccountRequestSchema = /*@__PURE__*/+ messageDesc(file_v1_service_account_service, 7);++/**+ * ServiceAccountService manages service accounts for API integrations.+ *+ * @generated from service bytebase.v1.ServiceAccountService+ */+export const ServiceAccountService = /*@__PURE__*/+ serviceDesc(file_v1_service_account_service, 0);+diff --git a/frontend/src/types/proto-es/v1/workload_identity_service_pb.d.ts b/frontend/src/types/proto-es/v1/workload_identity_service_pb.d.tsnew file mode 100644index 0000000000..c33663d0e3--- /dev/null+++ b/frontend/src/types/proto-es/v1/workload_identity_service_pb.d.ts@@ -0,0 +1,357 @@+// @generated by protoc-gen-es v2.5.2+// @generated from file v1/workload_identity_service.proto (package bytebase.v1, syntax proto3)+/* eslint-disable */++import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";+import type { Message } from "@bufbuild/protobuf";+import type { State } from "./common_pb";+import type { EmptySchema, FieldMask, Timestamp } from "@bufbuild/protobuf/wkt";+import type { WorkloadIdentityConfig } from "./user_service_pb";++/**+ * Describes the file v1/workload_identity_service.proto.+ */+export declare const file_v1_workload_identity_service: GenFile;++/**+ * WorkloadIdentity represents an external CI/CD workload identity.+ *+ * @generated from message bytebase.v1.WorkloadIdentity+ */+export declare type WorkloadIdentity = Message<"bytebase.v1.WorkloadIdentity"> & {+ /**+ * The name of the workload identity.+ * Format: workloadIdentities/{email}+ *+ * @generated from field: string name = 1;+ */+ name: string;++ /**+ * The state of the workload identity.+ *+ * @generated from field: bytebase.v1.State state = 2;+ */+ state: State;++ /**+ * The email of the workload identity.+ * For workspace-level: {name}@workload.bytebase.com+ * For project-level: {name}@{project-id}.workload.bytebase.com+ *+ * @generated from field: string email = 3;+ */+ email: string;++ /**+ * The display title of the workload identity.+ *+ * @generated from field: string title = 4;+ */+ title: string;++ /**+ * The timestamp when the workload identity was created.+ *+ * @generated from field: google.protobuf.Timestamp create_time = 5;+ */+ createTime?: Timestamp;++ /**+ * The workload identity configuration for OIDC token validation.+ *+ * @generated from field: bytebase.v1.WorkloadIdentityConfig workload_identity_config = 6;+ */+ workloadIdentityConfig?: WorkloadIdentityConfig;+};++/**+ * Describes the message bytebase.v1.WorkloadIdentity.+ * Use `create(WorkloadIdentitySchema)` to create a new message.+ */+export declare const WorkloadIdentitySchema: GenMessage<WorkloadIdentity>;++/**+ * Request message for creating a workload identity.+ *+ * @generated from message bytebase.v1.CreateWorkloadIdentityRequest+ */+export declare type CreateWorkloadIdentityRequest = Message<"bytebase.v1.CreateWorkloadIdentityRequest"> & {+ /**+ * The parent resource where this workload identity will be created.+ * Format: projects/{project} for project-level, empty for workspace-level.+ *+ * @generated from field: string parent = 1;+ */+ parent: string;++ /**+ * The ID to use for the workload identity, which will become the final component+ * of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.com+ * or {workload_identity_id}@{project-id}.workload.bytebase.com+ *+ * @generated from field: string workload_identity_id = 2;+ */+ workloadIdentityId: string;++ /**+ * The workload identity to create.+ *+ * @generated from field: bytebase.v1.WorkloadIdentity workload_identity = 3;+ */+ workloadIdentity?: WorkloadIdentity;+};++/**+ * Describes the message bytebase.v1.CreateWorkloadIdentityRequest.+ * Use `create(CreateWorkloadIdentityRequestSchema)` to create a new message.+ */+export declare const CreateWorkloadIdentityRequestSchema: GenMessage<CreateWorkloadIdentityRequest>;++/**+ * Request message for getting a workload identity.+ *+ * @generated from message bytebase.v1.GetWorkloadIdentityRequest+ */+export declare type GetWorkloadIdentityRequest = Message<"bytebase.v1.GetWorkloadIdentityRequest"> & {+ /**+ * The name of the workload identity to retrieve.+ * Format: workloadIdentities/{email}+ *+ * @generated from field: string name = 1;+ */+ name: string;+};++/**+ * Describes the message bytebase.v1.GetWorkloadIdentityRequest.+ * Use `create(GetWorkloadIdentityRequestSchema)` to create a new message.+ */+export declare const GetWorkloadIdentityRequestSchema: GenMessage<GetWorkloadIdentityRequest>;++/**+ * Request message for listing workload identities.+ *+ * @generated from message bytebase.v1.ListWorkloadIdentitiesRequest+ */+export declare type ListWorkloadIdentitiesRequest = Message<"bytebase.v1.ListWorkloadIdentitiesRequest"> & {+ /**+ * The parent resource.+ * Format: projects/{project} for project-level, empty for workspace-level.+ *+ * @generated from field: string parent = 1;+ */+ parent: string;++ /**+ * The maximum number of workload identities to return. The service may return fewer than+ * this value.+ * If unspecified, at most 10 workload identities will be returned.+ * The maximum value is 1000; values above 1000 will be coerced to 1000.+ *+ * @generated from field: int32 page_size = 2;+ */+ pageSize: number;++ /**+ * A page token, received from a previous `ListWorkloadIdentities` call.+ * Provide this to retrieve the subsequent page.+ *+ * When paginating, all other parameters provided to `ListWorkloadIdentities` must match+ * the call that provided the page token.+ *+ * @generated from field: string page_token = 3;+ */+ pageToken: string;++ /**+ * Show deleted workload identities if specified.+ *+ * @generated from field: bool show_deleted = 4;+ */+ showDeleted: boolean;+};++/**+ * Describes the message bytebase.v1.ListWorkloadIdentitiesRequest.+ * Use `create(ListWorkloadIdentitiesRequestSchema)` to create a new message.+ */+export declare const ListWorkloadIdentitiesRequestSchema: GenMessage<ListWorkloadIdentitiesRequest>;++/**+ * Response message for listing workload identities.+ *+ * @generated from message bytebase.v1.ListWorkloadIdentitiesResponse+ */+export declare type ListWorkloadIdentitiesResponse = Message<"bytebase.v1.ListWorkloadIdentitiesResponse"> & {+ /**+ * The workload identities from the specified request.+ *+ * @generated from field: repeated bytebase.v1.WorkloadIdentity workload_identities = 1;+ */+ workloadIdentities: WorkloadIdentity[];++ /**+ * A token, which can be sent as `page_token` to retrieve the next page.+ * If this field is omitted, there are no subsequent pages.+ *+ * @generated from field: string next_page_token = 2;+ */+ nextPageToken: string;+};++/**+ * Describes the message bytebase.v1.ListWorkloadIdentitiesResponse.+ * Use `create(ListWorkloadIdentitiesResponseSchema)` to create a new message.+ */+export declare const ListWorkloadIdentitiesResponseSchema: GenMessage<ListWorkloadIdentitiesResponse>;++/**+ * Request message for updating a workload identity.+ *+ * @generated from message bytebase.v1.UpdateWorkloadIdentityRequest+ */+export declare type UpdateWorkloadIdentityRequest = Message<"bytebase.v1.UpdateWorkloadIdentityRequest"> & {+ /**+ * The workload identity to update.+ *+ * The workload identity's `name` field is used to identify the workload identity to update.+ * Format: workloadIdentities/{email}+ *+ * @generated from field: bytebase.v1.WorkloadIdentity workload_identity = 1;+ */+ workloadIdentity?: WorkloadIdentity;++ /**+ * The list of fields to update.+ * Supported fields: title, workload_identity_config+ *+ * @generated from field: google.protobuf.FieldMask update_mask = 2;+ */+ updateMask?: FieldMask;+};++/**+ * Describes the message bytebase.v1.UpdateWorkloadIdentityRequest.+ * Use `create(UpdateWorkloadIdentityRequestSchema)` to create a new message.+ */+export declare const UpdateWorkloadIdentityRequestSchema: GenMessage<UpdateWorkloadIdentityRequest>;++/**+ * Request message for deleting a workload identity.+ *+ * @generated from message bytebase.v1.DeleteWorkloadIdentityRequest+ */+export declare type DeleteWorkloadIdentityRequest = Message<"bytebase.v1.DeleteWorkloadIdentityRequest"> & {+ /**+ * The name of the workload identity to delete.+ * Format: workloadIdentities/{email}+ *+ * @generated from field: string name = 1;+ */+ name: string;+};++/**+ * Describes the message bytebase.v1.DeleteWorkloadIdentityRequest.+ * Use `create(DeleteWorkloadIdentityRequestSchema)` to create a new message.+ */+export declare const DeleteWorkloadIdentityRequestSchema: GenMessage<DeleteWorkloadIdentityRequest>;++/**+ * Request message for restoring a deleted workload identity.+ *+ * @generated from message bytebase.v1.UndeleteWorkloadIdentityRequest+ */+export declare type UndeleteWorkloadIdentityRequest = Message<"bytebase.v1.UndeleteWorkloadIdentityRequest"> & {+ /**+ * The name of the deleted workload identity.+ * Format: workloadIdentities/{email}+ *+ * @generated from field: string name = 1;+ */+ name: string;+};++/**+ * Describes the message bytebase.v1.UndeleteWorkloadIdentityRequest.+ * Use `create(UndeleteWorkloadIdentityRequestSchema)` to create a new message.+ */+export declare const UndeleteWorkloadIdentityRequestSchema: GenMessage<UndeleteWorkloadIdentityRequest>;++/**+ * WorkloadIdentityService manages workload identities for external CI/CD integrations.+ *+ * @generated from service bytebase.v1.WorkloadIdentityService+ */+export declare const WorkloadIdentityService: GenService<{+ /**+ * Creates a new workload identity.+ * For workspace-level: parent is empty, permission bb.workloadIdentities.create on workspace.+ * For project-level: parent is projects/{project}, permission bb.workloadIdentities.create on project.+ *+ * @generated from rpc bytebase.v1.WorkloadIdentityService.CreateWorkloadIdentity+ */+ createWorkloadIdentity: {+ methodKind: "unary";+ input: typeof CreateWorkloadIdentityRequestSchema;+ output: typeof WorkloadIdentitySchema;+ },+ /**+ * Gets a workload identity by name.+ * Permissions required: bb.workloadIdentities.get+ *+ * @generated from rpc bytebase.v1.WorkloadIdentityService.GetWorkloadIdentity+ */+ getWorkloadIdentity: {+ methodKind: "unary";+ input: typeof GetWorkloadIdentityRequestSchema;+ output: typeof WorkloadIdentitySchema;+ },+ /**+ * Lists workload identities.+ * For workspace-level: parent is empty, permission bb.workloadIdentities.list on workspace.+ * For project-level: parent is projects/{project}, permission bb.workloadIdentities.list on project.+ *+ * @generated from rpc bytebase.v1.WorkloadIdentityService.ListWorkloadIdentities+ */+ listWorkloadIdentities: {+ methodKind: "unary";+ input: typeof ListWorkloadIdentitiesRequestSchema;+ output: typeof ListWorkloadIdentitiesResponseSchema;+ },+ /**+ * Updates a workload identity.+ * Permissions required: bb.workloadIdentities.update+ *+ * @generated from rpc bytebase.v1.WorkloadIdentityService.UpdateWorkloadIdentity+ */+ updateWorkloadIdentity: {+ methodKind: "unary";+ input: typeof UpdateWorkloadIdentityRequestSchema;+ output: typeof WorkloadIdentitySchema;+ },+ /**+ * Deletes a workload identity.+ * Permissions required: bb.workloadIdentities.delete+ *+ * @generated from rpc bytebase.v1.WorkloadIdentityService.DeleteWorkloadIdentity+ */+ deleteWorkloadIdentity: {+ methodKind: "unary";+ input: typeof DeleteWorkloadIdentityRequestSchema;+ output: typeof EmptySchema;+ },+ /**+ * Restores a deleted workload identity.+ * Permissions required: bb.workloadIdentities.undelete+ *+ * @generated from rpc bytebase.v1.WorkloadIdentityService.UndeleteWorkloadIdentity+ */+ undeleteWorkloadIdentity: {+ methodKind: "unary";+ input: typeof UndeleteWorkloadIdentityRequestSchema;+ output: typeof WorkloadIdentitySchema;+ },+}>;+diff --git a/frontend/src/types/proto-es/v1/workload_identity_service_pb.js b/frontend/src/types/proto-es/v1/workload_identity_service_pb.jsnew file mode 100644index 0000000000..58560bc638--- /dev/null+++ b/frontend/src/types/proto-es/v1/workload_identity_service_pb.js@@ -0,0 +1,85 @@+// @generated by protoc-gen-es v2.5.2+// @generated from file v1/workload_identity_service.proto (package bytebase.v1, syntax proto3)+/* eslint-disable */++import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";+import { file_buf_validate_validate } from "../buf/validate/validate_pb";+import { file_google_api_annotations } from "../google/api/annotations_pb";+import { file_google_api_client } from "../google/api/client_pb";+import { file_google_api_field_behavior } from "../google/api/field_behavior_pb";+import { file_google_api_resource } from "../google/api/resource_pb";+import { file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";+import { file_v1_annotation } from "./annotation_pb";+import { file_v1_common } from "./common_pb";+import { file_v1_user_service } from "./user_service_pb";++/**+ * Describes the file v1/workload_identity_service.proto.+ */+export const file_v1_workload_identity_service = /*@__PURE__*/+ fileDesc("CiJ2MS93b3JrbG9hZF9pZGVudGl0eV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSKyAgoQV29ya2xvYWRJZGVudGl0eRIRCgRuYW1lGAEgASgJQgPgQQMSIQoFc3RhdGUYAiABKA4yEi5ieXRlYmFzZS52MS5TdGF0ZRISCgVlbWFpbBgDIAEoCUID4EEDEhcKBXRpdGxlGAQgASgJQgi6SAVyAxjIARI0CgtjcmVhdGVfdGltZRgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxJFChh3b3JrbG9hZF9pZGVudGl0eV9jb25maWcYBiABKAsyIy5ieXRlYmFzZS52MS5Xb3JrbG9hZElkZW50aXR5Q29uZmlnOj7qQTsKHWJ5dGViYXNlLmNvbS9Xb3JrbG9hZElkZW50aXR5Ehp3b3JrbG9hZElkZW50aXRpZXMve2VtYWlsfSKsAQodQ3JlYXRlV29ya2xvYWRJZGVudGl0eVJlcXVlc3QSKQoGcGFyZW50GAEgASgJQhn6QRYKFGJ5dGViYXNlLmNvbS9Qcm9qZWN0EiEKFHdvcmtsb2FkX2lkZW50aXR5X2lkGAIgASgJQgPgQQISPQoRd29ya2xvYWRfaWRlbnRpdHkYAyABKAsyHS5ieXRlYmFzZS52MS5Xb3JrbG9hZElkZW50aXR5QgPgQQIiUQoaR2V0V29ya2xvYWRJZGVudGl0eVJlcXVlc3QSMwoEbmFtZRgBIAEoCUIl4EEC+kEfCh1ieXRlYmFzZS5jb20vV29ya2xvYWRJZGVudGl0eSKHAQodTGlzdFdvcmtsb2FkSWRlbnRpdGllc1JlcXVlc3QSKQoGcGFyZW50GAEgASgJQhn6QRYKFGJ5dGViYXNlLmNvbS9Qcm9qZWN0EhEKCXBhZ2Vfc2l6ZRgCIAEoBRISCgpwYWdlX3Rva2VuGAMgASgJEhQKDHNob3dfZGVsZXRlZBgEIAEoCCJ1Ch5MaXN0V29ya2xvYWRJZGVudGl0aWVzUmVzcG9uc2USOgoTd29ya2xvYWRfaWRlbnRpdGllcxgBIAMoCzIdLmJ5dGViYXNlLnYxLldvcmtsb2FkSWRlbnRpdHkSFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJIo8BCh1VcGRhdGVXb3JrbG9hZElkZW50aXR5UmVxdWVzdBI9ChF3b3JrbG9hZF9pZGVudGl0eRgBIAEoCzIdLmJ5dGViYXNlLnYxLldvcmtsb2FkSWRlbnRpdHlCA+BBAhIvCgt1cGRhdGVfbWFzaxgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2siVAodRGVsZXRlV29ya2xvYWRJZGVudGl0eVJlcXVlc3QSMwoEbmFtZRgBIAEoCUIl4EEC+kEfCh1ieXRlYmFzZS5jb20vV29ya2xvYWRJZGVudGl0eSJWCh9VbmRlbGV0ZVdvcmtsb2FkSWRlbnRpdHlSZXF1ZXN0EjMKBG5hbWUYASABKAlCJeBBAvpBHwodYnl0ZWJhc2UuY29tL1dvcmtsb2FkSWRlbnRpdHky5woKF1dvcmtsb2FkSWRlbnRpdHlTZXJ2aWNlErACChZDcmVhdGVXb3JrbG9hZElkZW50aXR5EiouYnl0ZWJhc2UudjEuQ3JlYXRlV29ya2xvYWRJZGVudGl0eVJlcXVlc3QaHS5ieXRlYmFzZS52MS5Xb3JrbG9hZElkZW50aXR5IsoB2kEtcGFyZW50LHdvcmtsb2FkX2lkZW50aXR5LHdvcmtsb2FkX2lkZW50aXR5X2lkiuowHGJiLndvcmtsb2FkSWRlbnRpdGllcy5jcmVhdGWQ6jABmOowAYLT5JMCbDoRd29ya2xvYWRfaWRlbnRpdHlaKzoRd29ya2xvYWRfaWRlbnRpdHkiFi92MS93b3JrbG9hZElkZW50aXRpZXMiKi92MS97cGFyZW50PXByb2plY3RzLyp9L3dvcmtsb2FkSWRlbnRpdGllcxKuAQoTR2V0V29ya2xvYWRJZGVudGl0eRInLmJ5dGViYXNlLnYxLkdldFdvcmtsb2FkSWRlbnRpdHlSZXF1ZXN0Gh0uYnl0ZWJhc2UudjEuV29ya2xvYWRJZGVudGl0eSJP2kEEbmFtZYrqMBliYi53b3JrbG9hZElkZW50aXRpZXMuZ2V0kOowAYLT5JMCIRIfL3YxL3tuYW1lPXdvcmtsb2FkSWRlbnRpdGllcy8qfRLqAQoWTGlzdFdvcmtsb2FkSWRlbnRpdGllcxIqLmJ5dGViYXNlLnYxLkxpc3RXb3JrbG9hZElkZW50aXRpZXNSZXF1ZXN0GisuYnl0ZWJhc2UudjEuTGlzdFdvcmtsb2FkSWRlbnRpdGllc1Jlc3BvbnNlInfaQQZwYXJlbnSK6jAaYmIud29ya2xvYWRJZGVudGl0aWVzLmxpc3SQ6jABgtPkkwJGWhgSFi92MS93b3JrbG9hZElkZW50aXRpZXMSKi92MS97cGFyZW50PXByb2plY3RzLyp9L3dvcmtsb2FkSWRlbnRpdGllcxL6AQoWVXBkYXRlV29ya2xvYWRJZGVudGl0eRIqLmJ5dGViYXNlLnYxLlVwZGF0ZVdvcmtsb2FkSWRlbnRpdHlSZXF1ZXN0Gh0uYnl0ZWJhc2UudjEuV29ya2xvYWRJZGVudGl0eSKUAdpBHXdvcmtsb2FkX2lkZW50aXR5LHVwZGF0ZV9tYXNriuowHGJiLndvcmtsb2FkSWRlbnRpdGllcy51cGRhdGWQ6jABmOowAYLT5JMCRjoRd29ya2xvYWRfaWRlbnRpdHkyMS92MS97d29ya2xvYWRfaWRlbnRpdHkubmFtZT13b3JrbG9hZElkZW50aXRpZXMvKn0StAEKFkRlbGV0ZVdvcmtsb2FkSWRlbnRpdHkSKi5ieXRlYmFzZS52MS5EZWxldGVXb3JrbG9hZElkZW50aXR5UmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSJW2kEEbmFtZYrqMBxiYi53b3JrbG9hZElkZW50aXRpZXMuZGVsZXRlkOowAZjqMAGC0+STAiEqHy92MS97bmFtZT13b3JrbG9hZElkZW50aXRpZXMvKn0SxgEKGFVuZGVsZXRlV29ya2xvYWRJZGVudGl0eRIsLmJ5dGViYXNlLnYxLlVuZGVsZXRlV29ya2xvYWRJZGVudGl0eVJlcXVlc3QaHS5ieXRlYmFzZS52MS5Xb3JrbG9hZElkZW50aXR5Il2K6jAeYmIud29ya2xvYWRJZGVudGl0aWVzLnVuZGVsZXRlkOowAZjqMAGC0+STAi06ASoiKC92MS97bmFtZT13b3JrbG9hZElkZW50aXRpZXMvKn06dW5kZWxldGVCsgEKD2NvbS5ieXRlYmFzZS52MUIcV29ya2xvYWRJZGVudGl0eVNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_user_service]);++/**+ * Describes the message bytebase.v1.WorkloadIdentity.+ * Use `create(WorkloadIdentitySchema)` to create a new message.+ */+export const WorkloadIdentitySchema = /*@__PURE__*/+ messageDesc(file_v1_workload_identity_service, 0);++/**+ * Describes the message bytebase.v1.CreateWorkloadIdentityRequest.+ * Use `create(CreateWorkloadIdentityRequestSchema)` to create a new message.+ */+export const CreateWorkloadIdentityRequestSchema = /*@__PURE__*/+ messageDesc(file_v1_workload_identity_service, 1);++/**+ * Describes the message bytebase.v1.GetWorkloadIdentityRequest.+ * Use `create(GetWorkloadIdentityRequestSchema)` to create a new message.+ */+export const GetWorkloadIdentityRequestSchema = /*@__PURE__*/+ messageDesc(file_v1_workload_identity_service, 2);++/**+ * Describes the message bytebase.v1.ListWorkloadIdentitiesRequest.+ * Use `create(ListWorkloadIdentitiesRequestSchema)` to create a new message.+ */+export const ListWorkloadIdentitiesRequestSchema = /*@__PURE__*/+ messageDesc(file_v1_workload_identity_service, 3);++/**+ * Describes the message bytebase.v1.ListWorkloadIdentitiesResponse.+ * Use `create(ListWorkloadIdentitiesResponseSchema)` to create a new message.+ */+export const ListWorkloadIdentitiesResponseSchema = /*@__PURE__*/+ messageDesc(file_v1_workload_identity_service, 4);++/**+ * Describes the message bytebase.v1.UpdateWorkloadIdentityRequest.+ * Use `create(UpdateWorkloadIdentityRequestSchema)` to create a new message.+ */+export const UpdateWorkloadIdentityRequestSchema = /*@__PURE__*/+ messageDesc(file_v1_workload_identity_service, 5);++/**+ * Describes the message bytebase.v1.DeleteWorkloadIdentityRequest.+ * Use `create(DeleteWorkloadIdentityRequestSchema)` to create a new message.+ */+export const DeleteWorkloadIdentityRequestSchema = /*@__PURE__*/+ messageDesc(file_v1_workload_identity_service, 6);++/**+ * Describes the message bytebase.v1.UndeleteWorkloadIdentityRequest.+ * Use `create(UndeleteWorkloadIdentityRequestSchema)` to create a new message.+ */+export const UndeleteWorkloadIdentityRequestSchema = /*@__PURE__*/+ messageDesc(file_v1_workload_identity_service, 7);++/**+ * WorkloadIdentityService manages workload identities for external CI/CD integrations.+ *+ * @generated from service bytebase.v1.WorkloadIdentityService+ */+export const WorkloadIdentityService = /*@__PURE__*/+ serviceDesc(file_v1_workload_identity_service, 0);+diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 17ccc8a3ff..22c1b0e377 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -7967,6 +7967,115 @@ paths:application/json:schema:$ref: '#/components/schemas/bytebase.v1.ExportResponse'+ /v1/projects/{project}/serviceAccounts:+ get:+ tags:+ - ServiceAccountService+ summary: ListServiceAccounts+ description: |-+ Lists service accounts.+ For workspace-level: parent is empty, permission bb.serviceAccounts.list on workspace.+ For project-level: parent is projects/{project}, permission bb.serviceAccounts.list on project.+ operationId: ServiceAccountService_ListServiceAccounts+ parameters:+ - name: project+ in: path+ description: The project id.+ required: true+ schema:+ type: string+ - name: pageSize+ in: query+ description: |-+ The maximum number of service accounts to return. The service may return fewer than+ this value.+ If unspecified, at most 10 service accounts will be returned.+ The maximum value is 1000; values above 1000 will be coerced to 1000.+ schema:+ type: integer+ title: page_size+ format: int32+ description: |-+ The maximum number of service accounts to return. The service may return fewer than+ this value.+ If unspecified, at most 10 service accounts will be returned.+ The maximum value is 1000; values above 1000 will be coerced to 1000.+ - name: pageToken+ in: query+ description: |-+ A page token, received from a previous `ListServiceAccounts` call.+ Provide this to retrieve the subsequent page.++ When paginating, all other parameters provided to `ListServiceAccounts` must match+ the call that provided the page token.+ schema:+ type: string+ title: page_token+ description: |-+ A page token, received from a previous `ListServiceAccounts` call.+ Provide this to retrieve the subsequent page.++ When paginating, all other parameters provided to `ListServiceAccounts` must match+ the call that provided the page token.+ - name: showDeleted+ in: query+ description: Show deleted service accounts if specified.+ schema:+ type: boolean+ title: show_deleted+ description: Show deleted service accounts if specified.+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ListServiceAccountsResponse'+ post:+ tags:+ - ServiceAccountService+ summary: CreateServiceAccount+ description: |-+ Creates a new service account.+ For workspace-level: parent is empty, permission bb.serviceAccounts.create on workspace.+ For project-level: parent is projects/{project}, permission bb.serviceAccounts.create on project.+ operationId: ServiceAccountService_CreateServiceAccount+ parameters:+ - name: project+ in: path+ description: The project id.+ required: true+ schema:+ type: string+ - name: serviceAccountId+ in: query+ description: |-+ The ID to use for the service account, which will become the final component+ of the service account's email in the format: {service_account_id}@service.bytebase.com+ or {service_account_id}@{project-id}.service.bytebase.com+ required: true+ schema:+ type: string+ title: service_account_id+ description: |-+ The ID to use for the service account, which will become the final component+ of the service account's email in the format: {service_account_id}@service.bytebase.com+ or {service_account_id}@{project-id}.service.bytebase.com+ requestBody:+ description: The service account to create.+ content:+ application/json:+ schema:+ title: service_account+ description: The service account to create.+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'/v1/projects/{project}/sheets:post:tags:@@ -8174,6 +8283,115 @@ paths:application/json:schema:$ref: '#/components/schemas/bytebase.v1.Project'+ /v1/projects/{project}/workloadIdentities:+ get:+ tags:+ - WorkloadIdentityService+ summary: ListWorkloadIdentities+ description: |-+ Lists workload identities.+ For workspace-level: parent is empty, permission bb.workloadIdentities.list on workspace.+ For project-level: parent is projects/{project}, permission bb.workloadIdentities.list on project.+ operationId: WorkloadIdentityService_ListWorkloadIdentities+ parameters:+ - name: project+ in: path+ description: The project id.+ required: true+ schema:+ type: string+ - name: pageSize+ in: query+ description: |-+ The maximum number of workload identities to return. The service may return fewer than+ this value.+ If unspecified, at most 10 workload identities will be returned.+ The maximum value is 1000; values above 1000 will be coerced to 1000.+ schema:+ type: integer+ title: page_size+ format: int32+ description: |-+ The maximum number of workload identities to return. The service may return fewer than+ this value.+ If unspecified, at most 10 workload identities will be returned.+ The maximum value is 1000; values above 1000 will be coerced to 1000.+ - name: pageToken+ in: query+ description: |-+ A page token, received from a previous `ListWorkloadIdentities` call.+ Provide this to retrieve the subsequent page.++ When paginating, all other parameters provided to `ListWorkloadIdentities` must match+ the call that provided the page token.+ schema:+ type: string+ title: page_token+ description: |-+ A page token, received from a previous `ListWorkloadIdentities` call.+ Provide this to retrieve the subsequent page.++ When paginating, all other parameters provided to `ListWorkloadIdentities` must match+ the call that provided the page token.+ - name: showDeleted+ in: query+ description: Show deleted workload identities if specified.+ schema:+ type: boolean+ title: show_deleted+ description: Show deleted workload identities if specified.+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ListWorkloadIdentitiesResponse'+ post:+ tags:+ - WorkloadIdentityService+ summary: CreateWorkloadIdentity+ description: |-+ Creates a new workload identity.+ For workspace-level: parent is empty, permission bb.workloadIdentities.create on workspace.+ For project-level: parent is projects/{project}, permission bb.workloadIdentities.create on project.+ operationId: WorkloadIdentityService_CreateWorkloadIdentity+ parameters:+ - name: project+ in: path+ description: The project id.+ required: true+ schema:+ type: string+ - name: workloadIdentityId+ in: query+ description: |-+ The ID to use for the workload identity, which will become the final component+ of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.com+ or {workload_identity_id}@{project-id}.workload.bytebase.com+ required: true+ schema:+ type: string+ title: workload_identity_id+ description: |-+ The ID to use for the workload identity, which will become the final component+ of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.com+ or {workload_identity_id}@{project-id}.workload.bytebase.com+ requestBody:+ description: The workload identity to create.+ content:+ application/json:+ schema:+ title: workload_identity+ description: The workload identity to create.+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'/v1/projects/{project}:addWebhook:post:tags:@@ -8752,6 +8970,240 @@ paths:application/json:schema:$ref: '#/components/schemas/bytebase.v1.DiffMetadataResponse'+ /v1/serviceAccounts:+ get:+ tags:+ - ServiceAccountService+ summary: ListServiceAccounts+ description: |-+ Lists service accounts.+ For workspace-level: parent is empty, permission bb.serviceAccounts.list on workspace.+ For project-level: parent is projects/{project}, permission bb.serviceAccounts.list on project.+ operationId: ServiceAccountService_ListServiceAccounts2+ parameters:+ - name: parent+ in: query+ description: |-+ The parent resource.+ Format: projects/{project} for project-level, empty for workspace-level.+ schema:+ type: string+ title: parent+ description: |-+ The parent resource.+ Format: projects/{project} for project-level, empty for workspace-level.+ - name: pageSize+ in: query+ description: |-+ The maximum number of service accounts to return. The service may return fewer than+ this value.+ If unspecified, at most 10 service accounts will be returned.+ The maximum value is 1000; values above 1000 will be coerced to 1000.+ schema:+ type: integer+ title: page_size+ format: int32+ description: |-+ The maximum number of service accounts to return. The service may return fewer than+ this value.+ If unspecified, at most 10 service accounts will be returned.+ The maximum value is 1000; values above 1000 will be coerced to 1000.+ - name: pageToken+ in: query+ description: |-+ A page token, received from a previous `ListServiceAccounts` call.+ Provide this to retrieve the subsequent page.++ When paginating, all other parameters provided to `ListServiceAccounts` must match+ the call that provided the page token.+ schema:+ type: string+ title: page_token+ description: |-+ A page token, received from a previous `ListServiceAccounts` call.+ Provide this to retrieve the subsequent page.++ When paginating, all other parameters provided to `ListServiceAccounts` must match+ the call that provided the page token.+ - name: showDeleted+ in: query+ description: Show deleted service accounts if specified.+ schema:+ type: boolean+ title: show_deleted+ description: Show deleted service accounts if specified.+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ListServiceAccountsResponse'+ post:+ tags:+ - ServiceAccountService+ summary: CreateServiceAccount+ description: |-+ Creates a new service account.+ For workspace-level: parent is empty, permission bb.serviceAccounts.create on workspace.+ For project-level: parent is projects/{project}, permission bb.serviceAccounts.create on project.+ operationId: ServiceAccountService_CreateServiceAccount2+ parameters:+ - name: parent+ in: query+ description: |-+ The parent resource where this service account will be created.+ Format: projects/{project} for project-level, empty for workspace-level.+ schema:+ type: string+ title: parent+ description: |-+ The parent resource where this service account will be created.+ Format: projects/{project} for project-level, empty for workspace-level.+ - name: serviceAccountId+ in: query+ description: |-+ The ID to use for the service account, which will become the final component+ of the service account's email in the format: {service_account_id}@service.bytebase.com+ or {service_account_id}@{project-id}.service.bytebase.com+ required: true+ schema:+ type: string+ title: service_account_id+ description: |-+ The ID to use for the service account, which will become the final component+ of the service account's email in the format: {service_account_id}@service.bytebase.com+ or {service_account_id}@{project-id}.service.bytebase.com+ requestBody:+ description: The service account to create.+ content:+ application/json:+ schema:+ title: service_account+ description: The service account to create.+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'+ /v1/serviceAccounts/{serviceAccount}:+ get:+ tags:+ - ServiceAccountService+ summary: GetServiceAccount+ description: |-+ Gets a service account by name.+ Permissions required: bb.serviceAccounts.get+ operationId: ServiceAccountService_GetServiceAccount+ parameters:+ - name: serviceAccount+ in: path+ description: The serviceAccount id.+ required: true+ schema:+ type: string+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'+ delete:+ tags:+ - ServiceAccountService+ summary: DeleteServiceAccount+ description: |-+ Deletes a service account.+ Permissions required: bb.serviceAccounts.delete+ operationId: ServiceAccountService_DeleteServiceAccount+ parameters:+ - name: serviceAccount+ in: path+ description: The serviceAccount id.+ required: true+ schema:+ type: string+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/google.protobuf.Empty'+ patch:+ tags:+ - ServiceAccountService+ summary: UpdateServiceAccount+ description: |-+ Updates a service account.+ Permissions required: bb.serviceAccounts.update+ operationId: ServiceAccountService_UpdateServiceAccount+ parameters:+ - name: serviceAccount+ in: path+ description: The serviceAccount id.+ required: true+ schema:+ type: string+ - name: updateMask.paths+ in: query+ description: The set of field mask paths.+ schema:+ type: array+ items:+ type: string+ title: paths+ description: The set of field mask paths.+ requestBody:+ description: |-+ The service account to update.++ The service account's `name` field is used to identify the service account to update.+ Format: serviceAccounts/{email}+ content:+ application/json:+ schema:+ title: service_account+ description: |-+ The service account to update.++ The service account's `name` field is used to identify the service account to update.+ Format: serviceAccounts/{email}+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'+ /v1/serviceAccounts/{serviceAccount}:undelete:+ post:+ tags:+ - ServiceAccountService+ summary: UndeleteServiceAccount+ description: |-+ Restores a deleted service account.+ Permissions required: bb.serviceAccounts.undelete+ operationId: ServiceAccountService_UndeleteServiceAccount+ parameters:+ - name: serviceAccount+ in: path+ description: The serviceAccount id.+ required: true+ schema:+ type: string+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'/v1/settings:get:tags:@@ -9259,39 +9711,273 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/bytebase.v1.User'- /v1/users:batchGet:- get:+ $ref: '#/components/schemas/bytebase.v1.User'+ /v1/users:batchGet:+ get:+ tags:+ - UserService+ summary: BatchGetUsers+ description: |-+ Get the users in batch.+ Any authenticated user can batch get users.+ Permissions required: bb.users.get+ operationId: UserService_BatchGetUsers+ parameters:+ - name: names+ in: query+ description: |-+ The user names to retrieve.+ Format: users/{email}+ required: true+ schema:+ type: array+ items:+ type: string+ title: names+ description: |-+ The user names to retrieve.+ Format: users/{email}+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.BatchGetUsersResponse'+ /v1/workloadIdentities:+ get:+ tags:+ - WorkloadIdentityService+ summary: ListWorkloadIdentities+ description: |-+ Lists workload identities.+ For workspace-level: parent is empty, permission bb.workloadIdentities.list on workspace.+ For project-level: parent is projects/{project}, permission bb.workloadIdentities.list on project.+ operationId: WorkloadIdentityService_ListWorkloadIdentities2+ parameters:+ - name: parent+ in: query+ description: |-+ The parent resource.+ Format: projects/{project} for project-level, empty for workspace-level.+ schema:+ type: string+ title: parent+ description: |-+ The parent resource.+ Format: projects/{project} for project-level, empty for workspace-level.+ - name: pageSize+ in: query+ description: |-+ The maximum number of workload identities to return. The service may return fewer than+ this value.+ If unspecified, at most 10 workload identities will be returned.+ The maximum value is 1000; values above 1000 will be coerced to 1000.+ schema:+ type: integer+ title: page_size+ format: int32+ description: |-+ The maximum number of workload identities to return. The service may return fewer than+ this value.+ If unspecified, at most 10 workload identities will be returned.+ The maximum value is 1000; values above 1000 will be coerced to 1000.+ - name: pageToken+ in: query+ description: |-+ A page token, received from a previous `ListWorkloadIdentities` call.+ Provide this to retrieve the subsequent page.++ When paginating, all other parameters provided to `ListWorkloadIdentities` must match+ the call that provided the page token.+ schema:+ type: string+ title: page_token+ description: |-+ A page token, received from a previous `ListWorkloadIdentities` call.+ Provide this to retrieve the subsequent page.++ When paginating, all other parameters provided to `ListWorkloadIdentities` must match+ the call that provided the page token.+ - name: showDeleted+ in: query+ description: Show deleted workload identities if specified.+ schema:+ type: boolean+ title: show_deleted+ description: Show deleted workload identities if specified.+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.ListWorkloadIdentitiesResponse'+ post:+ tags:+ - WorkloadIdentityService+ summary: CreateWorkloadIdentity+ description: |-+ Creates a new workload identity.+ For workspace-level: parent is empty, permission bb.workloadIdentities.create on workspace.+ For project-level: parent is projects/{project}, permission bb.workloadIdentities.create on project.+ operationId: WorkloadIdentityService_CreateWorkloadIdentity2+ parameters:+ - name: parent+ in: query+ description: |-+ The parent resource where this workload identity will be created.+ Format: projects/{project} for project-level, empty for workspace-level.+ schema:+ type: string+ title: parent+ description: |-+ The parent resource where this workload identity will be created.+ Format: projects/{project} for project-level, empty for workspace-level.+ - name: workloadIdentityId+ in: query+ description: |-+ The ID to use for the workload identity, which will become the final component+ of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.com+ or {workload_identity_id}@{project-id}.workload.bytebase.com+ required: true+ schema:+ type: string+ title: workload_identity_id+ description: |-+ The ID to use for the workload identity, which will become the final component+ of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.com+ or {workload_identity_id}@{project-id}.workload.bytebase.com+ requestBody:+ description: The workload identity to create.+ content:+ application/json:+ schema:+ title: workload_identity+ description: The workload identity to create.+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'+ /v1/workloadIdentities/{workloadIdentity}:+ get:+ tags:+ - WorkloadIdentityService+ summary: GetWorkloadIdentity+ description: |-+ Gets a workload identity by name.+ Permissions required: bb.workloadIdentities.get+ operationId: WorkloadIdentityService_GetWorkloadIdentity+ parameters:+ - name: workloadIdentity+ in: path+ description: The workloadIdentity id.+ required: true+ schema:+ type: string+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'+ delete:+ tags:+ - WorkloadIdentityService+ summary: DeleteWorkloadIdentity+ description: |-+ Deletes a workload identity.+ Permissions required: bb.workloadIdentities.delete+ operationId: WorkloadIdentityService_DeleteWorkloadIdentity+ parameters:+ - name: workloadIdentity+ in: path+ description: The workloadIdentity id.+ required: true+ schema:+ type: string+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/google.protobuf.Empty'+ patch:+ tags:+ - WorkloadIdentityService+ summary: UpdateWorkloadIdentity+ description: |-+ Updates a workload identity.+ Permissions required: bb.workloadIdentities.update+ operationId: WorkloadIdentityService_UpdateWorkloadIdentity+ parameters:+ - name: workloadIdentity+ in: path+ description: The workloadIdentity id.+ required: true+ schema:+ type: string+ - name: updateMask.paths+ in: query+ description: The set of field mask paths.+ schema:+ type: array+ items:+ type: string+ title: paths+ description: The set of field mask paths.+ requestBody:+ description: |-+ The workload identity to update.++ The workload identity's `name` field is used to identify the workload identity to update.+ Format: workloadIdentities/{email}+ content:+ application/json:+ schema:+ title: workload_identity+ description: |-+ The workload identity to update.++ The workload identity's `name` field is used to identify the workload identity to update.+ Format: workloadIdentities/{email}+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'+ /v1/workloadIdentities/{workloadIdentity}:undelete:+ post:tags:- - UserService- summary: BatchGetUsers+ - WorkloadIdentityService+ summary: UndeleteWorkloadIdentitydescription: |-- Get the users in batch.- Any authenticated user can batch get users.- Permissions required: bb.users.get- operationId: UserService_BatchGetUsers+ Restores a deleted workload identity.+ Permissions required: bb.workloadIdentities.undelete+ operationId: WorkloadIdentityService_UndeleteWorkloadIdentityparameters:- - name: names- in: query- description: |-- The user names to retrieve.- Format: users/{email}+ - name: workloadIdentity+ in: path+ description: The workloadIdentity id.required: trueschema:- type: array- items:- type: string- title: names- description: |-- The user names to retrieve.- Format: users/{email}+ type: stringresponses:"200":description: Successcontent:application/json:schema:- $ref: '#/components/schemas/bytebase.v1.BatchGetUsersResponse'+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'/v1/worksheets:post:tags:@@ -11844,6 +12530,32 @@ components:required:- parentadditionalProperties: false+ bytebase.v1.CreateServiceAccountRequest:+ type: object+ properties:+ parent:+ type: string+ title: parent+ description: |-+ The parent resource where this service account will be created.+ Format: projects/{project} for project-level, empty for workspace-level.+ serviceAccountId:+ type: string+ title: service_account_id+ description: |-+ The ID to use for the service account, which will become the final component+ of the service account's email in the format: {service_account_id}@service.bytebase.com+ or {service_account_id}@{project-id}.service.bytebase.com+ serviceAccount:+ title: service_account+ description: The service account to create.+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'+ title: CreateServiceAccountRequest+ required:+ - serviceAccountId+ - serviceAccount+ additionalProperties: false+ description: Request message for creating a service account.bytebase.v1.CreateSheetRequest:type: objectproperties:@@ -11873,6 +12585,32 @@ components:required:- useradditionalProperties: false+ bytebase.v1.CreateWorkloadIdentityRequest:+ type: object+ properties:+ parent:+ type: string+ title: parent+ description: |-+ The parent resource where this workload identity will be created.+ Format: projects/{project} for project-level, empty for workspace-level.+ workloadIdentityId:+ type: string+ title: workload_identity_id+ description: |-+ The ID to use for the workload identity, which will become the final component+ of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.com+ or {workload_identity_id}@{project-id}.workload.bytebase.com+ workloadIdentity:+ title: workload_identity+ description: The workload identity to create.+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'+ title: CreateWorkloadIdentityRequest+ required:+ - workloadIdentityId+ - workloadIdentity+ additionalProperties: false+ description: Request message for creating a workload identity.bytebase.v1.CreateWorksheetRequest:type: objectproperties:@@ -12796,6 +13534,20 @@ components:required:- nameadditionalProperties: false+ bytebase.v1.DeleteServiceAccountRequest:+ type: object+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the service account to delete.+ Format: serviceAccounts/{email}+ title: DeleteServiceAccountRequest+ required:+ - name+ additionalProperties: false+ description: Request message for deleting a service account.bytebase.v1.DeleteUserRequest:type: objectproperties:@@ -12809,6 +13561,20 @@ components:required:- nameadditionalProperties: false+ bytebase.v1.DeleteWorkloadIdentityRequest:+ type: object+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the workload identity to delete.+ Format: workloadIdentities/{email}+ title: DeleteWorkloadIdentityRequest+ required:+ - name+ additionalProperties: false+ description: Request message for deleting a workload identity.bytebase.v1.DeleteWorksheetRequest:type: objectproperties:@@ -13854,6 +14620,20 @@ components:title: schema_stringtitle: GetSchemaStringResponseadditionalProperties: false+ bytebase.v1.GetServiceAccountRequest:+ type: object+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the service account to retrieve.+ Format: serviceAccounts/{email}+ title: GetServiceAccountRequest+ required:+ - name+ additionalProperties: false+ description: Request message for getting a service account.bytebase.v1.GetSettingRequest:type: objectproperties:@@ -13942,6 +14722,20 @@ components:required:- nameadditionalProperties: false+ bytebase.v1.GetWorkloadIdentityRequest:+ type: object+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the workload identity to retrieve.+ Format: workloadIdentities/{email}+ title: GetWorkloadIdentityRequest+ required:+ - name+ additionalProperties: false+ description: Request message for getting a workload identity.bytebase.v1.GetWorksheetRequest:type: objectproperties:@@ -15790,6 +16584,58 @@ components:If this field is omitted, there are no subsequent pages.title: ListRolloutsResponseadditionalProperties: false+ bytebase.v1.ListServiceAccountsRequest:+ type: object+ properties:+ parent:+ type: string+ title: parent+ description: |-+ The parent resource.+ Format: projects/{project} for project-level, empty for workspace-level.+ pageSize:+ type: integer+ title: page_size+ format: int32+ description: |-+ The maximum number of service accounts to return. The service may return fewer than+ this value.+ If unspecified, at most 10 service accounts will be returned.+ The maximum value is 1000; values above 1000 will be coerced to 1000.+ pageToken:+ type: string+ title: page_token+ description: |-+ A page token, received from a previous `ListServiceAccounts` call.+ Provide this to retrieve the subsequent page.++ When paginating, all other parameters provided to `ListServiceAccounts` must match+ the call that provided the page token.+ showDeleted:+ type: boolean+ title: show_deleted+ description: Show deleted service accounts if specified.+ title: ListServiceAccountsRequest+ additionalProperties: false+ description: Request message for listing service accounts.+ bytebase.v1.ListServiceAccountsResponse:+ type: object+ properties:+ serviceAccounts:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'+ title: service_accounts+ description: The service accounts from the specified request.+ nextPageToken:+ type: string+ title: next_page_token+ description: |-+ A token, which can be sent as `page_token` to retrieve the next page.+ If this field is omitted, there are no subsequent pages.+ title: ListServiceAccountsResponse+ additionalProperties: false+ description: Response message for listing service accounts.bytebase.v1.ListSettingsRequest:type: objecttitle: ListSettingsRequest@@ -15901,6 +16747,58 @@ components:If this field is omitted, there are no subsequent pages.title: ListUsersResponseadditionalProperties: false+ bytebase.v1.ListWorkloadIdentitiesRequest:+ type: object+ properties:+ parent:+ type: string+ title: parent+ description: |-+ The parent resource.+ Format: projects/{project} for project-level, empty for workspace-level.+ pageSize:+ type: integer+ title: page_size+ format: int32+ description: |-+ The maximum number of workload identities to return. The service may return fewer than+ this value.+ If unspecified, at most 10 workload identities will be returned.+ The maximum value is 1000; values above 1000 will be coerced to 1000.+ pageToken:+ type: string+ title: page_token+ description: |-+ A page token, received from a previous `ListWorkloadIdentities` call.+ Provide this to retrieve the subsequent page.++ When paginating, all other parameters provided to `ListWorkloadIdentities` must match+ the call that provided the page token.+ showDeleted:+ type: boolean+ title: show_deleted+ description: Show deleted workload identities if specified.+ title: ListWorkloadIdentitiesRequest+ additionalProperties: false+ description: Request message for listing workload identities.+ bytebase.v1.ListWorkloadIdentitiesResponse:+ type: object+ properties:+ workloadIdentities:+ type: array+ items:+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'+ title: workload_identities+ description: The workload identities from the specified request.+ nextPageToken:+ type: string+ title: next_page_token+ description: |-+ A token, which can be sent as `page_token` to retrieve the next page.+ If this field is omitted, there are no subsequent pages.+ title: ListWorkloadIdentitiesResponse+ additionalProperties: false+ description: Response message for listing workload identities.bytebase.v1.LoginRequest:type: objectproperties:@@ -19015,6 +19913,46 @@ components:description: Whether to skip this sequence during schema dump operations.title: SequenceMetadataadditionalProperties: false+ bytebase.v1.ServiceAccount:+ type: object+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the service account.+ Format: serviceAccounts/{email}+ readOnly: true+ state:+ title: state+ description: The state of the service account.+ $ref: '#/components/schemas/bytebase.v1.State'+ email:+ type: string+ title: email+ description: |-+ The email of the service account.+ For workspace-level: {name}@service.bytebase.com+ For project-level: {name}@{project-id}.service.bytebase.com+ readOnly: true+ title:+ type: string+ title: title+ maxLength: 200+ description: The display title of the service account.+ serviceKey:+ type: string+ title: service_key+ description: The service key for authentication. Only returned on creation or key rotation.+ readOnly: true+ createTime:+ title: create_time+ description: The timestamp when the service account was created.+ readOnly: true+ $ref: '#/components/schemas/google.protobuf.Timestamp'+ title: ServiceAccount+ additionalProperties: false+ description: ServiceAccount represents an API integration account.bytebase.v1.SetIamPolicyRequest:type: objectproperties:@@ -20674,6 +21612,20 @@ components:required:- nameadditionalProperties: false+ bytebase.v1.UndeleteServiceAccountRequest:+ type: object+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the deleted service account.+ Format: serviceAccounts/{email}+ title: UndeleteServiceAccountRequest+ required:+ - name+ additionalProperties: false+ description: Request message for restoring a deleted service account.bytebase.v1.UndeleteUserRequest:type: objectproperties:@@ -20687,6 +21639,20 @@ components:required:- nameadditionalProperties: false+ bytebase.v1.UndeleteWorkloadIdentityRequest:+ type: object+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the deleted workload identity.+ Format: workloadIdentities/{email}+ title: UndeleteWorkloadIdentityRequest+ required:+ - name+ additionalProperties: false+ description: Request message for restoring a deleted workload identity.bytebase.v1.UpdateDataSourceRequest:type: objectproperties:@@ -21081,6 +22047,28 @@ components:required:- roleadditionalProperties: false+ bytebase.v1.UpdateServiceAccountRequest:+ type: object+ properties:+ serviceAccount:+ title: service_account+ description: |-+ The service account to update.++ The service account's `name` field is used to identify the service account to update.+ Format: serviceAccounts/{email}+ $ref: '#/components/schemas/bytebase.v1.ServiceAccount'+ updateMask:+ title: update_mask+ description: |-+ The list of fields to update.+ Supported fields: title, service_key (triggers key rotation)+ $ref: '#/components/schemas/google.protobuf.FieldMask'+ title: UpdateServiceAccountRequest+ required:+ - serviceAccount+ additionalProperties: false+ description: Request message for updating a service account.bytebase.v1.UpdateSettingRequest:type: objectproperties:@@ -21181,6 +22169,28 @@ components:required:- webhookadditionalProperties: false+ bytebase.v1.UpdateWorkloadIdentityRequest:+ type: object+ properties:+ workloadIdentity:+ title: workload_identity+ description: |-+ The workload identity to update.++ The workload identity's `name` field is used to identify the workload identity to update.+ Format: workloadIdentities/{email}+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentity'+ updateMask:+ title: update_mask+ description: |-+ The list of fields to update.+ Supported fields: title, workload_identity_config+ $ref: '#/components/schemas/google.protobuf.FieldMask'+ title: UpdateWorkloadIdentityRequest+ required:+ - workloadIdentity+ additionalProperties: false+ description: Request message for updating a workload identity.bytebase.v1.UpdateWorksheetOrganizerRequest:type: objectproperties:@@ -21456,6 +22466,45 @@ components:- WECOM- LARKdescription: Webhook integration type.+ bytebase.v1.WorkloadIdentity:+ type: object+ properties:+ name:+ type: string+ title: name+ description: |-+ The name of the workload identity.+ Format: workloadIdentities/{email}+ readOnly: true+ state:+ title: state+ description: The state of the workload identity.+ $ref: '#/components/schemas/bytebase.v1.State'+ email:+ type: string+ title: email+ description: |-+ The email of the workload identity.+ For workspace-level: {name}@workload.bytebase.com+ For project-level: {name}@{project-id}.workload.bytebase.com+ readOnly: true+ title:+ type: string+ title: title+ maxLength: 200+ description: The display title of the workload identity.+ createTime:+ title: create_time+ description: The timestamp when the workload identity was created.+ readOnly: true+ $ref: '#/components/schemas/google.protobuf.Timestamp'+ workloadIdentityConfig:+ title: workload_identity_config+ description: The workload identity configuration for OIDC token validation.+ $ref: '#/components/schemas/bytebase.v1.WorkloadIdentityConfig'+ title: WorkloadIdentity+ additionalProperties: false+ description: WorkloadIdentity represents an external CI/CD workload identity.bytebase.v1.WorkloadIdentityConfig:type: objectproperties:@@ -22853,10 +23902,14 @@ tags:description: RoleService manages workspace roles and permissions.- name: RolloutServicedescription: RolloutService manages the execution of deployment plans.+ - name: ServiceAccountService+ description: ServiceAccountService manages service accounts for API integrations.- name: SheetServicedescription: SheetService manages SQL scripts and saved queries.- name: SubscriptionServicedescription: SubscriptionService manages enterprise subscriptions and licensing.+ - name: WorkloadIdentityService+ description: WorkloadIdentityService manages workload identities for external CI/CD integrations.- name: WorksheetServicedescription: WorksheetService manages SQL worksheets for query development.- name: WorkspaceServicediff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 1718238c52..67fb782118 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -624,6 +624,18 @@- [RolloutService](#bytebase-v1-RolloutService)+- [v1/service_account_service.proto](#v1_service_account_service-proto)+ - [CreateServiceAccountRequest](#bytebase-v1-CreateServiceAccountRequest)+ - [DeleteServiceAccountRequest](#bytebase-v1-DeleteServiceAccountRequest)+ - [GetServiceAccountRequest](#bytebase-v1-GetServiceAccountRequest)+ - [ListServiceAccountsRequest](#bytebase-v1-ListServiceAccountsRequest)+ - [ListServiceAccountsResponse](#bytebase-v1-ListServiceAccountsResponse)+ - [ServiceAccount](#bytebase-v1-ServiceAccount)+ - [UndeleteServiceAccountRequest](#bytebase-v1-UndeleteServiceAccountRequest)+ - [UpdateServiceAccountRequest](#bytebase-v1-UpdateServiceAccountRequest)++ - [ServiceAccountService](#bytebase-v1-ServiceAccountService)+- [v1/sheet_service.proto](#v1_sheet_service-proto)- [BatchCreateSheetsRequest](#bytebase-v1-BatchCreateSheetsRequest)- [BatchCreateSheetsResponse](#bytebase-v1-BatchCreateSheetsResponse)@@ -645,6 +657,18 @@- [SubscriptionService](#bytebase-v1-SubscriptionService)+- [v1/workload_identity_service.proto](#v1_workload_identity_service-proto)+ - [CreateWorkloadIdentityRequest](#bytebase-v1-CreateWorkloadIdentityRequest)+ - [DeleteWorkloadIdentityRequest](#bytebase-v1-DeleteWorkloadIdentityRequest)+ - [GetWorkloadIdentityRequest](#bytebase-v1-GetWorkloadIdentityRequest)+ - [ListWorkloadIdentitiesRequest](#bytebase-v1-ListWorkloadIdentitiesRequest)+ - [ListWorkloadIdentitiesResponse](#bytebase-v1-ListWorkloadIdentitiesResponse)+ - [UndeleteWorkloadIdentityRequest](#bytebase-v1-UndeleteWorkloadIdentityRequest)+ - [UpdateWorkloadIdentityRequest](#bytebase-v1-UpdateWorkloadIdentityRequest)+ - [WorkloadIdentity](#bytebase-v1-WorkloadIdentity)++ - [WorkloadIdentityService](#bytebase-v1-WorkloadIdentityService)+- [v1/worksheet_service.proto](#v1_worksheet_service-proto)- [BatchUpdateWorksheetOrganizerRequest](#bytebase-v1-BatchUpdateWorksheetOrganizerRequest)- [BatchUpdateWorksheetOrganizerResponse](#bytebase-v1-BatchUpdateWorksheetOrganizerResponse)@@ -10169,6 +10193,173 @@ RolloutService manages the execution of deployment plans.+<a name="v1_service_account_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>++## v1/service_account_service.proto++++<a name="bytebase-v1-CreateServiceAccountRequest"></a>++### CreateServiceAccountRequest+Request message for creating a service account.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| parent | [string](#string) | | The parent resource where this service account will be created. Format: projects/{project} for project-level, empty for workspace-level. |+| service_account_id | [string](#string) | | The ID to use for the service account, which will become the final component of the service account's email in the format: {service_account_id}@service.bytebase.com or {service_account_id}@{project-id}.service.bytebase.com |+| service_account | [ServiceAccount](#bytebase-v1-ServiceAccount) | | The service account to create. |+++++++<a name="bytebase-v1-DeleteServiceAccountRequest"></a>++### DeleteServiceAccountRequest+Request message for deleting a service account.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the service account to delete. Format: serviceAccounts/{email} |+++++++<a name="bytebase-v1-GetServiceAccountRequest"></a>++### GetServiceAccountRequest+Request message for getting a service account.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the service account to retrieve. Format: serviceAccounts/{email} |+++++++<a name="bytebase-v1-ListServiceAccountsRequest"></a>++### ListServiceAccountsRequest+Request message for listing service accounts.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| parent | [string](#string) | | The parent resource. Format: projects/{project} for project-level, empty for workspace-level. |+| page_size | [int32](#int32) | | The maximum number of service accounts to return. The service may return fewer than this value. If unspecified, at most 10 service accounts will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |+| page_token | [string](#string) | | A page token, received from a previous `ListServiceAccounts` call. Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListServiceAccounts` must match the call that provided the page token. |+| show_deleted | [bool](#bool) | | Show deleted service accounts if specified. |+++++++<a name="bytebase-v1-ListServiceAccountsResponse"></a>++### ListServiceAccountsResponse+Response message for listing service accounts.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| service_accounts | [ServiceAccount](#bytebase-v1-ServiceAccount) | repeated | The service accounts from the specified request. |+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |+++++++<a name="bytebase-v1-ServiceAccount"></a>++### ServiceAccount+ServiceAccount represents an API integration account.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the service account. Format: serviceAccounts/{email} |+| state | [State](#bytebase-v1-State) | | The state of the service account. |+| email | [string](#string) | | The email of the service account. For workspace-level: {name}@service.bytebase.com For project-level: {name}@{project-id}.service.bytebase.com |+| title | [string](#string) | | The display title of the service account. |+| service_key | [string](#string) | | The service key for authentication. Only returned on creation or key rotation. |+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the service account was created. |+++++++<a name="bytebase-v1-UndeleteServiceAccountRequest"></a>++### UndeleteServiceAccountRequest+Request message for restoring a deleted service account.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the deleted service account. Format: serviceAccounts/{email} |+++++++<a name="bytebase-v1-UpdateServiceAccountRequest"></a>++### UpdateServiceAccountRequest+Request message for updating a service account.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| service_account | [ServiceAccount](#bytebase-v1-ServiceAccount) | | The service account to update.++The service account's `name` field is used to identify the service account to update. Format: serviceAccounts/{email} |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. Supported fields: title, service_key (triggers key rotation) |+++++++++++++<a name="bytebase-v1-ServiceAccountService"></a>++### ServiceAccountService+ServiceAccountService manages service accounts for API integrations.++| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| CreateServiceAccount | [CreateServiceAccountRequest](#bytebase-v1-CreateServiceAccountRequest) | [ServiceAccount](#bytebase-v1-ServiceAccount) | Creates a new service account. For workspace-level: parent is empty, permission bb.serviceAccounts.create on workspace. For project-level: parent is projects/{project}, permission bb.serviceAccounts.create on project. |+| GetServiceAccount | [GetServiceAccountRequest](#bytebase-v1-GetServiceAccountRequest) | [ServiceAccount](#bytebase-v1-ServiceAccount) | Gets a service account by name. Permissions required: bb.serviceAccounts.get |+| ListServiceAccounts | [ListServiceAccountsRequest](#bytebase-v1-ListServiceAccountsRequest) | [ListServiceAccountsResponse](#bytebase-v1-ListServiceAccountsResponse) | Lists service accounts. For workspace-level: parent is empty, permission bb.serviceAccounts.list on workspace. For project-level: parent is projects/{project}, permission bb.serviceAccounts.list on project. |+| UpdateServiceAccount | [UpdateServiceAccountRequest](#bytebase-v1-UpdateServiceAccountRequest) | [ServiceAccount](#bytebase-v1-ServiceAccount) | Updates a service account. Permissions required: bb.serviceAccounts.update |+| DeleteServiceAccount | [DeleteServiceAccountRequest](#bytebase-v1-DeleteServiceAccountRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a service account. Permissions required: bb.serviceAccounts.delete |+| UndeleteServiceAccount | [UndeleteServiceAccountRequest](#bytebase-v1-UndeleteServiceAccountRequest) | [ServiceAccount](#bytebase-v1-ServiceAccount) | Restores a deleted service account. Permissions required: bb.serviceAccounts.undelete |+++++<a name="v1_sheet_service-proto"></a><p align="right"><a href="#top">Top</a></p>@@ -10481,6 +10672,173 @@ SubscriptionService manages enterprise subscriptions and licensing.+<a name="v1_workload_identity_service-proto"></a>+<p align="right"><a href="#top">Top</a></p>++## v1/workload_identity_service.proto++++<a name="bytebase-v1-CreateWorkloadIdentityRequest"></a>++### CreateWorkloadIdentityRequest+Request message for creating a workload identity.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| parent | [string](#string) | | The parent resource where this workload identity will be created. Format: projects/{project} for project-level, empty for workspace-level. |+| workload_identity_id | [string](#string) | | The ID to use for the workload identity, which will become the final component of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.com or {workload_identity_id}@{project-id}.workload.bytebase.com |+| workload_identity | [WorkloadIdentity](#bytebase-v1-WorkloadIdentity) | | The workload identity to create. |+++++++<a name="bytebase-v1-DeleteWorkloadIdentityRequest"></a>++### DeleteWorkloadIdentityRequest+Request message for deleting a workload identity.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the workload identity to delete. Format: workloadIdentities/{email} |+++++++<a name="bytebase-v1-GetWorkloadIdentityRequest"></a>++### GetWorkloadIdentityRequest+Request message for getting a workload identity.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the workload identity to retrieve. Format: workloadIdentities/{email} |+++++++<a name="bytebase-v1-ListWorkloadIdentitiesRequest"></a>++### ListWorkloadIdentitiesRequest+Request message for listing workload identities.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| parent | [string](#string) | | The parent resource. Format: projects/{project} for project-level, empty for workspace-level. |+| page_size | [int32](#int32) | | The maximum number of workload identities to return. The service may return fewer than this value. If unspecified, at most 10 workload identities will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |+| page_token | [string](#string) | | A page token, received from a previous `ListWorkloadIdentities` call. Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListWorkloadIdentities` must match the call that provided the page token. |+| show_deleted | [bool](#bool) | | Show deleted workload identities if specified. |+++++++<a name="bytebase-v1-ListWorkloadIdentitiesResponse"></a>++### ListWorkloadIdentitiesResponse+Response message for listing workload identities.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| workload_identities | [WorkloadIdentity](#bytebase-v1-WorkloadIdentity) | repeated | The workload identities from the specified request. |+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |+++++++<a name="bytebase-v1-UndeleteWorkloadIdentityRequest"></a>++### UndeleteWorkloadIdentityRequest+Request message for restoring a deleted workload identity.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the deleted workload identity. Format: workloadIdentities/{email} |+++++++<a name="bytebase-v1-UpdateWorkloadIdentityRequest"></a>++### UpdateWorkloadIdentityRequest+Request message for updating a workload identity.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| workload_identity | [WorkloadIdentity](#bytebase-v1-WorkloadIdentity) | | The workload identity to update.++The workload identity's `name` field is used to identify the workload identity to update. Format: workloadIdentities/{email} |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. Supported fields: title, workload_identity_config |+++++++<a name="bytebase-v1-WorkloadIdentity"></a>++### WorkloadIdentity+WorkloadIdentity represents an external CI/CD workload identity.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the workload identity. Format: workloadIdentities/{email} |+| state | [State](#bytebase-v1-State) | | The state of the workload identity. |+| email | [string](#string) | | The email of the workload identity. For workspace-level: {name}@workload.bytebase.com For project-level: {name}@{project-id}.workload.bytebase.com |+| title | [string](#string) | | The display title of the workload identity. |+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp when the workload identity was created. |+| workload_identity_config | [WorkloadIdentityConfig](#bytebase-v1-WorkloadIdentityConfig) | | The workload identity configuration for OIDC token validation. |+++++++++++++<a name="bytebase-v1-WorkloadIdentityService"></a>++### WorkloadIdentityService+WorkloadIdentityService manages workload identities for external CI/CD integrations.++| Method Name | Request Type | Response Type | Description |+| ----------- | ------------ | ------------- | ------------|+| CreateWorkloadIdentity | [CreateWorkloadIdentityRequest](#bytebase-v1-CreateWorkloadIdentityRequest) | [WorkloadIdentity](#bytebase-v1-WorkloadIdentity) | Creates a new workload identity. For workspace-level: parent is empty, permission bb.workloadIdentities.create on workspace. For project-level: parent is projects/{project}, permission bb.workloadIdentities.create on project. |+| GetWorkloadIdentity | [GetWorkloadIdentityRequest](#bytebase-v1-GetWorkloadIdentityRequest) | [WorkloadIdentity](#bytebase-v1-WorkloadIdentity) | Gets a workload identity by name. Permissions required: bb.workloadIdentities.get |+| ListWorkloadIdentities | [ListWorkloadIdentitiesRequest](#bytebase-v1-ListWorkloadIdentitiesRequest) | [ListWorkloadIdentitiesResponse](#bytebase-v1-ListWorkloadIdentitiesResponse) | Lists workload identities. For workspace-level: parent is empty, permission bb.workloadIdentities.list on workspace. For project-level: parent is projects/{project}, permission bb.workloadIdentities.list on project. |+| UpdateWorkloadIdentity | [UpdateWorkloadIdentityRequest](#bytebase-v1-UpdateWorkloadIdentityRequest) | [WorkloadIdentity](#bytebase-v1-WorkloadIdentity) | Updates a workload identity. Permissions required: bb.workloadIdentities.update |+| DeleteWorkloadIdentity | [DeleteWorkloadIdentityRequest](#bytebase-v1-DeleteWorkloadIdentityRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Deletes a workload identity. Permissions required: bb.workloadIdentities.delete |+| UndeleteWorkloadIdentity | [UndeleteWorkloadIdentityRequest](#bytebase-v1-UndeleteWorkloadIdentityRequest) | [WorkloadIdentity](#bytebase-v1-WorkloadIdentity) | Restores a deleted workload identity. Permissions required: bb.workloadIdentities.undelete |+++++<a name="v1_worksheet_service-proto"></a><p align="right"><a href="#top">Top</a></p>diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 4b265199fb..38dfc6ff0b 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -2556,6 +2556,53 @@</li>+ <li>+ <a href="#v1%2fservice_account_service.proto">v1/service_account_service.proto</a>+ <ul>++ <li>+ <a href="#bytebase.v1.CreateServiceAccountRequest"><span class="badge">M</span>CreateServiceAccountRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.DeleteServiceAccountRequest"><span class="badge">M</span>DeleteServiceAccountRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.GetServiceAccountRequest"><span class="badge">M</span>GetServiceAccountRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.ListServiceAccountsRequest"><span class="badge">M</span>ListServiceAccountsRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.ListServiceAccountsResponse"><span class="badge">M</span>ListServiceAccountsResponse</a>+ </li>++ <li>+ <a href="#bytebase.v1.ServiceAccount"><span class="badge">M</span>ServiceAccount</a>+ </li>++ <li>+ <a href="#bytebase.v1.UndeleteServiceAccountRequest"><span class="badge">M</span>UndeleteServiceAccountRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.UpdateServiceAccountRequest"><span class="badge">M</span>UpdateServiceAccountRequest</a>+ </li>+++++ <li>+ <a href="#bytebase.v1.ServiceAccountService"><span class="badge">S</span>ServiceAccountService</a>+ </li>++ </ul>+ </li>++<li><a href="#v1%2fsheet_service.proto">v1/sheet_service.proto</a><ul>@@ -2634,6 +2681,53 @@</li>+ <li>+ <a href="#v1%2fworkload_identity_service.proto">v1/workload_identity_service.proto</a>+ <ul>++ <li>+ <a href="#bytebase.v1.CreateWorkloadIdentityRequest"><span class="badge">M</span>CreateWorkloadIdentityRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.DeleteWorkloadIdentityRequest"><span class="badge">M</span>DeleteWorkloadIdentityRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.GetWorkloadIdentityRequest"><span class="badge">M</span>GetWorkloadIdentityRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.ListWorkloadIdentitiesRequest"><span class="badge">M</span>ListWorkloadIdentitiesRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.ListWorkloadIdentitiesResponse"><span class="badge">M</span>ListWorkloadIdentitiesResponse</a>+ </li>++ <li>+ <a href="#bytebase.v1.UndeleteWorkloadIdentityRequest"><span class="badge">M</span>UndeleteWorkloadIdentityRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.UpdateWorkloadIdentityRequest"><span class="badge">M</span>UpdateWorkloadIdentityRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.WorkloadIdentity"><span class="badge">M</span>WorkloadIdentity</a>+ </li>+++++ <li>+ <a href="#bytebase.v1.WorkloadIdentityService"><span class="badge">S</span>WorkloadIdentityService</a>+ </li>++ </ul>+ </li>++<li><a href="#v1%2fworksheet_service.proto">v1/worksheet_service.proto</a><ul>@@ -28608,13 +28702,13 @@ Permissions required: bb.taskRuns.list</p></td><div class="file-heading">- <h2 id="v1/sheet_service.proto">v1/sheet_service.proto</h2><a href="#title">Top</a>+ <h2 id="v1/service_account_service.proto">v1/service_account_service.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.v1.BatchCreateSheetsRequest">BatchCreateSheetsRequest</h3>- <p></p>+ <h3 id="bytebase.v1.CreateServiceAccountRequest">CreateServiceAccountRequest</h3>+ <p>Request message for creating a service account.</p><table class="field-table">@@ -28627,15 +28721,24 @@ Permissions required: bb.taskRuns.list</p></td><td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The parent resource where all sheets will be created.-Format: projects/{project} </p></td>+ <td><p>The parent resource where this service account will be created.+Format: projects/{project} for project-level, empty for workspace-level. </p></td></tr><tr>- <td>requests</td>- <td><a href="#bytebase.v1.CreateSheetRequest">CreateSheetRequest</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td>service_account_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The ID to use for the service account, which will become the final component+of the service account's email in the format: {service_account_id}@service.bytebase.com+or {service_account_id}@{project-id}.service.bytebase.com </p></td>+ </tr>++ <tr>+ <td>service_account</td>+ <td><a href="#bytebase.v1.ServiceAccount">ServiceAccount</a></td>+ <td></td>+ <td><p>The service account to create. </p></td></tr></tbody>@@ -28645,8 +28748,8 @@ Format: projects/{project} </p></td>- <h3 id="bytebase.v1.BatchCreateSheetsResponse">BatchCreateSheetsResponse</h3>- <p></p>+ <h3 id="bytebase.v1.DeleteServiceAccountRequest">DeleteServiceAccountRequest</h3>+ <p>Request message for deleting a service account.</p><table class="field-table">@@ -28656,10 +28759,11 @@ Format: projects/{project} </p></td><tbody><tr>- <td>sheets</td>- <td><a href="#bytebase.v1.Sheet">Sheet</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the service account to delete.+Format: serviceAccounts/{email} </p></td></tr></tbody>@@ -28669,8 +28773,33 @@ Format: projects/{project} </p></td>- <h3 id="bytebase.v1.CreateSheetRequest">CreateSheetRequest</h3>- <p></p>+ <h3 id="bytebase.v1.GetServiceAccountRequest">GetServiceAccountRequest</h3>+ <p>Request message for getting a service account.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the service account to retrieve.+Format: serviceAccounts/{email} </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ListServiceAccountsRequest">ListServiceAccountsRequest</h3>+ <p>Request message for listing service accounts.</p><table class="field-table">@@ -28683,15 +28812,36 @@ Format: projects/{project} </p></td><td>parent</td><td><a href="#string">string</a></td><td></td>- <td><p>The parent resource where this sheet will be created.-Format: projects/{project} </p></td>+ <td><p>The parent resource.+Format: projects/{project} for project-level, empty for workspace-level. </p></td></tr><tr>- <td>sheet</td>- <td><a href="#bytebase.v1.Sheet">Sheet</a></td>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The sheet to create. </p></td>+ <td><p>The maximum number of service accounts to return. The service may return fewer than+this value.+If unspecified, at most 10 service accounts will be returned.+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>+ </tr>++ <tr>+ <td>page_token</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>A page token, received from a previous `ListServiceAccounts` call.+Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListServiceAccounts` must match+the call that provided the page token. </p></td>+ </tr>++ <tr>+ <td>show_deleted</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Show deleted service accounts if specified. </p></td></tr></tbody>@@ -28701,8 +28851,40 @@ Format: projects/{project} </p></td>- <h3 id="bytebase.v1.GetSheetRequest">GetSheetRequest</h3>- <p></p>+ <h3 id="bytebase.v1.ListServiceAccountsResponse">ListServiceAccountsResponse</h3>+ <p>Response message for listing service accounts.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>service_accounts</td>+ <td><a href="#bytebase.v1.ServiceAccount">ServiceAccount</a></td>+ <td>repeated</td>+ <td><p>The service accounts from the specified request. </p></td>+ </tr>++ <tr>+ <td>next_page_token</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.+If this field is omitted, there are no subsequent pages. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ServiceAccount">ServiceAccount</h3>+ <p>ServiceAccount represents an API integration account.</p><table class="field-table">@@ -28715,15 +28897,45 @@ Format: projects/{project} </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the sheet to retrieve.-Format: projects/{project}/sheets/{sheet} </p></td>+ <td><p>The name of the service account.+Format: serviceAccounts/{email} </p></td></tr><tr>- <td>raw</td>- <td><a href="#bool">bool</a></td>+ <td>state</td>+ <td><a href="#bytebase.v1.State">State</a></td><td></td>- <td><p>By default, the content of the sheet is cut off, set the `raw` to true to retrieve the full content. </p></td>+ <td><p>The state of the service account. </p></td>+ </tr>++ <tr>+ <td>email</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The email of the service account.+For workspace-level: {name}@service.bytebase.com+For project-level: {name}@{project-id}.service.bytebase.com </p></td>+ </tr>++ <tr>+ <td>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The display title of the service account. </p></td>+ </tr>++ <tr>+ <td>service_key</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The service key for authentication. Only returned on creation or key rotation. </p></td>+ </tr>++ <tr>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>The timestamp when the service account was created. </p></td></tr></tbody>@@ -28733,8 +28945,8 @@ Format: projects/{project}/sheets/{sheet} </p></td>- <h3 id="bytebase.v1.Sheet">Sheet</h3>- <p></p>+ <h3 id="bytebase.v1.UndeleteServiceAccountRequest">UndeleteServiceAccountRequest</h3>+ <p>Request message for restoring a deleted service account.</p><table class="field-table">@@ -28747,25 +28959,43 @@ Format: projects/{project}/sheets/{sheet} </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the sheet resource.-Format: projects/{project}/sheets/{sheet}-The sheet ID is generated by the server on creation and cannot be changed. </p></td>+ <td><p>The name of the deleted service account.+Format: serviceAccounts/{email} </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.UpdateServiceAccountRequest">UpdateServiceAccountRequest</h3>+ <p>Request message for updating a service account.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>content</td>- <td><a href="#bytes">bytes</a></td>+ <td>service_account</td>+ <td><a href="#bytebase.v1.ServiceAccount">ServiceAccount</a></td><td></td>- <td><p>The content of the sheet.-By default, it will be cut off, if it doesn't match the `content_size`, you can-set the `raw` to true in GetSheet request to retrieve the full content. </p></td>+ <td><p>The service account to update.++The service account's `name` field is used to identify the service account to update.+Format: serviceAccounts/{email} </p></td></tr><tr>- <td>content_size</td>- <td><a href="#int64">int64</a></td>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td><td></td>- <td><p>content_size is the full size of the content, may not match the size of the `content` field. </p></td>+ <td><p>The list of fields to update.+Supported fields: title, service_key (triggers key rotation) </p></td></tr></tbody>@@ -28781,8 +29011,8 @@ set the `raw` to true in GetSheet request to retrieve the full content. </p></td- <h3 id="bytebase.v1.SheetService">SheetService</h3>- <p>SheetService manages SQL scripts and saved queries.</p>+ <h3 id="bytebase.v1.ServiceAccountService">ServiceAccountService</h3>+ <p>ServiceAccountService manages service accounts for API integrations.</p><table class="enum-table"><thead><tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>@@ -28790,32 +29020,58 @@ set the `raw` to true in GetSheet request to retrieve the full content. </p></td<tbody><tr>- <td>CreateSheet</td>- <td><a href="#bytebase.v1.CreateSheetRequest">CreateSheetRequest</a></td>- <td><a href="#bytebase.v1.Sheet">Sheet</a></td>- <td><p>Creates a new SQL sheet.-Permissions required: bb.sheets.create</p></td>+ <td>CreateServiceAccount</td>+ <td><a href="#bytebase.v1.CreateServiceAccountRequest">CreateServiceAccountRequest</a></td>+ <td><a href="#bytebase.v1.ServiceAccount">ServiceAccount</a></td>+ <td><p>Creates a new service account.+For workspace-level: parent is empty, permission bb.serviceAccounts.create on workspace.+For project-level: parent is projects/{project}, permission bb.serviceAccounts.create on project.</p></td></tr><tr>- <td>BatchCreateSheets</td>- <td><a href="#bytebase.v1.BatchCreateSheetsRequest">BatchCreateSheetsRequest</a></td>- <td><a href="#bytebase.v1.BatchCreateSheetsResponse">BatchCreateSheetsResponse</a></td>- <td><p>Creates multiple SQL sheets in a single operation.-Permissions required: bb.sheets.create</p></td>+ <td>GetServiceAccount</td>+ <td><a href="#bytebase.v1.GetServiceAccountRequest">GetServiceAccountRequest</a></td>+ <td><a href="#bytebase.v1.ServiceAccount">ServiceAccount</a></td>+ <td><p>Gets a service account by name.+Permissions required: bb.serviceAccounts.get</p></td></tr><tr>- <td>GetSheet</td>- <td><a href="#bytebase.v1.GetSheetRequest">GetSheetRequest</a></td>- <td><a href="#bytebase.v1.Sheet">Sheet</a></td>- <td><p>Retrieves a SQL sheet by name.-Permissions required: bb.sheets.get</p></td>+ <td>ListServiceAccounts</td>+ <td><a href="#bytebase.v1.ListServiceAccountsRequest">ListServiceAccountsRequest</a></td>+ <td><a href="#bytebase.v1.ListServiceAccountsResponse">ListServiceAccountsResponse</a></td>+ <td><p>Lists service accounts.+For workspace-level: parent is empty, permission bb.serviceAccounts.list on workspace.+For project-level: parent is projects/{project}, permission bb.serviceAccounts.list on project.</p></td></tr>- </tbody>- </table>-+ <tr>+ <td>UpdateServiceAccount</td>+ <td><a href="#bytebase.v1.UpdateServiceAccountRequest">UpdateServiceAccountRequest</a></td>+ <td><a href="#bytebase.v1.ServiceAccount">ServiceAccount</a></td>+ <td><p>Updates a service account.+Permissions required: bb.serviceAccounts.update</p></td>+ </tr>++ <tr>+ <td>DeleteServiceAccount</td>+ <td><a href="#bytebase.v1.DeleteServiceAccountRequest">DeleteServiceAccountRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Deletes a service account.+Permissions required: bb.serviceAccounts.delete</p></td>+ </tr>++ <tr>+ <td>UndeleteServiceAccount</td>+ <td><a href="#bytebase.v1.UndeleteServiceAccountRequest">UndeleteServiceAccountRequest</a></td>+ <td><a href="#bytebase.v1.ServiceAccount">ServiceAccount</a></td>+ <td><p>Restores a deleted service account.+Permissions required: bb.serviceAccounts.undelete</p></td>+ </tr>++ </tbody>+ </table>+@@ -28834,33 +29090,77 @@ Permissions required: bb.sheets.get</p></td><tr>- <td>CreateSheet</td>+ <td>CreateServiceAccount</td><td>POST</td>- <td>/v1/{parent=projects/*}/sheets</td>- <td>sheet</td>+ <td>/v1/{parent=projects/*}/serviceAccounts</td>+ <td>service_account</td>+ </tr>++ <tr>+ <td>CreateServiceAccount</td>+ <td>POST</td>+ <td>/v1/serviceAccounts</td>+ <td>service_account</td></tr><tr>- <td>BatchCreateSheets</td>- <td>POST</td>- <td>/v1/{parent=projects/*}/sheets:batchCreate</td>- <td>*</td>+ <td>GetServiceAccount</td>+ <td>GET</td>+ <td>/v1/{name=serviceAccounts/*}</td>+ <td></td></tr><tr>- <td>GetSheet</td>+ <td>ListServiceAccounts</td><td>GET</td>- <td>/v1/{name=projects/*/sheets/*}</td>+ <td>/v1/{parent=projects/*}/serviceAccounts</td>+ <td></td>+ </tr>++ <tr>+ <td>ListServiceAccounts</td>+ <td>GET</td>+ <td>/v1/serviceAccounts</td>+ <td></td>+ </tr>+++++ <tr>+ <td>UpdateServiceAccount</td>+ <td>PATCH</td>+ <td>/v1/{service_account.name=serviceAccounts/*}</td>+ <td>service_account</td>+ </tr>+++++ <tr>+ <td>DeleteServiceAccount</td>+ <td>DELETE</td>+ <td>/v1/{name=serviceAccounts/*}</td><td></td></tr>+++ <tr>+ <td>UndeleteServiceAccount</td>+ <td>POST</td>+ <td>/v1/{name=serviceAccounts/*}:undelete</td>+ <td>*</td>+ </tr>++</tbody></table>@@ -28868,22 +29168,15 @@ Permissions required: bb.sheets.get</p></td><div class="file-heading">- <h2 id="v1/subscription_service.proto">v1/subscription_service.proto</h2><a href="#title">Top</a>+ <h2 id="v1/sheet_service.proto">v1/sheet_service.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.v1.GetSubscriptionRequest">GetSubscriptionRequest</h3>+ <h3 id="bytebase.v1.BatchCreateSheetsRequest">BatchCreateSheetsRequest</h3><p></p>---- <h3 id="bytebase.v1.PlanConfig">PlanConfig</h3>- <p>PlanConfig represents the configuration for all plans loaded from plan.yaml</p>--<table class="field-table"><thead><tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>@@ -28891,15 +29184,16 @@ Permissions required: bb.sheets.get</p></td><tbody><tr>- <td>plans</td>- <td><a href="#bytebase.v1.PlanLimitConfig">PlanLimitConfig</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td>parent</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The parent resource where all sheets will be created.+Format: projects/{project} </p></td></tr><tr>- <td>instance_features</td>- <td><a href="#bytebase.v1.PlanFeature">PlanFeature</a></td>+ <td>requests</td>+ <td><a href="#bytebase.v1.CreateSheetRequest">CreateSheetRequest</a></td><td>repeated</td><td><p> </p></td></tr>@@ -28911,8 +29205,8 @@ Permissions required: bb.sheets.get</p></td>- <h3 id="bytebase.v1.PlanLimitConfig">PlanLimitConfig</h3>- <p>PlanLimitConfig represents a single plan's configuration</p>+ <h3 id="bytebase.v1.BatchCreateSheetsResponse">BatchCreateSheetsResponse</h3>+ <p></p><table class="field-table">@@ -28922,29 +29216,8 @@ Permissions required: bb.sheets.get</p></td><tbody><tr>- <td>type</td>- <td><a href="#bytebase.v1.PlanType">PlanType</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>maximum_instance_count</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>maximum_seat_count</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>features</td>- <td><a href="#bytebase.v1.PlanFeature">PlanFeature</a></td>+ <td>sheets</td>+ <td><a href="#bytebase.v1.Sheet">Sheet</a></td><td>repeated</td><td><p> </p></td></tr>@@ -28956,7 +29229,7 @@ Permissions required: bb.sheets.get</p></td>- <h3 id="bytebase.v1.Subscription">Subscription</h3>+ <h3 id="bytebase.v1.CreateSheetRequest">CreateSheetRequest</h3><p></p>@@ -28967,59 +29240,50 @@ Permissions required: bb.sheets.get</p></td><tbody><tr>- <td>plan</td>- <td><a href="#bytebase.v1.PlanType">PlanType</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>seats</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>instances</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>active_instances</td>- <td><a href="#int32">int32</a></td>+ <td>parent</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The parent resource where this sheet will be created.+Format: projects/{project} </p></td></tr><tr>- <td>expires_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td>sheet</td>+ <td><a href="#bytebase.v1.Sheet">Sheet</a></td><td></td>- <td><p> </p></td>+ <td><p>The sheet to create. </p></td></tr>- <tr>- <td>trialing</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p> </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.v1.GetSheetRequest">GetSheetRequest</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody><tr>- <td>org_name</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name of the sheet to retrieve.+Format: projects/{project}/sheets/{sheet} </p></td></tr><tr>- <td>ha</td>+ <td>raw</td><td><a href="#bool">bool</a></td><td></td>- <td><p>Whether high availability (multiple replicas) is enabled. </p></td>+ <td><p>By default, the content of the sheet is cut off, set the `raw` to true to retrieve the full content. </p></td></tr></tbody>@@ -29029,7 +29293,7 @@ Permissions required: bb.sheets.get</p></td>- <h3 id="bytebase.v1.UpdateSubscriptionRequest">UpdateSubscriptionRequest</h3>+ <h3 id="bytebase.v1.Sheet">Sheet</h3><p></p>@@ -29040,18 +29304,28 @@ Permissions required: bb.sheets.get</p></td><tbody><tr>- <td>license</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name of the sheet resource.+Format: projects/{project}/sheets/{sheet}+The sheet ID is generated by the server on creation and cannot be changed. </p></td></tr><tr>- <td>allow_missing</td>- <td><a href="#bool">bool</a></td>+ <td>content</td>+ <td><a href="#bytes">bytes</a></td><td></td>- <td><p>If set to true, and the subscription is not found, a new subscription will be created.-In this situation, `update_mask` is ignored. </p></td>+ <td><p>The content of the sheet.+By default, it will be cut off, if it doesn't match the `content_size`, you can+set the `raw` to true in GetSheet request to retrieve the full content. </p></td>+ </tr>++ <tr>+ <td>content_size</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p>content_size is the full size of the content, may not match the size of the `content` field. </p></td></tr></tbody>@@ -29063,41 +29337,327 @@ In this situation, `update_mask` is ignored. </p></td>- <h3 id="bytebase.v1.PlanFeature">PlanFeature</h3>- <p>PlanFeature represents the available features in Bytebase</p>+++++ <h3 id="bytebase.v1.SheetService">SheetService</h3>+ <p>SheetService manages SQL scripts and saved queries.</p><table class="enum-table"><thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr></thead><tbody><tr>- <td>FEATURE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>+ <td>CreateSheet</td>+ <td><a href="#bytebase.v1.CreateSheetRequest">CreateSheetRequest</a></td>+ <td><a href="#bytebase.v1.Sheet">Sheet</a></td>+ <td><p>Creates a new SQL sheet.+Permissions required: bb.sheets.create</p></td></tr><tr>- <td>FEATURE_DATABASE_CHANGE</td>- <td>1</td>- <td><p>Database Change Management</p></td>+ <td>BatchCreateSheets</td>+ <td><a href="#bytebase.v1.BatchCreateSheetsRequest">BatchCreateSheetsRequest</a></td>+ <td><a href="#bytebase.v1.BatchCreateSheetsResponse">BatchCreateSheetsResponse</a></td>+ <td><p>Creates multiple SQL sheets in a single operation.+Permissions required: bb.sheets.create</p></td></tr><tr>- <td>FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL</td>- <td>2</td>- <td><p></p></td>+ <td>GetSheet</td>+ <td><a href="#bytebase.v1.GetSheetRequest">GetSheetRequest</a></td>+ <td><a href="#bytebase.v1.Sheet">Sheet</a></td>+ <td><p>Retrieves a SQL sheet by name.+Permissions required: bb.sheets.get</p></td></tr>+ </tbody>+ </table>+++++ <h4>Methods with HTTP bindings</h4>+ <table>+ <thead><tr>- <td>FEATURE_DECLARATIVE_SCHEMA_MIGRATION</td>- <td>3</td>- <td><p></p></td>+ <td>Method Name</td>+ <td>Method</td>+ <td>Pattern</td>+ <td>Body</td></tr>+ </thead>+ <tbody>++<tr>- <td>FEATURE_COMPARE_AND_SYNC_SCHEMA</td>- <td>4</td>+ <td>CreateSheet</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/sheets</td>+ <td>sheet</td>+ </tr>+++++ <tr>+ <td>BatchCreateSheets</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/sheets:batchCreate</td>+ <td>*</td>+ </tr>+++++ <tr>+ <td>GetSheet</td>+ <td>GET</td>+ <td>/v1/{name=projects/*/sheets/*}</td>+ <td></td>+ </tr>+++ </tbody>+ </table>+++++ <div class="file-heading">+ <h2 id="v1/subscription_service.proto">v1/subscription_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.GetSubscriptionRequest">GetSubscriptionRequest</h3>+ <p></p>++++++ <h3 id="bytebase.v1.PlanConfig">PlanConfig</h3>+ <p>PlanConfig represents the configuration for all plans loaded from plan.yaml</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>plans</td>+ <td><a href="#bytebase.v1.PlanLimitConfig">PlanLimitConfig</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>instance_features</td>+ <td><a href="#bytebase.v1.PlanFeature">PlanFeature</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.PlanLimitConfig">PlanLimitConfig</h3>+ <p>PlanLimitConfig represents a single plan's configuration</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>type</td>+ <td><a href="#bytebase.v1.PlanType">PlanType</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>maximum_instance_count</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>maximum_seat_count</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>features</td>+ <td><a href="#bytebase.v1.PlanFeature">PlanFeature</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.Subscription">Subscription</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>plan</td>+ <td><a href="#bytebase.v1.PlanType">PlanType</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>seats</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>instances</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>active_instances</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>expires_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>trialing</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>org_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>ha</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether high availability (multiple replicas) is enabled. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.UpdateSubscriptionRequest">UpdateSubscriptionRequest</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>license</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>allow_missing</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>If set to true, and the subscription is not found, a new subscription will be created.+In this situation, `update_mask` is ignored. </p></td>+ </tr>++ </tbody>+ </table>++++++++ <h3 id="bytebase.v1.PlanFeature">PlanFeature</h3>+ <p>PlanFeature represents the available features in Bytebase</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>FEATURE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>FEATURE_DATABASE_CHANGE</td>+ <td>1</td>+ <td><p>Database Change Management</p></td>+ </tr>++ <tr>+ <td>FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>FEATURE_DECLARATIVE_SCHEMA_MIGRATION</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>FEATURE_COMPARE_AND_SYNC_SCHEMA</td>+ <td>4</td><td><p></p></td></tr>@@ -29500,69 +30060,481 @@ In this situation, `update_mask` is ignored. </p></td></tbody></table>- <h3 id="bytebase.v1.PlanType">PlanType</h3>- <p></p>+ <h3 id="bytebase.v1.PlanType">PlanType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>PLAN_TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified plan type.</p></td>+ </tr>++ <tr>+ <td>FREE</td>+ <td>1</td>+ <td><p>Free plan with basic features and no cost.</p></td>+ </tr>++ <tr>+ <td>TEAM</td>+ <td>2</td>+ <td><p>Team plan with collaboration features for small to medium teams.</p></td>+ </tr>++ <tr>+ <td>ENTERPRISE</td>+ <td>3</td>+ <td><p>Enterprise plan with advanced features and dedicated support.</p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.SubscriptionService">SubscriptionService</h3>+ <p>SubscriptionService manages enterprise subscriptions and licensing.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>GetSubscription</td>+ <td><a href="#bytebase.v1.GetSubscriptionRequest">GetSubscriptionRequest</a></td>+ <td><a href="#bytebase.v1.Subscription">Subscription</a></td>+ <td><p>GetSubscription returns the current subscription.+If there is no license, we will return a free plan subscription without expiration time.+If there is expired license, we will return a free plan subscription with the expiration time of the expired license.+Permissions required: None</p></td>+ </tr>++ <tr>+ <td>UpdateSubscription</td>+ <td><a href="#bytebase.v1.UpdateSubscriptionRequest">UpdateSubscriptionRequest</a></td>+ <td><a href="#bytebase.v1.Subscription">Subscription</a></td>+ <td><p>Updates the enterprise license subscription.+Permissions required: bb.settings.set</p></td>+ </tr>++ </tbody>+ </table>+++++ <h4>Methods with HTTP bindings</h4>+ <table>+ <thead>+ <tr>+ <td>Method Name</td>+ <td>Method</td>+ <td>Pattern</td>+ <td>Body</td>+ </tr>+ </thead>+ <tbody>++++ <tr>+ <td>GetSubscription</td>+ <td>GET</td>+ <td>/v1/subscription</td>+ <td></td>+ </tr>+++++ <tr>+ <td>UpdateSubscription</td>+ <td>PATCH</td>+ <td>/v1/subscription</td>+ <td>license</td>+ </tr>+++ </tbody>+ </table>+++++ <div class="file-heading">+ <h2 id="v1/workload_identity_service.proto">v1/workload_identity_service.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.CreateWorkloadIdentityRequest">CreateWorkloadIdentityRequest</h3>+ <p>Request message for creating a workload identity.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>parent</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The parent resource where this workload identity will be created.+Format: projects/{project} for project-level, empty for workspace-level. </p></td>+ </tr>++ <tr>+ <td>workload_identity_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The ID to use for the workload identity, which will become the final component+of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.com+or {workload_identity_id}@{project-id}.workload.bytebase.com </p></td>+ </tr>++ <tr>+ <td>workload_identity</td>+ <td><a href="#bytebase.v1.WorkloadIdentity">WorkloadIdentity</a></td>+ <td></td>+ <td><p>The workload identity to create. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.DeleteWorkloadIdentityRequest">DeleteWorkloadIdentityRequest</h3>+ <p>Request message for deleting a workload identity.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the workload identity to delete.+Format: workloadIdentities/{email} </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.GetWorkloadIdentityRequest">GetWorkloadIdentityRequest</h3>+ <p>Request message for getting a workload identity.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the workload identity to retrieve.+Format: workloadIdentities/{email} </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ListWorkloadIdentitiesRequest">ListWorkloadIdentitiesRequest</h3>+ <p>Request message for listing workload identities.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>parent</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The parent resource.+Format: projects/{project} for project-level, empty for workspace-level. </p></td>+ </tr>++ <tr>+ <td>page_size</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p>The maximum number of workload identities to return. The service may return fewer than+this value.+If unspecified, at most 10 workload identities will be returned.+The maximum value is 1000; values above 1000 will be coerced to 1000. </p></td>+ </tr>++ <tr>+ <td>page_token</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>A page token, received from a previous `ListWorkloadIdentities` call.+Provide this to retrieve the subsequent page.++When paginating, all other parameters provided to `ListWorkloadIdentities` must match+the call that provided the page token. </p></td>+ </tr>++ <tr>+ <td>show_deleted</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Show deleted workload identities if specified. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.ListWorkloadIdentitiesResponse">ListWorkloadIdentitiesResponse</h3>+ <p>Response message for listing workload identities.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>workload_identities</td>+ <td><a href="#bytebase.v1.WorkloadIdentity">WorkloadIdentity</a></td>+ <td>repeated</td>+ <td><p>The workload identities from the specified request. </p></td>+ </tr>++ <tr>+ <td>next_page_token</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>A token, which can be sent as `page_token` to retrieve the next page.+If this field is omitted, there are no subsequent pages. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.UndeleteWorkloadIdentityRequest">UndeleteWorkloadIdentityRequest</h3>+ <p>Request message for restoring a deleted workload identity.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the deleted workload identity.+Format: workloadIdentities/{email} </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.UpdateWorkloadIdentityRequest">UpdateWorkloadIdentityRequest</h3>+ <p>Request message for updating a workload identity.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>workload_identity</td>+ <td><a href="#bytebase.v1.WorkloadIdentity">WorkloadIdentity</a></td>+ <td></td>+ <td><p>The workload identity to update.++The workload identity's `name` field is used to identify the workload identity to update.+Format: workloadIdentities/{email} </p></td>+ </tr>++ <tr>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td></td>+ <td><p>The list of fields to update.+Supported fields: title, workload_identity_config </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.WorkloadIdentity">WorkloadIdentity</h3>+ <p>WorkloadIdentity represents an external CI/CD workload identity.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the workload identity.+Format: workloadIdentities/{email} </p></td>+ </tr>++ <tr>+ <td>state</td>+ <td><a href="#bytebase.v1.State">State</a></td>+ <td></td>+ <td><p>The state of the workload identity. </p></td>+ </tr>++ <tr>+ <td>email</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The email of the workload identity.+For workspace-level: {name}@workload.bytebase.com+For project-level: {name}@{project-id}.workload.bytebase.com </p></td>+ </tr>++ <tr>+ <td>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The display title of the workload identity. </p></td>+ </tr>++ <tr>+ <td>create_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>+ <td></td>+ <td><p>The timestamp when the workload identity was created. </p></td>+ </tr>++ <tr>+ <td>workload_identity_config</td>+ <td><a href="#bytebase.v1.WorkloadIdentityConfig">WorkloadIdentityConfig</a></td>+ <td></td>+ <td><p>The workload identity configuration for OIDC token validation. </p></td>+ </tr>++ </tbody>+ </table>++++++++++++ <h3 id="bytebase.v1.WorkloadIdentityService">WorkloadIdentityService</h3>+ <p>WorkloadIdentityService manages workload identities for external CI/CD integrations.</p><table class="enum-table"><thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr></thead><tbody><tr>- <td>PLAN_TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p>Unspecified plan type.</p></td>+ <td>CreateWorkloadIdentity</td>+ <td><a href="#bytebase.v1.CreateWorkloadIdentityRequest">CreateWorkloadIdentityRequest</a></td>+ <td><a href="#bytebase.v1.WorkloadIdentity">WorkloadIdentity</a></td>+ <td><p>Creates a new workload identity.+For workspace-level: parent is empty, permission bb.workloadIdentities.create on workspace.+For project-level: parent is projects/{project}, permission bb.workloadIdentities.create on project.</p></td></tr><tr>- <td>FREE</td>- <td>1</td>- <td><p>Free plan with basic features and no cost.</p></td>+ <td>GetWorkloadIdentity</td>+ <td><a href="#bytebase.v1.GetWorkloadIdentityRequest">GetWorkloadIdentityRequest</a></td>+ <td><a href="#bytebase.v1.WorkloadIdentity">WorkloadIdentity</a></td>+ <td><p>Gets a workload identity by name.+Permissions required: bb.workloadIdentities.get</p></td></tr><tr>- <td>TEAM</td>- <td>2</td>- <td><p>Team plan with collaboration features for small to medium teams.</p></td>+ <td>ListWorkloadIdentities</td>+ <td><a href="#bytebase.v1.ListWorkloadIdentitiesRequest">ListWorkloadIdentitiesRequest</a></td>+ <td><a href="#bytebase.v1.ListWorkloadIdentitiesResponse">ListWorkloadIdentitiesResponse</a></td>+ <td><p>Lists workload identities.+For workspace-level: parent is empty, permission bb.workloadIdentities.list on workspace.+For project-level: parent is projects/{project}, permission bb.workloadIdentities.list on project.</p></td></tr><tr>- <td>ENTERPRISE</td>- <td>3</td>- <td><p>Enterprise plan with advanced features and dedicated support.</p></td>+ <td>UpdateWorkloadIdentity</td>+ <td><a href="#bytebase.v1.UpdateWorkloadIdentityRequest">UpdateWorkloadIdentityRequest</a></td>+ <td><a href="#bytebase.v1.WorkloadIdentity">WorkloadIdentity</a></td>+ <td><p>Updates a workload identity.+Permissions required: bb.workloadIdentities.update</p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.v1.SubscriptionService">SubscriptionService</h3>- <p>SubscriptionService manages enterprise subscriptions and licensing.</p>- <table class="enum-table">- <thead>- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>GetSubscription</td>- <td><a href="#bytebase.v1.GetSubscriptionRequest">GetSubscriptionRequest</a></td>- <td><a href="#bytebase.v1.Subscription">Subscription</a></td>- <td><p>GetSubscription returns the current subscription.-If there is no license, we will return a free plan subscription without expiration time.-If there is expired license, we will return a free plan subscription with the expiration time of the expired license.-Permissions required: None</p></td>+ <td>DeleteWorkloadIdentity</td>+ <td><a href="#bytebase.v1.DeleteWorkloadIdentityRequest">DeleteWorkloadIdentityRequest</a></td>+ <td><a href="#google.protobuf.Empty">.google.protobuf.Empty</a></td>+ <td><p>Deletes a workload identity.+Permissions required: bb.workloadIdentities.delete</p></td></tr><tr>- <td>UpdateSubscription</td>- <td><a href="#bytebase.v1.UpdateSubscriptionRequest">UpdateSubscriptionRequest</a></td>- <td><a href="#bytebase.v1.Subscription">Subscription</a></td>- <td><p>Updates the enterprise license subscription.-Permissions required: bb.settings.set</p></td>+ <td>UndeleteWorkloadIdentity</td>+ <td><a href="#bytebase.v1.UndeleteWorkloadIdentityRequest">UndeleteWorkloadIdentityRequest</a></td>+ <td><a href="#bytebase.v1.WorkloadIdentity">WorkloadIdentity</a></td>+ <td><p>Restores a deleted workload identity.+Permissions required: bb.workloadIdentities.undelete</p></td></tr></tbody>@@ -29586,9 +30558,26 @@ Permissions required: bb.settings.set</p></td><tr>- <td>GetSubscription</td>+ <td>CreateWorkloadIdentity</td>+ <td>POST</td>+ <td>/v1/{parent=projects/*}/workloadIdentities</td>+ <td>workload_identity</td>+ </tr>++ <tr>+ <td>CreateWorkloadIdentity</td>+ <td>POST</td>+ <td>/v1/workloadIdentities</td>+ <td>workload_identity</td>+ </tr>+++++ <tr>+ <td>GetWorkloadIdentity</td><td>GET</td>- <td>/v1/subscription</td>+ <td>/v1/{name=workloadIdentities/*}</td><td></td></tr>@@ -29596,10 +30585,47 @@ Permissions required: bb.settings.set</p></td><tr>- <td>UpdateSubscription</td>+ <td>ListWorkloadIdentities</td>+ <td>GET</td>+ <td>/v1/{parent=projects/*}/workloadIdentities</td>+ <td></td>+ </tr>++ <tr>+ <td>ListWorkloadIdentities</td>+ <td>GET</td>+ <td>/v1/workloadIdentities</td>+ <td></td>+ </tr>+++++ <tr>+ <td>UpdateWorkloadIdentity</td><td>PATCH</td>- <td>/v1/subscription</td>- <td>license</td>+ <td>/v1/{workload_identity.name=workloadIdentities/*}</td>+ <td>workload_identity</td>+ </tr>+++++ <tr>+ <td>DeleteWorkloadIdentity</td>+ <td>DELETE</td>+ <td>/v1/{name=workloadIdentities/*}</td>+ <td></td>+ </tr>+++++ <tr>+ <td>UndeleteWorkloadIdentity</td>+ <td>POST</td>+ <td>/v1/{name=workloadIdentities/*}:undelete</td>+ <td>*</td></tr>diff --git a/proto/v1/v1/service_account_service.proto b/proto/v1/v1/service_account_service.protonew file mode 100644index 0000000000..6c4c21511e--- /dev/null+++ b/proto/v1/v1/service_account_service.proto@@ -0,0 +1,214 @@+syntax = "proto3";++package bytebase.v1;++import "buf/validate/validate.proto";+import "google/api/annotations.proto";+import "google/api/client.proto";+import "google/api/field_behavior.proto";+import "google/api/resource.proto";+import "google/protobuf/empty.proto";+import "google/protobuf/field_mask.proto";+import "google/protobuf/timestamp.proto";+import "v1/annotation.proto";+import "v1/common.proto";++option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";++// ServiceAccountService manages service accounts for API integrations.+service ServiceAccountService {+ // Creates a new service account.+ // For workspace-level: parent is empty, permission bb.serviceAccounts.create on workspace.+ // For project-level: parent is projects/{project}, permission bb.serviceAccounts.create on project.+ rpc CreateServiceAccount(CreateServiceAccountRequest) returns (ServiceAccount) {+ option (google.api.http) = {+ post: "/v1/{parent=projects/*}/serviceAccounts"+ body: "service_account"+ additional_bindings: {+ post: "/v1/serviceAccounts"+ body: "service_account"+ }+ };+ option (google.api.method_signature) = "parent,service_account,service_account_id";+ option (bytebase.v1.permission) = "bb.serviceAccounts.create";+ option (bytebase.v1.auth_method) = IAM;+ option (bytebase.v1.audit) = true;+ }++ // Gets a service account by name.+ // Permissions required: bb.serviceAccounts.get+ rpc GetServiceAccount(GetServiceAccountRequest) returns (ServiceAccount) {+ option (google.api.http) = {get: "/v1/{name=serviceAccounts/*}"};+ option (google.api.method_signature) = "name";+ option (bytebase.v1.permission) = "bb.serviceAccounts.get";+ option (bytebase.v1.auth_method) = IAM;+ }++ // Lists service accounts.+ // For workspace-level: parent is empty, permission bb.serviceAccounts.list on workspace.+ // For project-level: parent is projects/{project}, permission bb.serviceAccounts.list on project.+ rpc ListServiceAccounts(ListServiceAccountsRequest) returns (ListServiceAccountsResponse) {+ option (google.api.http) = {+ get: "/v1/{parent=projects/*}/serviceAccounts"+ additional_bindings: {get: "/v1/serviceAccounts"}+ };+ option (google.api.method_signature) = "parent";+ option (bytebase.v1.permission) = "bb.serviceAccounts.list";+ option (bytebase.v1.auth_method) = IAM;+ }++ // Updates a service account.+ // Permissions required: bb.serviceAccounts.update+ rpc UpdateServiceAccount(UpdateServiceAccountRequest) returns (ServiceAccount) {+ option (google.api.http) = {+ patch: "/v1/{service_account.name=serviceAccounts/*}"+ body: "service_account"+ };+ option (google.api.method_signature) = "service_account,update_mask";+ option (bytebase.v1.permission) = "bb.serviceAccounts.update";+ option (bytebase.v1.auth_method) = IAM;+ option (bytebase.v1.audit) = true;+ }++ // Deletes a service account.+ // Permissions required: bb.serviceAccounts.delete+ rpc DeleteServiceAccount(DeleteServiceAccountRequest) returns (google.protobuf.Empty) {+ option (google.api.http) = {delete: "/v1/{name=serviceAccounts/*}"};+ option (google.api.method_signature) = "name";+ option (bytebase.v1.permission) = "bb.serviceAccounts.delete";+ option (bytebase.v1.auth_method) = IAM;+ option (bytebase.v1.audit) = true;+ }++ // Restores a deleted service account.+ // Permissions required: bb.serviceAccounts.undelete+ rpc UndeleteServiceAccount(UndeleteServiceAccountRequest) returns (ServiceAccount) {+ option (google.api.http) = {+ post: "/v1/{name=serviceAccounts/*}:undelete"+ body: "*"+ };+ option (bytebase.v1.permission) = "bb.serviceAccounts.undelete";+ option (bytebase.v1.auth_method) = IAM;+ option (bytebase.v1.audit) = true;+ }+}++// ServiceAccount represents an API integration account.+message ServiceAccount {+ option (google.api.resource) = {+ type: "bytebase.com/ServiceAccount"+ pattern: "serviceAccounts/{email}"+ };++ // The name of the service account.+ // Format: serviceAccounts/{email}+ string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];++ // The state of the service account.+ State state = 2;++ // The email of the service account.+ // For workspace-level: {name}@service.bytebase.com+ // For project-level: {name}@{project-id}.service.bytebase.com+ string email = 3 [(google.api.field_behavior) = OUTPUT_ONLY];++ // The display title of the service account.+ string title = 4 [(buf.validate.field).string.max_len = 200];++ // The service key for authentication. Only returned on creation or key rotation.+ string service_key = 5 [(google.api.field_behavior) = OUTPUT_ONLY];++ // The timestamp when the service account was created.+ google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];+}++// Request message for creating a service account.+message CreateServiceAccountRequest {+ // The parent resource where this service account will be created.+ // Format: projects/{project} for project-level, empty for workspace-level.+ string parent = 1 [(google.api.resource_reference) = {type: "bytebase.com/Project"}];++ // The ID to use for the service account, which will become the final component+ // of the service account's email in the format: {service_account_id}@service.bytebase.com+ // or {service_account_id}@{project-id}.service.bytebase.com+ string service_account_id = 2 [(google.api.field_behavior) = REQUIRED];++ // The service account to create.+ ServiceAccount service_account = 3 [(google.api.field_behavior) = REQUIRED];+}++// Request message for getting a service account.+message GetServiceAccountRequest {+ // The name of the service account to retrieve.+ // Format: serviceAccounts/{email}+ string name = 1 [+ (google.api.field_behavior) = REQUIRED,+ (google.api.resource_reference) = {type: "bytebase.com/ServiceAccount"}+ ];+}++// Request message for listing service accounts.+message ListServiceAccountsRequest {+ // The parent resource.+ // Format: projects/{project} for project-level, empty for workspace-level.+ string parent = 1 [(google.api.resource_reference) = {type: "bytebase.com/Project"}];++ // The maximum number of service accounts to return. The service may return fewer than+ // this value.+ // If unspecified, at most 10 service accounts will be returned.+ // The maximum value is 1000; values above 1000 will be coerced to 1000.+ int32 page_size = 2;++ // A page token, received from a previous `ListServiceAccounts` call.+ // Provide this to retrieve the subsequent page.+ //+ // When paginating, all other parameters provided to `ListServiceAccounts` must match+ // the call that provided the page token.+ string page_token = 3;++ // Show deleted service accounts if specified.+ bool show_deleted = 4;+}++// Response message for listing service accounts.+message ListServiceAccountsResponse {+ // The service accounts from the specified request.+ repeated ServiceAccount service_accounts = 1;++ // A token, which can be sent as `page_token` to retrieve the next page.+ // If this field is omitted, there are no subsequent pages.+ string next_page_token = 2;+}++// Request message for updating a service account.+message UpdateServiceAccountRequest {+ // The service account to update.+ //+ // The service account's `name` field is used to identify the service account to update.+ // Format: serviceAccounts/{email}+ ServiceAccount service_account = 1 [(google.api.field_behavior) = REQUIRED];++ // The list of fields to update.+ // Supported fields: title, service_key (triggers key rotation)+ google.protobuf.FieldMask update_mask = 2;+}++// Request message for deleting a service account.+message DeleteServiceAccountRequest {+ // The name of the service account to delete.+ // Format: serviceAccounts/{email}+ string name = 1 [+ (google.api.field_behavior) = REQUIRED,+ (google.api.resource_reference) = {type: "bytebase.com/ServiceAccount"}+ ];+}++// Request message for restoring a deleted service account.+message UndeleteServiceAccountRequest {+ // The name of the deleted service account.+ // Format: serviceAccounts/{email}+ string name = 1 [+ (google.api.field_behavior) = REQUIRED,+ (google.api.resource_reference) = {type: "bytebase.com/ServiceAccount"}+ ];+}diff --git a/proto/v1/v1/workload_identity_service.proto b/proto/v1/v1/workload_identity_service.protonew file mode 100644index 0000000000..b047e3333c--- /dev/null+++ b/proto/v1/v1/workload_identity_service.proto@@ -0,0 +1,215 @@+syntax = "proto3";++package bytebase.v1;++import "buf/validate/validate.proto";+import "google/api/annotations.proto";+import "google/api/client.proto";+import "google/api/field_behavior.proto";+import "google/api/resource.proto";+import "google/protobuf/empty.proto";+import "google/protobuf/field_mask.proto";+import "google/protobuf/timestamp.proto";+import "v1/annotation.proto";+import "v1/common.proto";+import "v1/user_service.proto";++option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";++// WorkloadIdentityService manages workload identities for external CI/CD integrations.+service WorkloadIdentityService {+ // Creates a new workload identity.+ // For workspace-level: parent is empty, permission bb.workloadIdentities.create on workspace.+ // For project-level: parent is projects/{project}, permission bb.workloadIdentities.create on project.+ rpc CreateWorkloadIdentity(CreateWorkloadIdentityRequest) returns (WorkloadIdentity) {+ option (google.api.http) = {+ post: "/v1/{parent=projects/*}/workloadIdentities"+ body: "workload_identity"+ additional_bindings: {+ post: "/v1/workloadIdentities"+ body: "workload_identity"+ }+ };+ option (google.api.method_signature) = "parent,workload_identity,workload_identity_id";+ option (bytebase.v1.permission) = "bb.workloadIdentities.create";+ option (bytebase.v1.auth_method) = IAM;+ option (bytebase.v1.audit) = true;+ }++ // Gets a workload identity by name.+ // Permissions required: bb.workloadIdentities.get+ rpc GetWorkloadIdentity(GetWorkloadIdentityRequest) returns (WorkloadIdentity) {+ option (google.api.http) = {get: "/v1/{name=workloadIdentities/*}"};+ option (google.api.method_signature) = "name";+ option (bytebase.v1.permission) = "bb.workloadIdentities.get";+ option (bytebase.v1.auth_method) = IAM;+ }++ // Lists workload identities.+ // For workspace-level: parent is empty, permission bb.workloadIdentities.list on workspace.+ // For project-level: parent is projects/{project}, permission bb.workloadIdentities.list on project.+ rpc ListWorkloadIdentities(ListWorkloadIdentitiesRequest) returns (ListWorkloadIdentitiesResponse) {+ option (google.api.http) = {+ get: "/v1/{parent=projects/*}/workloadIdentities"+ additional_bindings: {get: "/v1/workloadIdentities"}+ };+ option (google.api.method_signature) = "parent";+ option (bytebase.v1.permission) = "bb.workloadIdentities.list";+ option (bytebase.v1.auth_method) = IAM;+ }++ // Updates a workload identity.+ // Permissions required: bb.workloadIdentities.update+ rpc UpdateWorkloadIdentity(UpdateWorkloadIdentityRequest) returns (WorkloadIdentity) {+ option (google.api.http) = {+ patch: "/v1/{workload_identity.name=workloadIdentities/*}"+ body: "workload_identity"+ };+ option (google.api.method_signature) = "workload_identity,update_mask";+ option (bytebase.v1.permission) = "bb.workloadIdentities.update";+ option (bytebase.v1.auth_method) = IAM;+ option (bytebase.v1.audit) = true;+ }++ // Deletes a workload identity.+ // Permissions required: bb.workloadIdentities.delete+ rpc DeleteWorkloadIdentity(DeleteWorkloadIdentityRequest) returns (google.protobuf.Empty) {+ option (google.api.http) = {delete: "/v1/{name=workloadIdentities/*}"};+ option (google.api.method_signature) = "name";+ option (bytebase.v1.permission) = "bb.workloadIdentities.delete";+ option (bytebase.v1.auth_method) = IAM;+ option (bytebase.v1.audit) = true;+ }++ // Restores a deleted workload identity.+ // Permissions required: bb.workloadIdentities.undelete+ rpc UndeleteWorkloadIdentity(UndeleteWorkloadIdentityRequest) returns (WorkloadIdentity) {+ option (google.api.http) = {+ post: "/v1/{name=workloadIdentities/*}:undelete"+ body: "*"+ };+ option (bytebase.v1.permission) = "bb.workloadIdentities.undelete";+ option (bytebase.v1.auth_method) = IAM;+ option (bytebase.v1.audit) = true;+ }+}++// WorkloadIdentity represents an external CI/CD workload identity.+message WorkloadIdentity {+ option (google.api.resource) = {+ type: "bytebase.com/WorkloadIdentity"+ pattern: "workloadIdentities/{email}"+ };++ // The name of the workload identity.+ // Format: workloadIdentities/{email}+ string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];++ // The state of the workload identity.+ State state = 2;++ // The email of the workload identity.+ // For workspace-level: {name}@workload.bytebase.com+ // For project-level: {name}@{project-id}.workload.bytebase.com+ string email = 3 [(google.api.field_behavior) = OUTPUT_ONLY];++ // The display title of the workload identity.+ string title = 4 [(buf.validate.field).string.max_len = 200];++ // The timestamp when the workload identity was created.+ google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];++ // The workload identity configuration for OIDC token validation.+ WorkloadIdentityConfig workload_identity_config = 6;+}++// Request message for creating a workload identity.+message CreateWorkloadIdentityRequest {+ // The parent resource where this workload identity will be created.+ // Format: projects/{project} for project-level, empty for workspace-level.+ string parent = 1 [(google.api.resource_reference) = {type: "bytebase.com/Project"}];++ // The ID to use for the workload identity, which will become the final component+ // of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.com+ // or {workload_identity_id}@{project-id}.workload.bytebase.com+ string workload_identity_id = 2 [(google.api.field_behavior) = REQUIRED];++ // The workload identity to create.+ WorkloadIdentity workload_identity = 3 [(google.api.field_behavior) = REQUIRED];+}++// Request message for getting a workload identity.+message GetWorkloadIdentityRequest {+ // The name of the workload identity to retrieve.+ // Format: workloadIdentities/{email}+ string name = 1 [+ (google.api.field_behavior) = REQUIRED,+ (google.api.resource_reference) = {type: "bytebase.com/WorkloadIdentity"}+ ];+}++// Request message for listing workload identities.+message ListWorkloadIdentitiesRequest {+ // The parent resource.+ // Format: projects/{project} for project-level, empty for workspace-level.+ string parent = 1 [(google.api.resource_reference) = {type: "bytebase.com/Project"}];++ // The maximum number of workload identities to return. The service may return fewer than+ // this value.+ // If unspecified, at most 10 workload identities will be returned.+ // The maximum value is 1000; values above 1000 will be coerced to 1000.+ int32 page_size = 2;++ // A page token, received from a previous `ListWorkloadIdentities` call.+ // Provide this to retrieve the subsequent page.+ //+ // When paginating, all other parameters provided to `ListWorkloadIdentities` must match+ // the call that provided the page token.+ string page_token = 3;++ // Show deleted workload identities if specified.+ bool show_deleted = 4;+}++// Response message for listing workload identities.+message ListWorkloadIdentitiesResponse {+ // The workload identities from the specified request.+ repeated WorkloadIdentity workload_identities = 1;++ // A token, which can be sent as `page_token` to retrieve the next page.+ // If this field is omitted, there are no subsequent pages.+ string next_page_token = 2;+}++// Request message for updating a workload identity.+message UpdateWorkloadIdentityRequest {+ // The workload identity to update.+ //+ // The workload identity's `name` field is used to identify the workload identity to update.+ // Format: workloadIdentities/{email}+ WorkloadIdentity workload_identity = 1 [(google.api.field_behavior) = REQUIRED];++ // The list of fields to update.+ // Supported fields: title, workload_identity_config+ google.protobuf.FieldMask update_mask = 2;+}++// Request message for deleting a workload identity.+message DeleteWorkloadIdentityRequest {+ // The name of the workload identity to delete.+ // Format: workloadIdentities/{email}+ string name = 1 [+ (google.api.field_behavior) = REQUIRED,+ (google.api.resource_reference) = {type: "bytebase.com/WorkloadIdentity"}+ ];+}++// Request message for restoring a deleted workload identity.+message UndeleteWorkloadIdentityRequest {+ // The name of the deleted workload identity.+ // Format: workloadIdentities/{email}+ string name = 1 [+ (google.api.field_behavior) = REQUIRED,+ (google.api.resource_reference) = {type: "bytebase.com/WorkloadIdentity"}+ ];+}