Documentation
¶
Index ¶
- Constants
- func Bool(value bool) param.Field[bool]
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type Account
- type AccountDeleteParams
- type AccountDeleteResponse
- type AccountGetParams
- type AccountGetResponse
- type AccountGetSSOLoginURLParams
- type AccountGetSSOLoginURLResponse
- type AccountListLoginProvidersParams
- type AccountListLoginProvidersParamsFilter
- type AccountListLoginProvidersParamsPagination
- type AccountMembership
- type AccountService
- func (r *AccountService) Delete(ctx context.Context, body AccountDeleteParams, opts ...option.RequestOption) (res *AccountDeleteResponse, err error)
- func (r *AccountService) Get(ctx context.Context, body AccountGetParams, opts ...option.RequestOption) (res *AccountGetResponse, err error)
- func (r *AccountService) GetSSOLoginURL(ctx context.Context, body AccountGetSSOLoginURLParams, ...) (res *AccountGetSSOLoginURLResponse, err error)
- func (r *AccountService) ListLoginProviders(ctx context.Context, params AccountListLoginProvidersParams, ...) (res *pagination.LoginProvidersPage[LoginProvider], err error)
- func (r *AccountService) ListLoginProvidersAutoPaging(ctx context.Context, params AccountListLoginProvidersParams, ...) *pagination.LoginProvidersPageAutoPager[LoginProvider]
- type AdmissionLevel
- type AutomationTrigger
- type AutomationTriggerParam
- type AutomationsFileParam
- type AutomationsFileServiceParam
- type AutomationsFileServicesCommandsParam
- type AutomationsFileServicesTriggeredBy
- type AutomationsFileTaskParam
- type AutomationsFileTasksTriggeredBy
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- type DomainVerification
- type DomainVerificationState
- type Editor
- type EditorGetParams
- type EditorGetResponse
- type EditorListParams
- type EditorListParamsPagination
- type EditorResolveURLParams
- type EditorResolveURLResponse
- type EditorService
- func (r *EditorService) Get(ctx context.Context, body EditorGetParams, opts ...option.RequestOption) (res *EditorGetResponse, err error)
- func (r *EditorService) List(ctx context.Context, params EditorListParams, opts ...option.RequestOption) (res *pagination.EditorsPage[Editor], err error)
- func (r *EditorService) ListAutoPaging(ctx context.Context, params EditorListParams, opts ...option.RequestOption) *pagination.EditorsPageAutoPager[Editor]
- func (r *EditorService) ResolveURL(ctx context.Context, body EditorResolveURLParams, opts ...option.RequestOption) (res *EditorResolveURLResponse, err error)
- type Environment
- type EnvironmentActivitySignal
- type EnvironmentActivitySignalParam
- type EnvironmentAutomationService
- type EnvironmentAutomationServiceDeleteParams
- type EnvironmentAutomationServiceDeleteResponse
- type EnvironmentAutomationServiceGetParams
- type EnvironmentAutomationServiceGetResponse
- type EnvironmentAutomationServiceListParams
- type EnvironmentAutomationServiceListParamsFilter
- type EnvironmentAutomationServiceListParamsPagination
- type EnvironmentAutomationServiceNewParams
- type EnvironmentAutomationServiceNewResponse
- type EnvironmentAutomationServiceService
- func (r *EnvironmentAutomationServiceService) Delete(ctx context.Context, body EnvironmentAutomationServiceDeleteParams, ...) (res *EnvironmentAutomationServiceDeleteResponse, err error)
- func (r *EnvironmentAutomationServiceService) Get(ctx context.Context, body EnvironmentAutomationServiceGetParams, ...) (res *EnvironmentAutomationServiceGetResponse, err error)
- func (r *EnvironmentAutomationServiceService) List(ctx context.Context, params EnvironmentAutomationServiceListParams, ...) (res *pagination.ServicesPage[Service], err error)
- func (r *EnvironmentAutomationServiceService) ListAutoPaging(ctx context.Context, params EnvironmentAutomationServiceListParams, ...) *pagination.ServicesPageAutoPager[Service]
- func (r *EnvironmentAutomationServiceService) New(ctx context.Context, body EnvironmentAutomationServiceNewParams, ...) (res *EnvironmentAutomationServiceNewResponse, err error)
- func (r *EnvironmentAutomationServiceService) Start(ctx context.Context, body EnvironmentAutomationServiceStartParams, ...) (res *EnvironmentAutomationServiceStartResponse, err error)
- func (r *EnvironmentAutomationServiceService) Stop(ctx context.Context, body EnvironmentAutomationServiceStopParams, ...) (res *EnvironmentAutomationServiceStopResponse, err error)
- func (r *EnvironmentAutomationServiceService) Update(ctx context.Context, body EnvironmentAutomationServiceUpdateParams, ...) (res *EnvironmentAutomationServiceUpdateResponse, err error)
- type EnvironmentAutomationServiceStartParams
- type EnvironmentAutomationServiceStartResponse
- type EnvironmentAutomationServiceStopParams
- type EnvironmentAutomationServiceStopResponse
- type EnvironmentAutomationServiceUpdateParams
- type EnvironmentAutomationServiceUpdateParamsMetadata
- type EnvironmentAutomationServiceUpdateParamsMetadataTriggeredBy
- type EnvironmentAutomationServiceUpdateParamsSpec
- type EnvironmentAutomationServiceUpdateParamsSpecCommands
- type EnvironmentAutomationServiceUpdateParamsStatus
- type EnvironmentAutomationServiceUpdateResponse
- type EnvironmentAutomationTaskDeleteParams
- type EnvironmentAutomationTaskDeleteResponse
- type EnvironmentAutomationTaskExecutionGetParams
- type EnvironmentAutomationTaskExecutionGetResponse
- type EnvironmentAutomationTaskExecutionListParams
- type EnvironmentAutomationTaskExecutionListParamsFilter
- type EnvironmentAutomationTaskExecutionListParamsPagination
- type EnvironmentAutomationTaskExecutionService
- func (r *EnvironmentAutomationTaskExecutionService) Get(ctx context.Context, body EnvironmentAutomationTaskExecutionGetParams, ...) (res *EnvironmentAutomationTaskExecutionGetResponse, err error)
- func (r *EnvironmentAutomationTaskExecutionService) List(ctx context.Context, params EnvironmentAutomationTaskExecutionListParams, ...) (res *pagination.TaskExecutionsPage[shared.TaskExecution], err error)
- func (r *EnvironmentAutomationTaskExecutionService) ListAutoPaging(ctx context.Context, params EnvironmentAutomationTaskExecutionListParams, ...) *pagination.TaskExecutionsPageAutoPager[shared.TaskExecution]
- func (r *EnvironmentAutomationTaskExecutionService) Stop(ctx context.Context, body EnvironmentAutomationTaskExecutionStopParams, ...) (res *EnvironmentAutomationTaskExecutionStopResponse, err error)
- type EnvironmentAutomationTaskExecutionStopParams
- type EnvironmentAutomationTaskExecutionStopResponse
- type EnvironmentAutomationTaskGetParams
- type EnvironmentAutomationTaskGetResponse
- type EnvironmentAutomationTaskListParams
- type EnvironmentAutomationTaskListParamsFilter
- type EnvironmentAutomationTaskListParamsPagination
- type EnvironmentAutomationTaskNewParams
- type EnvironmentAutomationTaskNewResponse
- type EnvironmentAutomationTaskService
- func (r *EnvironmentAutomationTaskService) Delete(ctx context.Context, body EnvironmentAutomationTaskDeleteParams, ...) (res *EnvironmentAutomationTaskDeleteResponse, err error)
- func (r *EnvironmentAutomationTaskService) Get(ctx context.Context, body EnvironmentAutomationTaskGetParams, ...) (res *EnvironmentAutomationTaskGetResponse, err error)
- func (r *EnvironmentAutomationTaskService) List(ctx context.Context, params EnvironmentAutomationTaskListParams, ...) (res *pagination.TasksPage[shared.Task], err error)
- func (r *EnvironmentAutomationTaskService) ListAutoPaging(ctx context.Context, params EnvironmentAutomationTaskListParams, ...) *pagination.TasksPageAutoPager[shared.Task]
- func (r *EnvironmentAutomationTaskService) New(ctx context.Context, body EnvironmentAutomationTaskNewParams, ...) (res *EnvironmentAutomationTaskNewResponse, err error)
- func (r *EnvironmentAutomationTaskService) Start(ctx context.Context, body EnvironmentAutomationTaskStartParams, ...) (res *EnvironmentAutomationTaskStartResponse, err error)
- func (r *EnvironmentAutomationTaskService) Update(ctx context.Context, body EnvironmentAutomationTaskUpdateParams, ...) (res *EnvironmentAutomationTaskUpdateResponse, err error)
- type EnvironmentAutomationTaskStartParams
- type EnvironmentAutomationTaskStartResponse
- type EnvironmentAutomationTaskUpdateParams
- type EnvironmentAutomationTaskUpdateParamsMetadata
- type EnvironmentAutomationTaskUpdateParamsMetadataTriggeredBy
- type EnvironmentAutomationTaskUpdateParamsSpec
- type EnvironmentAutomationTaskUpdateResponse
- type EnvironmentAutomationUpsertParams
- type EnvironmentAutomationUpsertResponse
- type EnvironmentClass
- type EnvironmentClassListParams
- type EnvironmentClassListParamsFilter
- type EnvironmentClassListParamsPagination
- type EnvironmentClassParam
- type EnvironmentClassService
- func (r *EnvironmentClassService) List(ctx context.Context, params EnvironmentClassListParams, ...) (res *pagination.EnvironmentClassesPage[shared.EnvironmentClass], err error)
- func (r *EnvironmentClassService) ListAutoPaging(ctx context.Context, params EnvironmentClassListParams, ...) *pagination.EnvironmentClassesPageAutoPager[shared.EnvironmentClass]
- type EnvironmentClassValidationResult
- type EnvironmentDeleteParams
- type EnvironmentDeleteResponse
- type EnvironmentGetParams
- type EnvironmentGetResponse
- type EnvironmentInitializer
- type EnvironmentInitializerParam
- type EnvironmentInitializerSpec
- type EnvironmentInitializerSpecParam
- type EnvironmentInitializerSpecsContextURL
- type EnvironmentInitializerSpecsContextURLParam
- type EnvironmentInitializerSpecsGit
- type EnvironmentInitializerSpecsGitParam
- type EnvironmentInitializerSpecsGitTargetMode
- type EnvironmentListParams
- type EnvironmentListParamsFilter
- type EnvironmentListParamsPagination
- type EnvironmentMarkActiveParams
- type EnvironmentMarkActiveResponse
- type EnvironmentMetadata
- type EnvironmentNewFromProjectParams
- type EnvironmentNewFromProjectResponse
- type EnvironmentNewLogsTokenParams
- type EnvironmentNewLogsTokenResponse
- type EnvironmentNewParams
- type EnvironmentNewResponse
- type EnvironmentPhase
- type EnvironmentService
- func (r *EnvironmentService) Delete(ctx context.Context, body EnvironmentDeleteParams, ...) (res *EnvironmentDeleteResponse, err error)
- func (r *EnvironmentService) Get(ctx context.Context, body EnvironmentGetParams, opts ...option.RequestOption) (res *EnvironmentGetResponse, err error)
- func (r *EnvironmentService) List(ctx context.Context, params EnvironmentListParams, ...) (res *pagination.EnvironmentsPage[Environment], err error)
- func (r *EnvironmentService) ListAutoPaging(ctx context.Context, params EnvironmentListParams, ...) *pagination.EnvironmentsPageAutoPager[Environment]
- func (r *EnvironmentService) MarkActive(ctx context.Context, body EnvironmentMarkActiveParams, ...) (res *EnvironmentMarkActiveResponse, err error)
- func (r *EnvironmentService) New(ctx context.Context, body EnvironmentNewParams, opts ...option.RequestOption) (res *EnvironmentNewResponse, err error)
- func (r *EnvironmentService) NewFromProject(ctx context.Context, body EnvironmentNewFromProjectParams, ...) (res *EnvironmentNewFromProjectResponse, err error)
- func (r *EnvironmentService) NewLogsToken(ctx context.Context, body EnvironmentNewLogsTokenParams, ...) (res *EnvironmentNewLogsTokenResponse, err error)
- func (r *EnvironmentService) Start(ctx context.Context, body EnvironmentStartParams, opts ...option.RequestOption) (res *EnvironmentStartResponse, err error)
- func (r *EnvironmentService) Stop(ctx context.Context, body EnvironmentStopParams, opts ...option.RequestOption) (res *EnvironmentStopResponse, err error)
- func (r *EnvironmentService) Update(ctx context.Context, body EnvironmentUpdateParams, ...) (res *EnvironmentUpdateResponse, err error)
- type EnvironmentSpec
- type EnvironmentSpecAutomationsFile
- type EnvironmentSpecAutomationsFileParam
- type EnvironmentSpecContent
- type EnvironmentSpecContentParam
- type EnvironmentSpecDevcontainer
- type EnvironmentSpecDevcontainerDotfiles
- type EnvironmentSpecDevcontainerDotfilesParam
- type EnvironmentSpecDevcontainerParam
- type EnvironmentSpecMachine
- type EnvironmentSpecMachineParam
- type EnvironmentSpecParam
- type EnvironmentSpecPort
- type EnvironmentSpecPortParam
- type EnvironmentSpecSSHPublicKey
- type EnvironmentSpecSSHPublicKeyParam
- type EnvironmentSpecSecret
- type EnvironmentSpecSecretParam
- type EnvironmentSpecTimeout
- type EnvironmentSpecTimeoutParam
- type EnvironmentStartParams
- type EnvironmentStartResponse
- type EnvironmentStatus
- type EnvironmentStatusAutomationsFile
- type EnvironmentStatusAutomationsFileAutomationsFilePresence
- type EnvironmentStatusAutomationsFilePhase
- type EnvironmentStatusContent
- type EnvironmentStatusContentGit
- type EnvironmentStatusContentGitChangedFile
- type EnvironmentStatusContentGitChangedFilesChangeType
- type EnvironmentStatusContentPhase
- type EnvironmentStatusDevcontainer
- type EnvironmentStatusDevcontainerDevcontainerFilePresence
- type EnvironmentStatusDevcontainerPhase
- type EnvironmentStatusEnvironmentURLs
- type EnvironmentStatusEnvironmentURLsPort
- type EnvironmentStatusEnvironmentURLsSSH
- type EnvironmentStatusMachine
- type EnvironmentStatusMachinePhase
- type EnvironmentStatusMachineVersions
- type EnvironmentStatusRunnerAck
- type EnvironmentStatusRunnerAckStatusCode
- type EnvironmentStatusSSHPublicKey
- type EnvironmentStatusSSHPublicKeysPhase
- type EnvironmentStatusSecret
- type EnvironmentStatusSecretsPhase
- type EnvironmentStopParams
- type EnvironmentStopResponse
- type EnvironmentUpdateParams
- type EnvironmentUpdateParamsSpec
- type EnvironmentUpdateParamsSpecAutomationsFile
- type EnvironmentUpdateParamsSpecContent
- type EnvironmentUpdateParamsSpecDevcontainer
- type EnvironmentUpdateParamsSpecPort
- type EnvironmentUpdateParamsSpecSSHPublicKey
- type EnvironmentUpdateParamsSpecTimeout
- type EnvironmentUpdateResponse
- type Error
- type ErrorCode
- type EventListParams
- type EventListParamsFilter
- type EventListParamsPagination
- type EventListResponse
- type EventService
- func (r *EventService) List(ctx context.Context, params EventListParams, opts ...option.RequestOption) (res *pagination.EntriesPage[EventListResponse], err error)
- func (r *EventService) ListAutoPaging(ctx context.Context, params EventListParams, opts ...option.RequestOption) *pagination.EntriesPageAutoPager[EventListResponse]
- func (r *EventService) WatchStreaming(ctx context.Context, body EventWatchParams, opts ...option.RequestOption) (stream *jsonl.Stream[EventWatchResponse])
- type EventWatchParams
- type EventWatchResponse
- type FieldValidationError
- type FieldValue
- type FieldValueParam
- type Group
- type GroupListParams
- type GroupListParamsPagination
- type GroupService
- func (r *GroupService) List(ctx context.Context, params GroupListParams, opts ...option.RequestOption) (res *pagination.GroupsPage[Group], err error)
- func (r *GroupService) ListAutoPaging(ctx context.Context, params GroupListParams, opts ...option.RequestOption) *pagination.GroupsPageAutoPager[Group]
- type HostAuthenticationToken
- type HostAuthenticationTokenSource
- type IdentityExchangeTokenParams
- type IdentityExchangeTokenResponse
- type IdentityGetAuthenticatedIdentityParams
- type IdentityGetAuthenticatedIdentityResponse
- type IdentityGetIDTokenParams
- type IdentityGetIDTokenResponse
- type IdentityService
- func (r *IdentityService) ExchangeToken(ctx context.Context, body IdentityExchangeTokenParams, ...) (res *IdentityExchangeTokenResponse, err error)
- func (r *IdentityService) GetAuthenticatedIdentity(ctx context.Context, body IdentityGetAuthenticatedIdentityParams, ...) (res *IdentityGetAuthenticatedIdentityResponse, err error)
- func (r *IdentityService) GetIDToken(ctx context.Context, body IdentityGetIDTokenParams, ...) (res *IdentityGetIDTokenResponse, err error)
- type InviteDomains
- type InviteDomainsParam
- type JoinableOrganization
- type LoginProvider
- type Organization
- type OrganizationDeleteParams
- type OrganizationDeleteResponse
- type OrganizationDomainVerificationDeleteParams
- type OrganizationDomainVerificationDeleteResponse
- type OrganizationDomainVerificationGetParams
- type OrganizationDomainVerificationGetResponse
- type OrganizationDomainVerificationListParams
- type OrganizationDomainVerificationListParamsPagination
- type OrganizationDomainVerificationNewParams
- type OrganizationDomainVerificationNewResponse
- type OrganizationDomainVerificationService
- func (r *OrganizationDomainVerificationService) Delete(ctx context.Context, body OrganizationDomainVerificationDeleteParams, ...) (res *OrganizationDomainVerificationDeleteResponse, err error)
- func (r *OrganizationDomainVerificationService) Get(ctx context.Context, body OrganizationDomainVerificationGetParams, ...) (res *OrganizationDomainVerificationGetResponse, err error)
- func (r *OrganizationDomainVerificationService) List(ctx context.Context, params OrganizationDomainVerificationListParams, ...) (res *pagination.DomainVerificationsPage[DomainVerification], err error)
- func (r *OrganizationDomainVerificationService) ListAutoPaging(ctx context.Context, params OrganizationDomainVerificationListParams, ...) *pagination.DomainVerificationsPageAutoPager[DomainVerification]
- func (r *OrganizationDomainVerificationService) New(ctx context.Context, body OrganizationDomainVerificationNewParams, ...) (res *OrganizationDomainVerificationNewResponse, err error)
- func (r *OrganizationDomainVerificationService) Verify(ctx context.Context, body OrganizationDomainVerificationVerifyParams, ...) (res *OrganizationDomainVerificationVerifyResponse, err error)
- type OrganizationDomainVerificationVerifyParams
- type OrganizationDomainVerificationVerifyResponse
- type OrganizationGetParams
- type OrganizationGetResponse
- type OrganizationInvite
- type OrganizationInviteGetParams
- type OrganizationInviteGetResponse
- type OrganizationInviteGetSummaryParams
- type OrganizationInviteGetSummaryResponse
- type OrganizationInviteNewParams
- type OrganizationInviteNewResponse
- type OrganizationInviteService
- func (r *OrganizationInviteService) Get(ctx context.Context, body OrganizationInviteGetParams, ...) (res *OrganizationInviteGetResponse, err error)
- func (r *OrganizationInviteService) GetSummary(ctx context.Context, body OrganizationInviteGetSummaryParams, ...) (res *OrganizationInviteGetSummaryResponse, err error)
- func (r *OrganizationInviteService) New(ctx context.Context, body OrganizationInviteNewParams, ...) (res *OrganizationInviteNewResponse, err error)
- type OrganizationJoinParams
- type OrganizationJoinResponse
- type OrganizationLeaveParams
- type OrganizationLeaveResponse
- type OrganizationListMembersParams
- type OrganizationListMembersParamsPagination
- type OrganizationListParams
- type OrganizationListParamsPagination
- type OrganizationMember
- type OrganizationNewParams
- type OrganizationNewResponse
- type OrganizationRole
- type OrganizationSSOConfigurationDeleteParams
- type OrganizationSSOConfigurationDeleteResponse
- type OrganizationSSOConfigurationGetParams
- type OrganizationSSOConfigurationGetResponse
- type OrganizationSSOConfigurationListParams
- type OrganizationSSOConfigurationListParamsPagination
- type OrganizationSSOConfigurationNewParams
- type OrganizationSSOConfigurationNewResponse
- type OrganizationSSOConfigurationService
- func (r *OrganizationSSOConfigurationService) Delete(ctx context.Context, body OrganizationSSOConfigurationDeleteParams, ...) (res *OrganizationSSOConfigurationDeleteResponse, err error)
- func (r *OrganizationSSOConfigurationService) Get(ctx context.Context, body OrganizationSSOConfigurationGetParams, ...) (res *OrganizationSSOConfigurationGetResponse, err error)
- func (r *OrganizationSSOConfigurationService) List(ctx context.Context, params OrganizationSSOConfigurationListParams, ...) (res *pagination.SSOConfigurationsPage[SSOConfiguration], err error)
- func (r *OrganizationSSOConfigurationService) ListAutoPaging(ctx context.Context, params OrganizationSSOConfigurationListParams, ...) *pagination.SSOConfigurationsPageAutoPager[SSOConfiguration]
- func (r *OrganizationSSOConfigurationService) New(ctx context.Context, body OrganizationSSOConfigurationNewParams, ...) (res *OrganizationSSOConfigurationNewResponse, err error)
- func (r *OrganizationSSOConfigurationService) Update(ctx context.Context, body OrganizationSSOConfigurationUpdateParams, ...) (res *OrganizationSSOConfigurationUpdateResponse, err error)
- type OrganizationSSOConfigurationUpdateParams
- type OrganizationSSOConfigurationUpdateResponse
- type OrganizationService
- func (r *OrganizationService) Delete(ctx context.Context, body OrganizationDeleteParams, ...) (res *OrganizationDeleteResponse, err error)
- func (r *OrganizationService) Get(ctx context.Context, body OrganizationGetParams, opts ...option.RequestOption) (res *OrganizationGetResponse, err error)
- func (r *OrganizationService) Join(ctx context.Context, body OrganizationJoinParams, opts ...option.RequestOption) (res *OrganizationJoinResponse, err error)
- func (r *OrganizationService) Leave(ctx context.Context, body OrganizationLeaveParams, ...) (res *OrganizationLeaveResponse, err error)
- func (r *OrganizationService) List(ctx context.Context, params OrganizationListParams, ...) (res *pagination.OrganizationsPage[Organization], err error)
- func (r *OrganizationService) ListAutoPaging(ctx context.Context, params OrganizationListParams, ...) *pagination.OrganizationsPageAutoPager[Organization]
- func (r *OrganizationService) ListMembers(ctx context.Context, params OrganizationListMembersParams, ...) (res *pagination.MembersPage[OrganizationMember], err error)
- func (r *OrganizationService) ListMembersAutoPaging(ctx context.Context, params OrganizationListMembersParams, ...) *pagination.MembersPageAutoPager[OrganizationMember]
- func (r *OrganizationService) New(ctx context.Context, body OrganizationNewParams, opts ...option.RequestOption) (res *OrganizationNewResponse, err error)
- func (r *OrganizationService) SetRole(ctx context.Context, body OrganizationSetRoleParams, ...) (res *OrganizationSetRoleResponse, err error)
- func (r *OrganizationService) Update(ctx context.Context, body OrganizationUpdateParams, ...) (res *OrganizationUpdateResponse, err error)
- type OrganizationSetRoleParams
- type OrganizationSetRoleResponse
- type OrganizationUpdateParams
- type OrganizationUpdateResponse
- type PersonalAccessToken
- type Principal
- type Project
- type ProjectDeleteParams
- type ProjectDeleteResponse
- type ProjectEnvironmentClass
- type ProjectEnvironmentClassParam
- type ProjectGetParams
- type ProjectGetResponse
- type ProjectListParams
- type ProjectListParamsPagination
- type ProjectMetadata
- type ProjectNewFromEnvironmentParams
- type ProjectNewFromEnvironmentResponse
- type ProjectNewParams
- type ProjectNewResponse
- type ProjectPolicy
- type ProjectPolicyDeleteParams
- type ProjectPolicyDeleteResponse
- type ProjectPolicyListParams
- type ProjectPolicyListParamsPagination
- type ProjectPolicyNewParams
- type ProjectPolicyNewResponse
- type ProjectPolicyService
- func (r *ProjectPolicyService) Delete(ctx context.Context, body ProjectPolicyDeleteParams, ...) (res *ProjectPolicyDeleteResponse, err error)
- func (r *ProjectPolicyService) List(ctx context.Context, params ProjectPolicyListParams, ...) (res *pagination.PoliciesPage[ProjectPolicy], err error)
- func (r *ProjectPolicyService) ListAutoPaging(ctx context.Context, params ProjectPolicyListParams, ...) *pagination.PoliciesPageAutoPager[ProjectPolicy]
- func (r *ProjectPolicyService) New(ctx context.Context, body ProjectPolicyNewParams, opts ...option.RequestOption) (res *ProjectPolicyNewResponse, err error)
- func (r *ProjectPolicyService) Update(ctx context.Context, body ProjectPolicyUpdateParams, ...) (res *ProjectPolicyUpdateResponse, err error)
- type ProjectPolicyUpdateParams
- type ProjectPolicyUpdateResponse
- type ProjectRole
- type ProjectService
- func (r *ProjectService) Delete(ctx context.Context, body ProjectDeleteParams, opts ...option.RequestOption) (res *ProjectDeleteResponse, err error)
- func (r *ProjectService) Get(ctx context.Context, body ProjectGetParams, opts ...option.RequestOption) (res *ProjectGetResponse, err error)
- func (r *ProjectService) List(ctx context.Context, params ProjectListParams, opts ...option.RequestOption) (res *pagination.ProjectsPage[Project], err error)
- func (r *ProjectService) ListAutoPaging(ctx context.Context, params ProjectListParams, opts ...option.RequestOption) *pagination.ProjectsPageAutoPager[Project]
- func (r *ProjectService) New(ctx context.Context, body ProjectNewParams, opts ...option.RequestOption) (res *ProjectNewResponse, err error)
- func (r *ProjectService) NewFromEnvironment(ctx context.Context, body ProjectNewFromEnvironmentParams, ...) (res *ProjectNewFromEnvironmentResponse, err error)
- func (r *ProjectService) Update(ctx context.Context, body ProjectUpdateParams, opts ...option.RequestOption) (res *ProjectUpdateResponse, err error)
- type ProjectUpdateParams
- type ProjectUpdateResponse
- type ProjectUsedBy
- type ProviderType
- type ResourceOperation
- type ResourceType
- type Runner
- type RunnerCapability
- type RunnerCheckAuthenticationForHostParams
- type RunnerCheckAuthenticationForHostResponse
- type RunnerCheckAuthenticationForHostResponseSupportsOauth2
- type RunnerCheckAuthenticationForHostResponseSupportsPat
- type RunnerConfiguration
- type RunnerConfigurationEnvironmentClassGetParams
- type RunnerConfigurationEnvironmentClassGetResponse
- type RunnerConfigurationEnvironmentClassListParams
- type RunnerConfigurationEnvironmentClassListParamsFilter
- type RunnerConfigurationEnvironmentClassListParamsPagination
- type RunnerConfigurationEnvironmentClassNewParams
- type RunnerConfigurationEnvironmentClassNewResponse
- type RunnerConfigurationEnvironmentClassService
- func (r *RunnerConfigurationEnvironmentClassService) Get(ctx context.Context, body RunnerConfigurationEnvironmentClassGetParams, ...) (res *RunnerConfigurationEnvironmentClassGetResponse, err error)
- func (r *RunnerConfigurationEnvironmentClassService) List(ctx context.Context, params RunnerConfigurationEnvironmentClassListParams, ...) (res *pagination.EnvironmentClassesPage[shared.EnvironmentClass], err error)
- func (r *RunnerConfigurationEnvironmentClassService) ListAutoPaging(ctx context.Context, params RunnerConfigurationEnvironmentClassListParams, ...) *pagination.EnvironmentClassesPageAutoPager[shared.EnvironmentClass]
- func (r *RunnerConfigurationEnvironmentClassService) New(ctx context.Context, body RunnerConfigurationEnvironmentClassNewParams, ...) (res *RunnerConfigurationEnvironmentClassNewResponse, err error)
- func (r *RunnerConfigurationEnvironmentClassService) Update(ctx context.Context, body RunnerConfigurationEnvironmentClassUpdateParams, ...) (res *RunnerConfigurationEnvironmentClassUpdateResponse, err error)
- type RunnerConfigurationEnvironmentClassUpdateParams
- type RunnerConfigurationEnvironmentClassUpdateResponse
- type RunnerConfigurationHostAuthenticationTokenDeleteParams
- type RunnerConfigurationHostAuthenticationTokenDeleteResponse
- type RunnerConfigurationHostAuthenticationTokenGetParams
- type RunnerConfigurationHostAuthenticationTokenGetResponse
- type RunnerConfigurationHostAuthenticationTokenListParams
- type RunnerConfigurationHostAuthenticationTokenListParamsFilter
- type RunnerConfigurationHostAuthenticationTokenListParamsPagination
- type RunnerConfigurationHostAuthenticationTokenNewParams
- type RunnerConfigurationHostAuthenticationTokenNewResponse
- type RunnerConfigurationHostAuthenticationTokenService
- func (r *RunnerConfigurationHostAuthenticationTokenService) Delete(ctx context.Context, ...) (res *RunnerConfigurationHostAuthenticationTokenDeleteResponse, err error)
- func (r *RunnerConfigurationHostAuthenticationTokenService) Get(ctx context.Context, body RunnerConfigurationHostAuthenticationTokenGetParams, ...) (res *RunnerConfigurationHostAuthenticationTokenGetResponse, err error)
- func (r *RunnerConfigurationHostAuthenticationTokenService) List(ctx context.Context, ...) (res *pagination.TokensPage[HostAuthenticationToken], err error)
- func (r *RunnerConfigurationHostAuthenticationTokenService) ListAutoPaging(ctx context.Context, ...) *pagination.TokensPageAutoPager[HostAuthenticationToken]
- func (r *RunnerConfigurationHostAuthenticationTokenService) New(ctx context.Context, body RunnerConfigurationHostAuthenticationTokenNewParams, ...) (res *RunnerConfigurationHostAuthenticationTokenNewResponse, err error)
- func (r *RunnerConfigurationHostAuthenticationTokenService) Update(ctx context.Context, ...) (res *RunnerConfigurationHostAuthenticationTokenUpdateResponse, err error)
- type RunnerConfigurationHostAuthenticationTokenUpdateParams
- type RunnerConfigurationHostAuthenticationTokenUpdateResponse
- type RunnerConfigurationParam
- type RunnerConfigurationSchema
- type RunnerConfigurationSchemaEnvironmentClass
- type RunnerConfigurationSchemaEnvironmentClassesBool
- type RunnerConfigurationSchemaEnvironmentClassesDisplay
- type RunnerConfigurationSchemaEnvironmentClassesEnum
- type RunnerConfigurationSchemaEnvironmentClassesInt
- type RunnerConfigurationSchemaEnvironmentClassesString
- type RunnerConfigurationSchemaGetParams
- type RunnerConfigurationSchemaGetResponse
- type RunnerConfigurationSchemaRunnerConfig
- type RunnerConfigurationSchemaRunnerConfigBool
- type RunnerConfigurationSchemaRunnerConfigDisplay
- type RunnerConfigurationSchemaRunnerConfigEnum
- type RunnerConfigurationSchemaRunnerConfigInt
- type RunnerConfigurationSchemaRunnerConfigString
- type RunnerConfigurationSchemaScm
- type RunnerConfigurationSchemaScmOAuth
- type RunnerConfigurationSchemaScmPat
- type RunnerConfigurationSchemaService
- type RunnerConfigurationScmIntegrationDeleteParams
- type RunnerConfigurationScmIntegrationDeleteResponse
- type RunnerConfigurationScmIntegrationGetParams
- type RunnerConfigurationScmIntegrationGetResponse
- type RunnerConfigurationScmIntegrationListParams
- type RunnerConfigurationScmIntegrationListParamsFilter
- type RunnerConfigurationScmIntegrationListParamsPagination
- type RunnerConfigurationScmIntegrationNewParams
- type RunnerConfigurationScmIntegrationNewResponse
- type RunnerConfigurationScmIntegrationService
- func (r *RunnerConfigurationScmIntegrationService) Delete(ctx context.Context, body RunnerConfigurationScmIntegrationDeleteParams, ...) (res *RunnerConfigurationScmIntegrationDeleteResponse, err error)
- func (r *RunnerConfigurationScmIntegrationService) Get(ctx context.Context, body RunnerConfigurationScmIntegrationGetParams, ...) (res *RunnerConfigurationScmIntegrationGetResponse, err error)
- func (r *RunnerConfigurationScmIntegrationService) List(ctx context.Context, params RunnerConfigurationScmIntegrationListParams, ...) (res *pagination.IntegrationsPage[ScmIntegration], err error)
- func (r *RunnerConfigurationScmIntegrationService) ListAutoPaging(ctx context.Context, params RunnerConfigurationScmIntegrationListParams, ...) *pagination.IntegrationsPageAutoPager[ScmIntegration]
- func (r *RunnerConfigurationScmIntegrationService) New(ctx context.Context, body RunnerConfigurationScmIntegrationNewParams, ...) (res *RunnerConfigurationScmIntegrationNewResponse, err error)
- func (r *RunnerConfigurationScmIntegrationService) Update(ctx context.Context, body RunnerConfigurationScmIntegrationUpdateParams, ...) (res *RunnerConfigurationScmIntegrationUpdateResponse, err error)
- type RunnerConfigurationScmIntegrationUpdateParams
- type RunnerConfigurationScmIntegrationUpdateResponse
- type RunnerConfigurationService
- type RunnerConfigurationValidateParams
- type RunnerConfigurationValidateParamsScmIntegration
- type RunnerConfigurationValidateResponse
- type RunnerDeleteParams
- type RunnerDeleteResponse
- type RunnerGetParams
- type RunnerGetResponse
- type RunnerKind
- type RunnerListParams
- type RunnerListParamsFilter
- type RunnerListParamsPagination
- type RunnerNewParams
- type RunnerNewResponse
- type RunnerNewRunnerTokenParams
- type RunnerNewRunnerTokenResponse
- type RunnerParseContextURLParams
- type RunnerParseContextURLResponse
- type RunnerParseContextURLResponseGit
- type RunnerPhase
- type RunnerPolicy
- type RunnerPolicyDeleteParams
- type RunnerPolicyDeleteResponse
- type RunnerPolicyListParams
- type RunnerPolicyListParamsPagination
- type RunnerPolicyNewParams
- type RunnerPolicyNewResponse
- type RunnerPolicyService
- func (r *RunnerPolicyService) Delete(ctx context.Context, body RunnerPolicyDeleteParams, ...) (res *RunnerPolicyDeleteResponse, err error)
- func (r *RunnerPolicyService) List(ctx context.Context, params RunnerPolicyListParams, ...) (res *pagination.PoliciesPage[RunnerPolicy], err error)
- func (r *RunnerPolicyService) ListAutoPaging(ctx context.Context, params RunnerPolicyListParams, ...) *pagination.PoliciesPageAutoPager[RunnerPolicy]
- func (r *RunnerPolicyService) New(ctx context.Context, body RunnerPolicyNewParams, opts ...option.RequestOption) (res *RunnerPolicyNewResponse, err error)
- func (r *RunnerPolicyService) Update(ctx context.Context, body RunnerPolicyUpdateParams, ...) (res *RunnerPolicyUpdateResponse, err error)
- type RunnerPolicyUpdateParams
- type RunnerPolicyUpdateResponse
- type RunnerProvider
- type RunnerReleaseChannel
- type RunnerRole
- type RunnerService
- func (r *RunnerService) CheckAuthenticationForHost(ctx context.Context, body RunnerCheckAuthenticationForHostParams, ...) (res *RunnerCheckAuthenticationForHostResponse, err error)
- func (r *RunnerService) Delete(ctx context.Context, body RunnerDeleteParams, opts ...option.RequestOption) (res *RunnerDeleteResponse, err error)
- func (r *RunnerService) Get(ctx context.Context, body RunnerGetParams, opts ...option.RequestOption) (res *RunnerGetResponse, err error)
- func (r *RunnerService) List(ctx context.Context, params RunnerListParams, opts ...option.RequestOption) (res *pagination.RunnersPage[Runner], err error)
- func (r *RunnerService) ListAutoPaging(ctx context.Context, params RunnerListParams, opts ...option.RequestOption) *pagination.RunnersPageAutoPager[Runner]
- func (r *RunnerService) New(ctx context.Context, body RunnerNewParams, opts ...option.RequestOption) (res *RunnerNewResponse, err error)
- func (r *RunnerService) NewRunnerToken(ctx context.Context, body RunnerNewRunnerTokenParams, ...) (res *RunnerNewRunnerTokenResponse, err error)
- func (r *RunnerService) ParseContextURL(ctx context.Context, body RunnerParseContextURLParams, ...) (res *RunnerParseContextURLResponse, err error)
- func (r *RunnerService) Update(ctx context.Context, body RunnerUpdateParams, opts ...option.RequestOption) (res *RunnerUpdateResponse, err error)
- type RunnerSpec
- type RunnerSpecParam
- type RunnerStatus
- type RunnerUpdateParams
- type RunnerUpdateParamsSpec
- type RunnerUpdateParamsSpecConfiguration
- type RunnerUpdateResponse
- type RunsOn
- type RunsOnDocker
- type RunsOnDockerParam
- type RunsOnParam
- type SSOConfiguration
- type SSOConfigurationState
- type ScmIntegration
- type ScmIntegrationOAuthConfig
- type ScmIntegrationValidationResult
- type Scope
- type Secret
- type SecretDeleteParams
- type SecretDeleteResponse
- type SecretGetValueParams
- type SecretGetValueResponse
- type SecretListParams
- type SecretListParamsFilter
- type SecretListParamsPagination
- type SecretNewParams
- type SecretNewResponse
- type SecretService
- func (r *SecretService) Delete(ctx context.Context, body SecretDeleteParams, opts ...option.RequestOption) (res *SecretDeleteResponse, err error)
- func (r *SecretService) GetValue(ctx context.Context, body SecretGetValueParams, opts ...option.RequestOption) (res *SecretGetValueResponse, err error)
- func (r *SecretService) List(ctx context.Context, params SecretListParams, opts ...option.RequestOption) (res *pagination.SecretsPage[Secret], err error)
- func (r *SecretService) ListAutoPaging(ctx context.Context, params SecretListParams, opts ...option.RequestOption) *pagination.SecretsPageAutoPager[Secret]
- func (r *SecretService) New(ctx context.Context, body SecretNewParams, opts ...option.RequestOption) (res *SecretNewResponse, err error)
- func (r *SecretService) UpdateValue(ctx context.Context, body SecretUpdateValueParams, ...) (res *SecretUpdateValueResponse, err error)
- type SecretUpdateValueParams
- type SecretUpdateValueResponse
- type Service
- type ServiceMetadata
- type ServiceMetadataParam
- type ServicePhase
- type ServiceSpec
- type ServiceSpecCommands
- type ServiceSpecCommandsParam
- type ServiceSpecParam
- type ServiceStatus
- type Subject
- type SubjectParam
- type Task
- type TaskExecution
- type TaskExecutionMetadata
- type TaskExecutionPhase
- type TaskExecutionSpec
- type TaskExecutionSpecPlan
- type TaskExecutionSpecPlanStep
- type TaskExecutionSpecPlanStepsTask
- type TaskExecutionStatus
- type TaskExecutionStatusStep
- type TaskMetadata
- type TaskMetadataParam
- type TaskSpec
- type TaskSpecParam
- type User
- type UserGetAuthenticatedUserParams
- type UserGetAuthenticatedUserResponse
- type UserPatDeleteParams
- type UserPatDeleteResponse
- type UserPatGetParams
- type UserPatGetResponse
- type UserPatListParams
- type UserPatListParamsFilter
- type UserPatListParamsPagination
- type UserPatService
- func (r *UserPatService) Delete(ctx context.Context, body UserPatDeleteParams, opts ...option.RequestOption) (res *UserPatDeleteResponse, err error)
- func (r *UserPatService) Get(ctx context.Context, body UserPatGetParams, opts ...option.RequestOption) (res *UserPatGetResponse, err error)
- func (r *UserPatService) List(ctx context.Context, params UserPatListParams, opts ...option.RequestOption) (res *pagination.PersonalAccessTokensPage[PersonalAccessToken], err error)
- func (r *UserPatService) ListAutoPaging(ctx context.Context, params UserPatListParams, opts ...option.RequestOption) *pagination.PersonalAccessTokensPageAutoPager[PersonalAccessToken]
- type UserService
- func (r *UserService) GetAuthenticatedUser(ctx context.Context, body UserGetAuthenticatedUserParams, ...) (res *UserGetAuthenticatedUserResponse, err error)
- func (r *UserService) SetSuspended(ctx context.Context, body UserSetSuspendedParams, opts ...option.RequestOption) (res *UserSetSuspendedResponse, err error)
- type UserSetSuspendedParams
- type UserSetSuspendedResponse
- type UserStatus
Constants ¶
const ErrorCodeAborted = apierror.ErrorCodeAborted
const ErrorCodeAlreadyExists = apierror.ErrorCodeAlreadyExists
const ErrorCodeCanceled = apierror.ErrorCodeCanceled
const ErrorCodeDataLoss = apierror.ErrorCodeDataLoss
const ErrorCodeDeadlineExceeded = apierror.ErrorCodeDeadlineExceeded
const ErrorCodeFailedPrecondition = apierror.ErrorCodeFailedPrecondition
const ErrorCodeInternal = apierror.ErrorCodeInternal
const ErrorCodeInvalidArgument = apierror.ErrorCodeInvalidArgument
const ErrorCodeNotFound = apierror.ErrorCodeNotFound
const ErrorCodeOutOfRange = apierror.ErrorCodeOutOfRange
const ErrorCodePermissionDenied = apierror.ErrorCodePermissionDenied
const ErrorCodeResourceExhausted = apierror.ErrorCodeResourceExhausted
const ErrorCodeUnauthenticated = apierror.ErrorCodeUnauthenticated
const ErrorCodeUnimplemented = apierror.ErrorCodeUnimplemented
const ErrorCodeUnknown = apierror.ErrorCodeUnknown
const OrganizationRoleAdmin = shared.OrganizationRoleAdmin
This is an alias to an internal value.
const OrganizationRoleMember = shared.OrganizationRoleMember
This is an alias to an internal value.
const OrganizationRoleUnspecified = shared.OrganizationRoleUnspecified
This is an alias to an internal value.
const PrincipalAccount = shared.PrincipalAccount
This is an alias to an internal value.
const PrincipalEnvironment = shared.PrincipalEnvironment
This is an alias to an internal value.
const PrincipalRunner = shared.PrincipalRunner
This is an alias to an internal value.
const PrincipalServiceAccount = shared.PrincipalServiceAccount
This is an alias to an internal value.
const PrincipalUnspecified = shared.PrincipalUnspecified
This is an alias to an internal value.
const PrincipalUser = shared.PrincipalUser
This is an alias to an internal value.
const TaskExecutionPhaseFailed = shared.TaskExecutionPhaseFailed
This is an alias to an internal value.
const TaskExecutionPhasePending = shared.TaskExecutionPhasePending
This is an alias to an internal value.
const TaskExecutionPhaseRunning = shared.TaskExecutionPhaseRunning
This is an alias to an internal value.
const TaskExecutionPhaseStopped = shared.TaskExecutionPhaseStopped
This is an alias to an internal value.
const TaskExecutionPhaseSucceeded = shared.TaskExecutionPhaseSucceeded
This is an alias to an internal value.
const TaskExecutionPhaseUnspecified = shared.TaskExecutionPhaseUnspecified
This is an alias to an internal value.
const UserStatusActive = shared.UserStatusActive
This is an alias to an internal value.
const UserStatusLeft = shared.UserStatusLeft
This is an alias to an internal value.
const UserStatusSuspended = shared.UserStatusSuspended
This is an alias to an internal value.
const UserStatusUnspecified = shared.UserStatusUnspecified
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type Account ¶
type Account struct { ID string `json:"id,required" format:"uuid"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. CreatedAt time.Time `json:"createdAt,required" format:"date-time"` Email string `json:"email,required"` Name string `json:"name,required"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. UpdatedAt time.Time `json:"updatedAt,required" format:"date-time"` AvatarURL string `json:"avatarUrl"` Joinables []JoinableOrganization `json:"joinables"` Memberships []AccountMembership `json:"memberships"` // organization_id is the ID of the organization the account is owned by if it's // created through custom SSO OrganizationID string `json:"organizationId,nullable"` // public_email_provider is true if the email for the Account matches a known // public email provider PublicEmailProvider bool `json:"publicEmailProvider"` JSON accountJSON `json:"-"` }
func (*Account) UnmarshalJSON ¶
type AccountDeleteParams ¶
type AccountDeleteParams struct {
AccountID param.Field[string] `json:"accountId,required" format:"uuid"`
}
func (AccountDeleteParams) MarshalJSON ¶
func (r AccountDeleteParams) MarshalJSON() (data []byte, err error)
type AccountDeleteResponse ¶
type AccountDeleteResponse = interface{}
type AccountGetParams ¶
func (AccountGetParams) MarshalJSON ¶
func (r AccountGetParams) MarshalJSON() (data []byte, err error)
type AccountGetResponse ¶
type AccountGetResponse struct { Account Account `json:"account,required"` JSON accountGetResponseJSON `json:"-"` }
func (*AccountGetResponse) UnmarshalJSON ¶
func (r *AccountGetResponse) UnmarshalJSON(data []byte) (err error)
type AccountGetSSOLoginURLParams ¶
type AccountGetSSOLoginURLParams struct { // email is the email the user wants to login with Email param.Field[string] `json:"email,required" format:"email"` // return_to is the URL the user will be redirected to after login ReturnTo param.Field[string] `json:"returnTo" format:"uri"` }
func (AccountGetSSOLoginURLParams) MarshalJSON ¶
func (r AccountGetSSOLoginURLParams) MarshalJSON() (data []byte, err error)
type AccountGetSSOLoginURLResponse ¶
type AccountGetSSOLoginURLResponse struct { // login_url is the URL to redirect the user to for SSO login LoginURL string `json:"loginUrl,required"` JSON accountGetSSOLoginURLResponseJSON `json:"-"` }
func (*AccountGetSSOLoginURLResponse) UnmarshalJSON ¶
func (r *AccountGetSSOLoginURLResponse) UnmarshalJSON(data []byte) (err error)
type AccountListLoginProvidersParams ¶
type AccountListLoginProvidersParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` // filter contains the filter options for listing login methods Filter param.Field[AccountListLoginProvidersParamsFilter] `json:"filter"` // pagination contains the pagination options for listing login methods Pagination param.Field[AccountListLoginProvidersParamsPagination] `json:"pagination"` }
func (AccountListLoginProvidersParams) MarshalJSON ¶
func (r AccountListLoginProvidersParams) MarshalJSON() (data []byte, err error)
func (AccountListLoginProvidersParams) URLQuery ¶
func (r AccountListLoginProvidersParams) URLQuery() (v url.Values)
URLQuery serializes AccountListLoginProvidersParams's query parameters as `url.Values`.
type AccountListLoginProvidersParamsFilter ¶
type AccountListLoginProvidersParamsFilter struct { // invite_id is the ID of the invite URL the user wants to login with InviteID param.Field[string] `json:"inviteId" format:"uuid"` }
filter contains the filter options for listing login methods
func (AccountListLoginProvidersParamsFilter) MarshalJSON ¶
func (r AccountListLoginProvidersParamsFilter) MarshalJSON() (data []byte, err error)
type AccountListLoginProvidersParamsPagination ¶
type AccountListLoginProvidersParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing login methods
func (AccountListLoginProvidersParamsPagination) MarshalJSON ¶
func (r AccountListLoginProvidersParamsPagination) MarshalJSON() (data []byte, err error)
type AccountMembership ¶
type AccountMembership struct { // organization_id is the id of the organization the user is a member of OrganizationID string `json:"organizationId,required" format:"uuid"` // organization_name is the name of the organization the user is a member of OrganizationName string `json:"organizationName,required"` // user_id is the ID the user has in the organization UserID string `json:"userId,required" format:"uuid"` // user_role is the role the user has in the organization UserRole shared.OrganizationRole `json:"userRole,required"` // organization_name is the member count of the organization the user is a member // of OrganizationMemberCount int64 `json:"organizationMemberCount"` JSON accountMembershipJSON `json:"-"` }
func (*AccountMembership) UnmarshalJSON ¶
func (r *AccountMembership) UnmarshalJSON(data []byte) (err error)
type AccountService ¶
type AccountService struct {
Options []option.RequestOption
}
AccountService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountService method instead.
func NewAccountService ¶
func NewAccountService(opts ...option.RequestOption) (r *AccountService)
NewAccountService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountService) Delete ¶
func (r *AccountService) Delete(ctx context.Context, body AccountDeleteParams, opts ...option.RequestOption) (res *AccountDeleteResponse, err error)
Deletes an account permanently.
Use this method to:
- Remove unused accounts - Clean up test accounts - Complete account deletion requests
The account must not be an active member of any organization.
### Examples
- Delete account:
Permanently removes an account. ```yaml accountId: "f53d2330-3795-4c5d-a1f3-453121af9c60" ```
func (*AccountService) Get ¶
func (r *AccountService) Get(ctx context.Context, body AccountGetParams, opts ...option.RequestOption) (res *AccountGetResponse, err error)
Gets information about the currently authenticated account.
Use this method to:
- Retrieve account profile information - Check organization memberships - View account settings - Get joinable organizations
### Examples
- Get account details:
Retrieves information about the authenticated account. ```yaml {} ```
func (*AccountService) GetSSOLoginURL ¶
func (r *AccountService) GetSSOLoginURL(ctx context.Context, body AccountGetSSOLoginURLParams, opts ...option.RequestOption) (res *AccountGetSSOLoginURLResponse, err error)
Gets the SSO login URL for a specific email domain.
Use this method to:
- Initiate SSO authentication - Get organization-specific login URLs - Handle SSO redirects
### Examples
- Get login URL:
Retrieves SSO URL for email domain. ```yaml email: "user@company.com" ```
- Get URL with return path:
Gets SSO URL with specific return location. ```yaml email: "user@company.com" returnTo: "https://gitpod.io/workspaces" ```
func (*AccountService) ListLoginProviders ¶
func (r *AccountService) ListLoginProviders(ctx context.Context, params AccountListLoginProvidersParams, opts ...option.RequestOption) (res *pagination.LoginProvidersPage[LoginProvider], err error)
Lists available login providers with optional filtering.
Use this method to:
- View supported authentication methods - Get provider-specific login URLs - Filter providers by invite
### Examples
- List all providers:
Shows all available login providers. ```yaml pagination: pageSize: 20 ```
- List for specific invite:
Shows providers available for an invite. ```yaml filter: inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" pagination: pageSize: 20 ```
func (*AccountService) ListLoginProvidersAutoPaging ¶
func (r *AccountService) ListLoginProvidersAutoPaging(ctx context.Context, params AccountListLoginProvidersParams, opts ...option.RequestOption) *pagination.LoginProvidersPageAutoPager[LoginProvider]
Lists available login providers with optional filtering.
Use this method to:
- View supported authentication methods - Get provider-specific login URLs - Filter providers by invite
### Examples
- List all providers:
Shows all available login providers. ```yaml pagination: pageSize: 20 ```
- List for specific invite:
Shows providers available for an invite. ```yaml filter: inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" pagination: pageSize: 20 ```
type AdmissionLevel ¶
type AdmissionLevel string
Admission level describes who can access an environment instance and its ports.
const ( AdmissionLevelUnspecified AdmissionLevel = "ADMISSION_LEVEL_UNSPECIFIED" AdmissionLevelOwnerOnly AdmissionLevel = "ADMISSION_LEVEL_OWNER_ONLY" AdmissionLevelEveryone AdmissionLevel = "ADMISSION_LEVEL_EVERYONE" )
func (AdmissionLevel) IsKnown ¶
func (r AdmissionLevel) IsKnown() bool
type AutomationTrigger ¶
type AutomationTrigger = shared.AutomationTrigger
An AutomationTrigger represents a trigger for an automation action. The `post_environment_start` field indicates that the automation should be triggered after the environment has started. The `post_devcontainer_start` field indicates that the automation should be triggered after the dev container has started.
This is an alias to an internal type.
type AutomationTriggerParam ¶
type AutomationTriggerParam = shared.AutomationTriggerParam
An AutomationTrigger represents a trigger for an automation action. The `post_environment_start` field indicates that the automation should be triggered after the environment has started. The `post_devcontainer_start` field indicates that the automation should be triggered after the dev container has started.
This is an alias to an internal type.
type AutomationsFileParam ¶
type AutomationsFileParam struct { Services param.Field[map[string]AutomationsFileServiceParam] `json:"services"` Tasks param.Field[map[string]AutomationsFileTaskParam] `json:"tasks"` }
WARN: Do not remove any field here, as it will break reading automation yaml files. We error if there are any unknown fields in the yaml (to ensure the yaml is correct), but would break if we removed any fields. This includes marking a field as "reserved" in the proto file, this will also break reading the yaml.
func (AutomationsFileParam) MarshalJSON ¶
func (r AutomationsFileParam) MarshalJSON() (data []byte, err error)
type AutomationsFileServiceParam ¶
type AutomationsFileServiceParam struct { Commands param.Field[AutomationsFileServicesCommandsParam] `json:"commands"` Description param.Field[string] `json:"description"` Name param.Field[string] `json:"name"` RunsOn param.Field[shared.RunsOnParam] `json:"runsOn"` TriggeredBy param.Field[[]AutomationsFileServicesTriggeredBy] `json:"triggeredBy"` }
func (AutomationsFileServiceParam) MarshalJSON ¶
func (r AutomationsFileServiceParam) MarshalJSON() (data []byte, err error)
type AutomationsFileServicesCommandsParam ¶
type AutomationsFileServicesCommandsParam struct { // ready is an optional command that is run repeatedly until it exits with a zero // exit code. If set, the service will first go into a Starting phase, and then // into a Running phase once the ready command exits with a zero exit code. Ready param.Field[string] `json:"ready"` // start is the command to start and run the service. If start exits, the service // will transition to the following phase: // // - Stopped: if the exit code is 0 // - Failed: if the exit code is not 0 If the stop command is not set, the start // command will receive a SIGTERM signal when the service is requested to stop. // If it does not exit within 2 minutes, it will receive a SIGKILL signal. Start param.Field[string] `json:"start"` // stop is an optional command that runs when the service is requested to stop. If // set, instead of sending a SIGTERM signal to the start command, the stop command // will be run. Once the stop command exits, the start command will receive a // SIGKILL signal. If the stop command exits with a non-zero exit code, the service // will transition to the Failed phase. If the stop command does not exit within 2 // minutes, a SIGKILL signal will be sent to both the start and stop commands. Stop param.Field[string] `json:"stop"` }
func (AutomationsFileServicesCommandsParam) MarshalJSON ¶
func (r AutomationsFileServicesCommandsParam) MarshalJSON() (data []byte, err error)
type AutomationsFileServicesTriggeredBy ¶
type AutomationsFileServicesTriggeredBy string
const ( AutomationsFileServicesTriggeredByManual AutomationsFileServicesTriggeredBy = "manual" AutomationsFileServicesTriggeredByPostEnvironmentStart AutomationsFileServicesTriggeredBy = "postEnvironmentStart" AutomationsFileServicesTriggeredByPostDevcontainerStart AutomationsFileServicesTriggeredBy = "postDevcontainerStart" )
func (AutomationsFileServicesTriggeredBy) IsKnown ¶
func (r AutomationsFileServicesTriggeredBy) IsKnown() bool
type AutomationsFileTaskParam ¶
type AutomationsFileTaskParam struct { Command param.Field[string] `json:"command"` DependsOn param.Field[[]string] `json:"dependsOn"` Description param.Field[string] `json:"description"` Name param.Field[string] `json:"name"` RunsOn param.Field[shared.RunsOnParam] `json:"runsOn"` TriggeredBy param.Field[[]AutomationsFileTasksTriggeredBy] `json:"triggeredBy"` }
func (AutomationsFileTaskParam) MarshalJSON ¶
func (r AutomationsFileTaskParam) MarshalJSON() (data []byte, err error)
type AutomationsFileTasksTriggeredBy ¶
type AutomationsFileTasksTriggeredBy string
const ( AutomationsFileTasksTriggeredByManual AutomationsFileTasksTriggeredBy = "manual" AutomationsFileTasksTriggeredByPostEnvironmentStart AutomationsFileTasksTriggeredBy = "postEnvironmentStart" AutomationsFileTasksTriggeredByPostDevcontainerStart AutomationsFileTasksTriggeredBy = "postDevcontainerStart" )
func (AutomationsFileTasksTriggeredBy) IsKnown ¶
func (r AutomationsFileTasksTriggeredBy) IsKnown() bool
type Client ¶
type Client struct { Options []option.RequestOption Accounts *AccountService Editors *EditorService Environments *EnvironmentService Events *EventService Groups *GroupService Identity *IdentityService Organizations *OrganizationService Projects *ProjectService Runners *RunnerService Secrets *SecretService Users *UserService }
Client creates a struct with services and top level methods that help with interacting with the gitpod API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (GITPOD_API_KEY). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Post ¶
func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type DomainVerification ¶
type DomainVerification struct { ID string `json:"id,required" format:"uuid"` Domain string `json:"domain,required"` OrganizationID string `json:"organizationId,required" format:"uuid"` State DomainVerificationState `json:"state,required"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. CreatedAt time.Time `json:"createdAt" format:"date-time"` VerificationToken string `json:"verificationToken"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. VerifiedAt time.Time `json:"verifiedAt" format:"date-time"` JSON domainVerificationJSON `json:"-"` }
func (*DomainVerification) UnmarshalJSON ¶
func (r *DomainVerification) UnmarshalJSON(data []byte) (err error)
type DomainVerificationState ¶
type DomainVerificationState string
const ( DomainVerificationStateUnspecified DomainVerificationState = "DOMAIN_VERIFICATION_STATE_UNSPECIFIED" DomainVerificationStatePending DomainVerificationState = "DOMAIN_VERIFICATION_STATE_PENDING" DomainVerificationStateVerified DomainVerificationState = "DOMAIN_VERIFICATION_STATE_VERIFIED" )
func (DomainVerificationState) IsKnown ¶
func (r DomainVerificationState) IsKnown() bool
type Editor ¶
type Editor struct { ID string `json:"id,required" format:"uuid"` InstallationInstructions string `json:"installationInstructions,required"` Name string `json:"name,required"` URLTemplate string `json:"urlTemplate,required"` Alias string `json:"alias"` IconURL string `json:"iconUrl"` ShortDescription string `json:"shortDescription"` JSON editorJSON `json:"-"` }
func (*Editor) UnmarshalJSON ¶
type EditorGetParams ¶
type EditorGetParams struct { // id is the ID of the editor to get ID param.Field[string] `json:"id,required"` }
func (EditorGetParams) MarshalJSON ¶
func (r EditorGetParams) MarshalJSON() (data []byte, err error)
type EditorGetResponse ¶
type EditorGetResponse struct { // editor contains the editor Editor Editor `json:"editor,required"` JSON editorGetResponseJSON `json:"-"` }
func (*EditorGetResponse) UnmarshalJSON ¶
func (r *EditorGetResponse) UnmarshalJSON(data []byte) (err error)
type EditorListParams ¶
type EditorListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` // pagination contains the pagination options for listing environments Pagination param.Field[EditorListParamsPagination] `json:"pagination"` }
func (EditorListParams) MarshalJSON ¶
func (r EditorListParams) MarshalJSON() (data []byte, err error)
func (EditorListParams) URLQuery ¶
func (r EditorListParams) URLQuery() (v url.Values)
URLQuery serializes EditorListParams's query parameters as `url.Values`.
type EditorListParamsPagination ¶
type EditorListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing environments
func (EditorListParamsPagination) MarshalJSON ¶
func (r EditorListParamsPagination) MarshalJSON() (data []byte, err error)
type EditorResolveURLParams ¶
type EditorResolveURLParams struct { // editorId is the ID of the editor to resolve the URL for EditorID param.Field[string] `json:"editorId,required" format:"uuid"` // environmentId is the ID of the environment to resolve the URL for EnvironmentID param.Field[string] `json:"environmentId,required" format:"uuid"` // organizationId is the ID of the organization to resolve the URL for OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"` }
func (EditorResolveURLParams) MarshalJSON ¶
func (r EditorResolveURLParams) MarshalJSON() (data []byte, err error)
type EditorResolveURLResponse ¶
type EditorResolveURLResponse struct { // url is the resolved editor URL URL string `json:"url,required"` JSON editorResolveURLResponseJSON `json:"-"` }
func (*EditorResolveURLResponse) UnmarshalJSON ¶
func (r *EditorResolveURLResponse) UnmarshalJSON(data []byte) (err error)
type EditorService ¶
type EditorService struct {
Options []option.RequestOption
}
EditorService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEditorService method instead.
func NewEditorService ¶
func NewEditorService(opts ...option.RequestOption) (r *EditorService)
NewEditorService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EditorService) Get ¶
func (r *EditorService) Get(ctx context.Context, body EditorGetParams, opts ...option.RequestOption) (res *EditorGetResponse, err error)
Gets details about a specific editor.
Use this method to:
- View editor information - Get editor configuration
### Examples
- Get editor details:
Retrieves information about a specific editor. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*EditorService) List ¶
func (r *EditorService) List(ctx context.Context, params EditorListParams, opts ...option.RequestOption) (res *pagination.EditorsPage[Editor], err error)
Lists all available code editors.
Use this method to:
- View supported editors - Get editor capabilities - Browse editor options - Check editor availability
### Examples
- List editors:
Shows all available editors with pagination. ```yaml pagination: pageSize: 20 ```
func (*EditorService) ListAutoPaging ¶
func (r *EditorService) ListAutoPaging(ctx context.Context, params EditorListParams, opts ...option.RequestOption) *pagination.EditorsPageAutoPager[Editor]
Lists all available code editors.
Use this method to:
- View supported editors - Get editor capabilities - Browse editor options - Check editor availability
### Examples
- List editors:
Shows all available editors with pagination. ```yaml pagination: pageSize: 20 ```
func (*EditorService) ResolveURL ¶
func (r *EditorService) ResolveURL(ctx context.Context, body EditorResolveURLParams, opts ...option.RequestOption) (res *EditorResolveURLResponse, err error)
Resolves the URL for accessing an editor in a specific environment.
Use this method to:
- Get editor access URLs - Launch editors for environments - Set up editor connections - Configure editor access
### Examples
- Resolve editor URL:
Gets the URL for accessing an editor in an environment. ```yaml editorId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ```
type Environment ¶
type Environment struct { // ID is a unique identifier of this environment. No other environment with the // same name must be managed by this environment manager ID string `json:"id,required"` // Metadata is data associated with this environment that's required for other // parts of Gitpod to function Metadata EnvironmentMetadata `json:"metadata"` // Spec is the configuration of the environment that's required for the runner to // start the environment Spec EnvironmentSpec `json:"spec"` // Status is the current status of the environment Status EnvironmentStatus `json:"status"` JSON environmentJSON `json:"-"` }
+resource get environment
func (*Environment) UnmarshalJSON ¶
func (r *Environment) UnmarshalJSON(data []byte) (err error)
type EnvironmentActivitySignal ¶
type EnvironmentActivitySignal struct { // source of the activity signal, such as "VS Code", "SSH", or "Automations". It // should be a human-readable string that describes the source of the activity // signal. Source string `json:"source"` // timestamp of when the activity was observed by the source. Only reported every 5 // minutes. Zero value means no activity was observed. Timestamp time.Time `json:"timestamp" format:"date-time"` JSON environmentActivitySignalJSON `json:"-"` }
EnvironmentActivitySignal used to signal activity for an environment.
func (*EnvironmentActivitySignal) UnmarshalJSON ¶
func (r *EnvironmentActivitySignal) UnmarshalJSON(data []byte) (err error)
type EnvironmentActivitySignalParam ¶
type EnvironmentActivitySignalParam struct { // source of the activity signal, such as "VS Code", "SSH", or "Automations". It // should be a human-readable string that describes the source of the activity // signal. Source param.Field[string] `json:"source"` // timestamp of when the activity was observed by the source. Only reported every 5 // minutes. Zero value means no activity was observed. Timestamp param.Field[time.Time] `json:"timestamp" format:"date-time"` }
EnvironmentActivitySignal used to signal activity for an environment.
func (EnvironmentActivitySignalParam) MarshalJSON ¶
func (r EnvironmentActivitySignalParam) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationService ¶
type EnvironmentAutomationService struct { Options []option.RequestOption Services *EnvironmentAutomationServiceService Tasks *EnvironmentAutomationTaskService }
EnvironmentAutomationService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvironmentAutomationService method instead.
func NewEnvironmentAutomationService ¶
func NewEnvironmentAutomationService(opts ...option.RequestOption) (r *EnvironmentAutomationService)
NewEnvironmentAutomationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EnvironmentAutomationService) Upsert ¶
func (r *EnvironmentAutomationService) Upsert(ctx context.Context, body EnvironmentAutomationUpsertParams, opts ...option.RequestOption) (res *EnvironmentAutomationUpsertResponse, err error)
Upserts the automations file for the given environment.
Use this method to:
- Configure environment automations - Update automation settings - Manage automation files
### Examples
- Update automations file:
Updates or creates the automations configuration. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" automationsFile: services: web-server: name: "Web Server" description: "Development web server" commands: start: "npm run dev" ready: "curl -s http://localhost:3000" triggeredBy: - postDevcontainerStart tasks: build: name: "Build Project" description: "Builds the project artifacts" command: "npm run build" triggeredBy: - postEnvironmentStart ```
type EnvironmentAutomationServiceDeleteParams ¶
type EnvironmentAutomationServiceDeleteParams struct { ID param.Field[string] `json:"id" format:"uuid"` Force param.Field[bool] `json:"force"` }
func (EnvironmentAutomationServiceDeleteParams) MarshalJSON ¶
func (r EnvironmentAutomationServiceDeleteParams) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationServiceDeleteResponse ¶
type EnvironmentAutomationServiceDeleteResponse = interface{}
type EnvironmentAutomationServiceGetParams ¶
type EnvironmentAutomationServiceGetParams struct {
ID param.Field[string] `json:"id" format:"uuid"`
}
func (EnvironmentAutomationServiceGetParams) MarshalJSON ¶
func (r EnvironmentAutomationServiceGetParams) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationServiceGetResponse ¶
type EnvironmentAutomationServiceGetResponse struct { Service Service `json:"service,required"` JSON environmentAutomationServiceGetResponseJSON `json:"-"` }
func (*EnvironmentAutomationServiceGetResponse) UnmarshalJSON ¶
func (r *EnvironmentAutomationServiceGetResponse) UnmarshalJSON(data []byte) (err error)
type EnvironmentAutomationServiceListParams ¶
type EnvironmentAutomationServiceListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` // filter contains the filter options for listing services Filter param.Field[EnvironmentAutomationServiceListParamsFilter] `json:"filter"` // pagination contains the pagination options for listing services Pagination param.Field[EnvironmentAutomationServiceListParamsPagination] `json:"pagination"` }
func (EnvironmentAutomationServiceListParams) MarshalJSON ¶
func (r EnvironmentAutomationServiceListParams) MarshalJSON() (data []byte, err error)
func (EnvironmentAutomationServiceListParams) URLQuery ¶
func (r EnvironmentAutomationServiceListParams) URLQuery() (v url.Values)
URLQuery serializes EnvironmentAutomationServiceListParams's query parameters as `url.Values`.
type EnvironmentAutomationServiceListParamsFilter ¶
type EnvironmentAutomationServiceListParamsFilter struct { // environment_ids filters the response to only services of these environments EnvironmentIDs param.Field[[]string] `json:"environmentIds" format:"uuid"` // references filters the response to only services with these references References param.Field[[]string] `json:"references"` // service_ids filters the response to only services with these IDs ServiceIDs param.Field[[]string] `json:"serviceIds" format:"uuid"` }
filter contains the filter options for listing services
func (EnvironmentAutomationServiceListParamsFilter) MarshalJSON ¶
func (r EnvironmentAutomationServiceListParamsFilter) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationServiceListParamsPagination ¶
type EnvironmentAutomationServiceListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing services
func (EnvironmentAutomationServiceListParamsPagination) MarshalJSON ¶
func (r EnvironmentAutomationServiceListParamsPagination) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationServiceNewParams ¶
type EnvironmentAutomationServiceNewParams struct { EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"` Metadata param.Field[ServiceMetadataParam] `json:"metadata"` Spec param.Field[ServiceSpecParam] `json:"spec"` }
func (EnvironmentAutomationServiceNewParams) MarshalJSON ¶
func (r EnvironmentAutomationServiceNewParams) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationServiceNewResponse ¶
type EnvironmentAutomationServiceNewResponse struct { Service Service `json:"service,required"` JSON environmentAutomationServiceNewResponseJSON `json:"-"` }
func (*EnvironmentAutomationServiceNewResponse) UnmarshalJSON ¶
func (r *EnvironmentAutomationServiceNewResponse) UnmarshalJSON(data []byte) (err error)
type EnvironmentAutomationServiceService ¶
type EnvironmentAutomationServiceService struct {
Options []option.RequestOption
}
EnvironmentAutomationServiceService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvironmentAutomationServiceService method instead.
func NewEnvironmentAutomationServiceService ¶
func NewEnvironmentAutomationServiceService(opts ...option.RequestOption) (r *EnvironmentAutomationServiceService)
NewEnvironmentAutomationServiceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EnvironmentAutomationServiceService) Delete ¶
func (r *EnvironmentAutomationServiceService) Delete(ctx context.Context, body EnvironmentAutomationServiceDeleteParams, opts ...option.RequestOption) (res *EnvironmentAutomationServiceDeleteResponse, err error)
Deletes an automation service. This call does not block until the service is deleted. If the service is not stopped it will be stopped before deletion.
Use this method to:
- Remove unused services - Clean up service configurations - Stop and delete services
### Examples
- Delete service:
Removes a service after stopping it. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" force: false ```
- Force delete:
Immediately removes a service. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" force: true ```
func (*EnvironmentAutomationServiceService) Get ¶
func (r *EnvironmentAutomationServiceService) Get(ctx context.Context, body EnvironmentAutomationServiceGetParams, opts ...option.RequestOption) (res *EnvironmentAutomationServiceGetResponse, err error)
Gets details about a specific automation service.
Use this method to:
- Check service status - View service configuration - Monitor service health - Retrieve service metadata
### Examples
- Get service details:
Retrieves information about a specific service. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*EnvironmentAutomationServiceService) List ¶
func (r *EnvironmentAutomationServiceService) List(ctx context.Context, params EnvironmentAutomationServiceListParams, opts ...option.RequestOption) (res *pagination.ServicesPage[Service], err error)
Lists automation services with optional filtering.
Use this method to:
- View all services in an environment - Filter services by reference - Monitor service status
### Examples
- List environment services:
Shows all services for an environment. ```yaml filter: environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"] pagination: pageSize: 20 ```
- Filter by reference:
Lists services matching specific references. ```yaml filter: references: ["web-server", "database"] pagination: pageSize: 20 ```
func (*EnvironmentAutomationServiceService) ListAutoPaging ¶
func (r *EnvironmentAutomationServiceService) ListAutoPaging(ctx context.Context, params EnvironmentAutomationServiceListParams, opts ...option.RequestOption) *pagination.ServicesPageAutoPager[Service]
Lists automation services with optional filtering.
Use this method to:
- View all services in an environment - Filter services by reference - Monitor service status
### Examples
- List environment services:
Shows all services for an environment. ```yaml filter: environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"] pagination: pageSize: 20 ```
- Filter by reference:
Lists services matching specific references. ```yaml filter: references: ["web-server", "database"] pagination: pageSize: 20 ```
func (*EnvironmentAutomationServiceService) New ¶
func (r *EnvironmentAutomationServiceService) New(ctx context.Context, body EnvironmentAutomationServiceNewParams, opts ...option.RequestOption) (res *EnvironmentAutomationServiceNewResponse, err error)
Creates a new automation service for an environment.
Use this method to:
- Set up long-running services - Configure service triggers - Define service dependencies - Specify runtime environments
### Examples
- Create basic service:
Creates a simple service with start command. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" metadata: reference: "web-server" name: "Web Server" description: "Runs the development web server" triggeredBy: - postDevcontainerStart: true spec: commands: start: "npm run dev" ready: "curl -s http://localhost:3000" ```
- Create Docker-based service:
Creates a service running in a specific container. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" metadata: reference: "redis" name: "Redis Server" description: "Redis cache service" spec: commands: start: "redis-server" runsOn: docker: image: "redis:7" ```
func (*EnvironmentAutomationServiceService) Start ¶
func (r *EnvironmentAutomationServiceService) Start(ctx context.Context, body EnvironmentAutomationServiceStartParams, opts ...option.RequestOption) (res *EnvironmentAutomationServiceStartResponse, err error)
Starts an automation service. This call does not block until the service is started. This call will not error if the service is already running or has been started.
Use this method to:
- Start stopped services - Resume service operations - Trigger service initialization
### Examples
- Start service:
Starts a previously stopped service. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*EnvironmentAutomationServiceService) Stop ¶
func (r *EnvironmentAutomationServiceService) Stop(ctx context.Context, body EnvironmentAutomationServiceStopParams, opts ...option.RequestOption) (res *EnvironmentAutomationServiceStopResponse, err error)
Stops an automation service. This call does not block until the service is stopped. This call will not error if the service is already stopped or has been stopped.
Use this method to:
- Pause service operations - Gracefully stop services - Prepare for updates
### Examples
- Stop service:
Gracefully stops a running service. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*EnvironmentAutomationServiceService) Update ¶
func (r *EnvironmentAutomationServiceService) Update(ctx context.Context, body EnvironmentAutomationServiceUpdateParams, opts ...option.RequestOption) (res *EnvironmentAutomationServiceUpdateResponse, err error)
Updates an automation service configuration.
Use this method to:
- Modify service commands - Update triggers - Change runtime settings - Adjust dependencies
### Examples
- Update commands:
Changes service start and ready commands. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" spec: commands: start: "npm run start:dev" ready: "curl -s http://localhost:8080" ```
- Update triggers:
Modifies when the service starts. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" metadata: triggeredBy: trigger: - postDevcontainerStart: true - manual: true ```
type EnvironmentAutomationServiceStartParams ¶
type EnvironmentAutomationServiceStartParams struct {
ID param.Field[string] `json:"id" format:"uuid"`
}
func (EnvironmentAutomationServiceStartParams) MarshalJSON ¶
func (r EnvironmentAutomationServiceStartParams) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationServiceStartResponse ¶
type EnvironmentAutomationServiceStartResponse = interface{}
type EnvironmentAutomationServiceStopParams ¶
type EnvironmentAutomationServiceStopParams struct {
ID param.Field[string] `json:"id" format:"uuid"`
}
func (EnvironmentAutomationServiceStopParams) MarshalJSON ¶
func (r EnvironmentAutomationServiceStopParams) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationServiceStopResponse ¶
type EnvironmentAutomationServiceStopResponse = interface{}
type EnvironmentAutomationServiceUpdateParams ¶
type EnvironmentAutomationServiceUpdateParams struct { ID param.Field[string] `json:"id" format:"uuid"` Metadata param.Field[EnvironmentAutomationServiceUpdateParamsMetadata] `json:"metadata"` // Changing the spec of a service is a complex operation. The spec of a service can // only be updated if the service is in a stopped state. If the service is running, // it must be stopped first. Spec param.Field[EnvironmentAutomationServiceUpdateParamsSpec] `json:"spec"` // Service status updates are only expected from the executing environment. As a // client of this API you are not expected to provide this field. Updating this // field requires the `environmentservice:update_status` permission. Status param.Field[EnvironmentAutomationServiceUpdateParamsStatus] `json:"status"` }
func (EnvironmentAutomationServiceUpdateParams) MarshalJSON ¶
func (r EnvironmentAutomationServiceUpdateParams) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationServiceUpdateParamsMetadata ¶
type EnvironmentAutomationServiceUpdateParamsMetadata struct { Description param.Field[string] `json:"description"` Name param.Field[string] `json:"name"` TriggeredBy param.Field[EnvironmentAutomationServiceUpdateParamsMetadataTriggeredBy] `json:"triggeredBy"` }
func (EnvironmentAutomationServiceUpdateParamsMetadata) MarshalJSON ¶
func (r EnvironmentAutomationServiceUpdateParamsMetadata) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationServiceUpdateParamsMetadataTriggeredBy ¶
type EnvironmentAutomationServiceUpdateParamsMetadataTriggeredBy struct {
Trigger param.Field[[]shared.AutomationTriggerParam] `json:"trigger"`
}
func (EnvironmentAutomationServiceUpdateParamsMetadataTriggeredBy) MarshalJSON ¶
func (r EnvironmentAutomationServiceUpdateParamsMetadataTriggeredBy) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationServiceUpdateParamsSpec ¶
type EnvironmentAutomationServiceUpdateParamsSpec struct { Commands param.Field[EnvironmentAutomationServiceUpdateParamsSpecCommands] `json:"commands"` RunsOn param.Field[shared.RunsOnParam] `json:"runsOn"` }
Changing the spec of a service is a complex operation. The spec of a service can only be updated if the service is in a stopped state. If the service is running, it must be stopped first.
func (EnvironmentAutomationServiceUpdateParamsSpec) MarshalJSON ¶
func (r EnvironmentAutomationServiceUpdateParamsSpec) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationServiceUpdateParamsSpecCommands ¶
type EnvironmentAutomationServiceUpdateParamsSpecCommands struct { Ready param.Field[string] `json:"ready"` Start param.Field[string] `json:"start"` Stop param.Field[string] `json:"stop"` }
func (EnvironmentAutomationServiceUpdateParamsSpecCommands) MarshalJSON ¶
func (r EnvironmentAutomationServiceUpdateParamsSpecCommands) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationServiceUpdateParamsStatus ¶
type EnvironmentAutomationServiceUpdateParamsStatus struct { FailureMessage param.Field[string] `json:"failureMessage"` LogURL param.Field[string] `json:"logUrl"` Phase param.Field[ServicePhase] `json:"phase"` Session param.Field[string] `json:"session"` }
Service status updates are only expected from the executing environment. As a client of this API you are not expected to provide this field. Updating this field requires the `environmentservice:update_status` permission.
func (EnvironmentAutomationServiceUpdateParamsStatus) MarshalJSON ¶
func (r EnvironmentAutomationServiceUpdateParamsStatus) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationServiceUpdateResponse ¶
type EnvironmentAutomationServiceUpdateResponse = interface{}
type EnvironmentAutomationTaskDeleteParams ¶
type EnvironmentAutomationTaskDeleteParams struct {
ID param.Field[string] `json:"id" format:"uuid"`
}
func (EnvironmentAutomationTaskDeleteParams) MarshalJSON ¶
func (r EnvironmentAutomationTaskDeleteParams) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationTaskDeleteResponse ¶
type EnvironmentAutomationTaskDeleteResponse = interface{}
type EnvironmentAutomationTaskExecutionGetParams ¶
type EnvironmentAutomationTaskExecutionGetParams struct {
ID param.Field[string] `json:"id" format:"uuid"`
}
func (EnvironmentAutomationTaskExecutionGetParams) MarshalJSON ¶
func (r EnvironmentAutomationTaskExecutionGetParams) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationTaskExecutionGetResponse ¶
type EnvironmentAutomationTaskExecutionGetResponse struct { TaskExecution shared.TaskExecution `json:"taskExecution,required"` JSON environmentAutomationTaskExecutionGetResponseJSON `json:"-"` }
func (*EnvironmentAutomationTaskExecutionGetResponse) UnmarshalJSON ¶
func (r *EnvironmentAutomationTaskExecutionGetResponse) UnmarshalJSON(data []byte) (err error)
type EnvironmentAutomationTaskExecutionListParams ¶
type EnvironmentAutomationTaskExecutionListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` // filter contains the filter options for listing task runs Filter param.Field[EnvironmentAutomationTaskExecutionListParamsFilter] `json:"filter"` // pagination contains the pagination options for listing task runs Pagination param.Field[EnvironmentAutomationTaskExecutionListParamsPagination] `json:"pagination"` }
func (EnvironmentAutomationTaskExecutionListParams) MarshalJSON ¶
func (r EnvironmentAutomationTaskExecutionListParams) MarshalJSON() (data []byte, err error)
func (EnvironmentAutomationTaskExecutionListParams) URLQuery ¶
func (r EnvironmentAutomationTaskExecutionListParams) URLQuery() (v url.Values)
URLQuery serializes EnvironmentAutomationTaskExecutionListParams's query parameters as `url.Values`.
type EnvironmentAutomationTaskExecutionListParamsFilter ¶
type EnvironmentAutomationTaskExecutionListParamsFilter struct { // environment_ids filters the response to only task runs of these environments EnvironmentIDs param.Field[[]string] `json:"environmentIds" format:"uuid"` // phases filters the response to only task runs in these phases Phases param.Field[[]shared.TaskExecutionPhase] `json:"phases"` // task_ids filters the response to only task runs of these tasks TaskIDs param.Field[[]string] `json:"taskIds" format:"uuid"` // task_references filters the response to only task runs with this reference TaskReferences param.Field[[]string] `json:"taskReferences"` }
filter contains the filter options for listing task runs
func (EnvironmentAutomationTaskExecutionListParamsFilter) MarshalJSON ¶
func (r EnvironmentAutomationTaskExecutionListParamsFilter) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationTaskExecutionListParamsPagination ¶
type EnvironmentAutomationTaskExecutionListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing task runs
func (EnvironmentAutomationTaskExecutionListParamsPagination) MarshalJSON ¶
func (r EnvironmentAutomationTaskExecutionListParamsPagination) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationTaskExecutionService ¶
type EnvironmentAutomationTaskExecutionService struct {
Options []option.RequestOption
}
EnvironmentAutomationTaskExecutionService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvironmentAutomationTaskExecutionService method instead.
func NewEnvironmentAutomationTaskExecutionService ¶
func NewEnvironmentAutomationTaskExecutionService(opts ...option.RequestOption) (r *EnvironmentAutomationTaskExecutionService)
NewEnvironmentAutomationTaskExecutionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EnvironmentAutomationTaskExecutionService) Get ¶
func (r *EnvironmentAutomationTaskExecutionService) Get(ctx context.Context, body EnvironmentAutomationTaskExecutionGetParams, opts ...option.RequestOption) (res *EnvironmentAutomationTaskExecutionGetResponse, err error)
Gets details about a specific task execution.
Use this method to:
- Monitor execution progress - View execution logs - Check execution status - Debug failed executions
### Examples
- Get execution details:
Retrieves information about a specific task execution. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*EnvironmentAutomationTaskExecutionService) List ¶
func (r *EnvironmentAutomationTaskExecutionService) List(ctx context.Context, params EnvironmentAutomationTaskExecutionListParams, opts ...option.RequestOption) (res *pagination.TaskExecutionsPage[shared.TaskExecution], err error)
Lists executions of automation tasks.
Use this method to:
- View task execution history - Monitor running tasks - Track task completion status
### Examples
- List all executions:
Shows execution history for all tasks. ```yaml filter: environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"] pagination: pageSize: 20 ```
- Filter by phase:
Lists executions in specific phases. ```yaml filter: phases: ["TASK_EXECUTION_PHASE_RUNNING", "TASK_EXECUTION_PHASE_FAILED"] pagination: pageSize: 20 ```
func (*EnvironmentAutomationTaskExecutionService) ListAutoPaging ¶
func (r *EnvironmentAutomationTaskExecutionService) ListAutoPaging(ctx context.Context, params EnvironmentAutomationTaskExecutionListParams, opts ...option.RequestOption) *pagination.TaskExecutionsPageAutoPager[shared.TaskExecution]
Lists executions of automation tasks.
Use this method to:
- View task execution history - Monitor running tasks - Track task completion status
### Examples
- List all executions:
Shows execution history for all tasks. ```yaml filter: environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"] pagination: pageSize: 20 ```
- Filter by phase:
Lists executions in specific phases. ```yaml filter: phases: ["TASK_EXECUTION_PHASE_RUNNING", "TASK_EXECUTION_PHASE_FAILED"] pagination: pageSize: 20 ```
func (*EnvironmentAutomationTaskExecutionService) Stop ¶
func (r *EnvironmentAutomationTaskExecutionService) Stop(ctx context.Context, body EnvironmentAutomationTaskExecutionStopParams, opts ...option.RequestOption) (res *EnvironmentAutomationTaskExecutionStopResponse, err error)
Stops a running task execution.
Use this method to:
- Cancel long-running tasks - Stop failed executions - Interrupt task processing
### Examples
- Stop execution:
Stops a running task execution. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
type EnvironmentAutomationTaskExecutionStopParams ¶
type EnvironmentAutomationTaskExecutionStopParams struct {
ID param.Field[string] `json:"id" format:"uuid"`
}
func (EnvironmentAutomationTaskExecutionStopParams) MarshalJSON ¶
func (r EnvironmentAutomationTaskExecutionStopParams) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationTaskExecutionStopResponse ¶
type EnvironmentAutomationTaskExecutionStopResponse = interface{}
type EnvironmentAutomationTaskGetParams ¶
func (EnvironmentAutomationTaskGetParams) MarshalJSON ¶
func (r EnvironmentAutomationTaskGetParams) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationTaskGetResponse ¶
type EnvironmentAutomationTaskGetResponse struct { Task shared.Task `json:"task,required"` JSON environmentAutomationTaskGetResponseJSON `json:"-"` }
func (*EnvironmentAutomationTaskGetResponse) UnmarshalJSON ¶
func (r *EnvironmentAutomationTaskGetResponse) UnmarshalJSON(data []byte) (err error)
type EnvironmentAutomationTaskListParams ¶
type EnvironmentAutomationTaskListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` // filter contains the filter options for listing tasks Filter param.Field[EnvironmentAutomationTaskListParamsFilter] `json:"filter"` // pagination contains the pagination options for listing tasks Pagination param.Field[EnvironmentAutomationTaskListParamsPagination] `json:"pagination"` }
func (EnvironmentAutomationTaskListParams) MarshalJSON ¶
func (r EnvironmentAutomationTaskListParams) MarshalJSON() (data []byte, err error)
func (EnvironmentAutomationTaskListParams) URLQuery ¶
func (r EnvironmentAutomationTaskListParams) URLQuery() (v url.Values)
URLQuery serializes EnvironmentAutomationTaskListParams's query parameters as `url.Values`.
type EnvironmentAutomationTaskListParamsFilter ¶
type EnvironmentAutomationTaskListParamsFilter struct { // environment_ids filters the response to only tasks of these environments EnvironmentIDs param.Field[[]string] `json:"environmentIds" format:"uuid"` // references filters the response to only services with these references References param.Field[[]string] `json:"references"` // task_ids filters the response to only tasks with these IDs TaskIDs param.Field[[]string] `json:"taskIds" format:"uuid"` }
filter contains the filter options for listing tasks
func (EnvironmentAutomationTaskListParamsFilter) MarshalJSON ¶
func (r EnvironmentAutomationTaskListParamsFilter) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationTaskListParamsPagination ¶
type EnvironmentAutomationTaskListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing tasks
func (EnvironmentAutomationTaskListParamsPagination) MarshalJSON ¶
func (r EnvironmentAutomationTaskListParamsPagination) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationTaskNewParams ¶
type EnvironmentAutomationTaskNewParams struct { DependsOn param.Field[[]string] `json:"dependsOn" format:"uuid"` EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"` Metadata param.Field[shared.TaskMetadataParam] `json:"metadata"` Spec param.Field[shared.TaskSpecParam] `json:"spec"` }
func (EnvironmentAutomationTaskNewParams) MarshalJSON ¶
func (r EnvironmentAutomationTaskNewParams) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationTaskNewResponse ¶
type EnvironmentAutomationTaskNewResponse struct { Task shared.Task `json:"task,required"` JSON environmentAutomationTaskNewResponseJSON `json:"-"` }
func (*EnvironmentAutomationTaskNewResponse) UnmarshalJSON ¶
func (r *EnvironmentAutomationTaskNewResponse) UnmarshalJSON(data []byte) (err error)
type EnvironmentAutomationTaskService ¶
type EnvironmentAutomationTaskService struct { Options []option.RequestOption Executions *EnvironmentAutomationTaskExecutionService }
EnvironmentAutomationTaskService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvironmentAutomationTaskService method instead.
func NewEnvironmentAutomationTaskService ¶
func NewEnvironmentAutomationTaskService(opts ...option.RequestOption) (r *EnvironmentAutomationTaskService)
NewEnvironmentAutomationTaskService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EnvironmentAutomationTaskService) Delete ¶
func (r *EnvironmentAutomationTaskService) Delete(ctx context.Context, body EnvironmentAutomationTaskDeleteParams, opts ...option.RequestOption) (res *EnvironmentAutomationTaskDeleteResponse, err error)
Deletes an automation task.
Use this method to:
- Remove unused tasks - Clean up task configurations - Delete obsolete automations
### Examples
- Delete task:
Removes a task and its configuration. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*EnvironmentAutomationTaskService) Get ¶
func (r *EnvironmentAutomationTaskService) Get(ctx context.Context, body EnvironmentAutomationTaskGetParams, opts ...option.RequestOption) (res *EnvironmentAutomationTaskGetResponse, err error)
Gets details about a specific automation task.
Use this method to:
- Check task configuration - View task dependencies - Monitor task status
### Examples
- Get task details:
Retrieves information about a specific task. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*EnvironmentAutomationTaskService) List ¶
func (r *EnvironmentAutomationTaskService) List(ctx context.Context, params EnvironmentAutomationTaskListParams, opts ...option.RequestOption) (res *pagination.TasksPage[shared.Task], err error)
Lists automation tasks with optional filtering.
Use this method to:
- View all tasks in an environment - Filter tasks by reference - Monitor task status
### Examples
- List environment tasks:
Shows all tasks for an environment. ```yaml filter: environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"] pagination: pageSize: 20 ```
- Filter by reference:
Lists tasks matching specific references. ```yaml filter: references: ["build", "test"] pagination: pageSize: 20 ```
func (*EnvironmentAutomationTaskService) ListAutoPaging ¶
func (r *EnvironmentAutomationTaskService) ListAutoPaging(ctx context.Context, params EnvironmentAutomationTaskListParams, opts ...option.RequestOption) *pagination.TasksPageAutoPager[shared.Task]
Lists automation tasks with optional filtering.
Use this method to:
- View all tasks in an environment - Filter tasks by reference - Monitor task status
### Examples
- List environment tasks:
Shows all tasks for an environment. ```yaml filter: environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"] pagination: pageSize: 20 ```
- Filter by reference:
Lists tasks matching specific references. ```yaml filter: references: ["build", "test"] pagination: pageSize: 20 ```
func (*EnvironmentAutomationTaskService) New ¶
func (r *EnvironmentAutomationTaskService) New(ctx context.Context, body EnvironmentAutomationTaskNewParams, opts ...option.RequestOption) (res *EnvironmentAutomationTaskNewResponse, err error)
Creates a new automation task.
Use this method to:
- Define one-off or scheduled tasks - Set up build or test automation - Configure task dependencies - Specify execution environments
### Examples
- Create basic task:
Creates a simple build task. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" metadata: reference: "build" name: "Build Project" description: "Builds the project artifacts" triggeredBy: - postEnvironmentStart: true spec: command: "npm run build" ```
- Create task with dependencies:
Creates a task that depends on other services. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" metadata: reference: "test" name: "Run Tests" description: "Runs the test suite" spec: command: "npm test" dependsOn: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"] ```
func (*EnvironmentAutomationTaskService) Start ¶
func (r *EnvironmentAutomationTaskService) Start(ctx context.Context, body EnvironmentAutomationTaskStartParams, opts ...option.RequestOption) (res *EnvironmentAutomationTaskStartResponse, err error)
Starts a task by creating a new task execution. This call does not block until the task is started; the task will be started asynchronously.
Use this method to:
- Trigger task execution - Run one-off tasks - Start scheduled tasks immediately
### Examples
- Start task:
Creates a new execution of a task. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*EnvironmentAutomationTaskService) Update ¶
func (r *EnvironmentAutomationTaskService) Update(ctx context.Context, body EnvironmentAutomationTaskUpdateParams, opts ...option.RequestOption) (res *EnvironmentAutomationTaskUpdateResponse, err error)
Updates an automation task configuration.
Use this method to:
- Modify task commands - Update task triggers - Change dependencies - Adjust execution settings
### Examples
- Update command:
Changes the task's command. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" spec: command: "npm run test:coverage" ```
- Update triggers:
Modifies when the task runs. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" metadata: triggeredBy: trigger: - postEnvironmentStart: true ```
type EnvironmentAutomationTaskStartParams ¶
type EnvironmentAutomationTaskStartParams struct {
ID param.Field[string] `json:"id" format:"uuid"`
}
func (EnvironmentAutomationTaskStartParams) MarshalJSON ¶
func (r EnvironmentAutomationTaskStartParams) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationTaskStartResponse ¶
type EnvironmentAutomationTaskStartResponse struct { TaskExecution shared.TaskExecution `json:"taskExecution,required"` JSON environmentAutomationTaskStartResponseJSON `json:"-"` }
func (*EnvironmentAutomationTaskStartResponse) UnmarshalJSON ¶
func (r *EnvironmentAutomationTaskStartResponse) UnmarshalJSON(data []byte) (err error)
type EnvironmentAutomationTaskUpdateParams ¶
type EnvironmentAutomationTaskUpdateParams struct { ID param.Field[string] `json:"id" format:"uuid"` // dependencies specifies the IDs of the automations this task depends on. DependsOn param.Field[[]string] `json:"dependsOn" format:"uuid"` Metadata param.Field[EnvironmentAutomationTaskUpdateParamsMetadata] `json:"metadata"` Spec param.Field[EnvironmentAutomationTaskUpdateParamsSpec] `json:"spec"` }
func (EnvironmentAutomationTaskUpdateParams) MarshalJSON ¶
func (r EnvironmentAutomationTaskUpdateParams) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationTaskUpdateParamsMetadata ¶
type EnvironmentAutomationTaskUpdateParamsMetadata struct { Description param.Field[string] `json:"description"` Name param.Field[string] `json:"name"` TriggeredBy param.Field[EnvironmentAutomationTaskUpdateParamsMetadataTriggeredBy] `json:"triggeredBy"` }
func (EnvironmentAutomationTaskUpdateParamsMetadata) MarshalJSON ¶
func (r EnvironmentAutomationTaskUpdateParamsMetadata) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationTaskUpdateParamsMetadataTriggeredBy ¶
type EnvironmentAutomationTaskUpdateParamsMetadataTriggeredBy struct {
Trigger param.Field[[]shared.AutomationTriggerParam] `json:"trigger"`
}
func (EnvironmentAutomationTaskUpdateParamsMetadataTriggeredBy) MarshalJSON ¶
func (r EnvironmentAutomationTaskUpdateParamsMetadataTriggeredBy) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationTaskUpdateParamsSpec ¶
type EnvironmentAutomationTaskUpdateParamsSpec struct { Command param.Field[string] `json:"command"` RunsOn param.Field[shared.RunsOnParam] `json:"runsOn"` }
func (EnvironmentAutomationTaskUpdateParamsSpec) MarshalJSON ¶
func (r EnvironmentAutomationTaskUpdateParamsSpec) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationTaskUpdateResponse ¶
type EnvironmentAutomationTaskUpdateResponse = interface{}
type EnvironmentAutomationUpsertParams ¶
type EnvironmentAutomationUpsertParams struct { // WARN: Do not remove any field here, as it will break reading automation yaml // files. We error if there are any unknown fields in the yaml (to ensure the yaml // is correct), but would break if we removed any fields. This includes marking a // field as "reserved" in the proto file, this will also break reading the yaml. AutomationsFile param.Field[AutomationsFileParam] `json:"automationsFile"` EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"` }
func (EnvironmentAutomationUpsertParams) MarshalJSON ¶
func (r EnvironmentAutomationUpsertParams) MarshalJSON() (data []byte, err error)
type EnvironmentAutomationUpsertResponse ¶
type EnvironmentAutomationUpsertResponse struct { UpdatedServiceIDs []string `json:"updatedServiceIds"` UpdatedTaskIDs []string `json:"updatedTaskIds"` JSON environmentAutomationUpsertResponseJSON `json:"-"` }
func (*EnvironmentAutomationUpsertResponse) UnmarshalJSON ¶
func (r *EnvironmentAutomationUpsertResponse) UnmarshalJSON(data []byte) (err error)
type EnvironmentClass ¶
type EnvironmentClass = shared.EnvironmentClass
This is an alias to an internal type.
type EnvironmentClassListParams ¶
type EnvironmentClassListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` Filter param.Field[EnvironmentClassListParamsFilter] `json:"filter"` // pagination contains the pagination options for listing environment classes Pagination param.Field[EnvironmentClassListParamsPagination] `json:"pagination"` }
func (EnvironmentClassListParams) MarshalJSON ¶
func (r EnvironmentClassListParams) MarshalJSON() (data []byte, err error)
func (EnvironmentClassListParams) URLQuery ¶
func (r EnvironmentClassListParams) URLQuery() (v url.Values)
URLQuery serializes EnvironmentClassListParams's query parameters as `url.Values`.
type EnvironmentClassListParamsFilter ¶
type EnvironmentClassListParamsFilter struct { // can_create_environments filters the response to only environment classes that // can be used to create new environments by the caller. Unlike enabled, which // indicates general availability, this ensures the caller only sees environment // classes they are allowed to use. CanCreateEnvironments param.Field[bool] `json:"canCreateEnvironments"` // enabled filters the response to only enabled or disabled environment classes. If // not set, all environment classes are returned. Enabled param.Field[bool] `json:"enabled"` // runner_ids filters the response to only EnvironmentClasses of these Runner IDs RunnerIDs param.Field[[]string] `json:"runnerIds" format:"uuid"` // runner_kind filters the response to only environment classes from runners of // these kinds. RunnerKinds param.Field[[]RunnerKind] `json:"runnerKinds"` // runner_providers filters the response to only environment classes from runners // of these providers. RunnerProviders param.Field[[]RunnerProvider] `json:"runnerProviders"` }
func (EnvironmentClassListParamsFilter) MarshalJSON ¶
func (r EnvironmentClassListParamsFilter) MarshalJSON() (data []byte, err error)
type EnvironmentClassListParamsPagination ¶
type EnvironmentClassListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing environment classes
func (EnvironmentClassListParamsPagination) MarshalJSON ¶
func (r EnvironmentClassListParamsPagination) MarshalJSON() (data []byte, err error)
type EnvironmentClassParam ¶
type EnvironmentClassParam = shared.EnvironmentClassParam
This is an alias to an internal type.
type EnvironmentClassService ¶
type EnvironmentClassService struct {
Options []option.RequestOption
}
EnvironmentClassService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvironmentClassService method instead.
func NewEnvironmentClassService ¶
func NewEnvironmentClassService(opts ...option.RequestOption) (r *EnvironmentClassService)
NewEnvironmentClassService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EnvironmentClassService) List ¶
func (r *EnvironmentClassService) List(ctx context.Context, params EnvironmentClassListParams, opts ...option.RequestOption) (res *pagination.EnvironmentClassesPage[shared.EnvironmentClass], err error)
Lists available environment classes with their specifications and resource limits.
Use this method to understand what types of environments you can create and their capabilities. Environment classes define the compute resources and features available to your environments.
### Examples
- List all available classes:
Retrieves a list of all environment classes with their specifications. ```yaml {} ``` buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
func (*EnvironmentClassService) ListAutoPaging ¶
func (r *EnvironmentClassService) ListAutoPaging(ctx context.Context, params EnvironmentClassListParams, opts ...option.RequestOption) *pagination.EnvironmentClassesPageAutoPager[shared.EnvironmentClass]
Lists available environment classes with their specifications and resource limits.
Use this method to understand what types of environments you can create and their capabilities. Environment classes define the compute resources and features available to your environments.
### Examples
- List all available classes:
Retrieves a list of all environment classes with their specifications. ```yaml {} ``` buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
type EnvironmentClassValidationResult ¶
type EnvironmentClassValidationResult struct { ConfigurationErrors []FieldValidationError `json:"configurationErrors"` DescriptionError string `json:"descriptionError,nullable"` DisplayNameError string `json:"displayNameError,nullable"` Valid bool `json:"valid"` JSON environmentClassValidationResultJSON `json:"-"` }
func (*EnvironmentClassValidationResult) UnmarshalJSON ¶
func (r *EnvironmentClassValidationResult) UnmarshalJSON(data []byte) (err error)
type EnvironmentDeleteParams ¶
type EnvironmentDeleteParams struct { // environment_id specifies the environment that is going to delete. // // +required EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"` // force indicates whether the environment should be deleted forcefully When force // deleting an Environment, the Environment is removed immediately and environment // lifecycle is not respected. Force deleting can result in data loss on the // environment. Force param.Field[bool] `json:"force"` }
func (EnvironmentDeleteParams) MarshalJSON ¶
func (r EnvironmentDeleteParams) MarshalJSON() (data []byte, err error)
type EnvironmentDeleteResponse ¶
type EnvironmentDeleteResponse = interface{}
type EnvironmentGetParams ¶
type EnvironmentGetParams struct { // environment_id specifies the environment to get EnvironmentID param.Field[string] `json:"environmentId,required" format:"uuid"` }
func (EnvironmentGetParams) MarshalJSON ¶
func (r EnvironmentGetParams) MarshalJSON() (data []byte, err error)
type EnvironmentGetResponse ¶
type EnvironmentGetResponse struct { // +resource get environment Environment Environment `json:"environment,required"` JSON environmentGetResponseJSON `json:"-"` }
func (*EnvironmentGetResponse) UnmarshalJSON ¶
func (r *EnvironmentGetResponse) UnmarshalJSON(data []byte) (err error)
type EnvironmentInitializer ¶
type EnvironmentInitializer struct { Specs []EnvironmentInitializerSpec `json:"specs"` JSON environmentInitializerJSON `json:"-"` }
EnvironmentInitializer specifies how an environment is to be initialized
func (*EnvironmentInitializer) UnmarshalJSON ¶
func (r *EnvironmentInitializer) UnmarshalJSON(data []byte) (err error)
type EnvironmentInitializerParam ¶
type EnvironmentInitializerParam struct {
Specs param.Field[[]EnvironmentInitializerSpecParam] `json:"specs"`
}
EnvironmentInitializer specifies how an environment is to be initialized
func (EnvironmentInitializerParam) MarshalJSON ¶
func (r EnvironmentInitializerParam) MarshalJSON() (data []byte, err error)
type EnvironmentInitializerSpec ¶
type EnvironmentInitializerSpec struct { ContextURL EnvironmentInitializerSpecsContextURL `json:"contextUrl"` Git EnvironmentInitializerSpecsGit `json:"git"` JSON environmentInitializerSpecJSON `json:"-"` }
func (*EnvironmentInitializerSpec) UnmarshalJSON ¶
func (r *EnvironmentInitializerSpec) UnmarshalJSON(data []byte) (err error)
type EnvironmentInitializerSpecParam ¶
type EnvironmentInitializerSpecParam struct { ContextURL param.Field[EnvironmentInitializerSpecsContextURLParam] `json:"contextUrl"` Git param.Field[EnvironmentInitializerSpecsGitParam] `json:"git"` }
func (EnvironmentInitializerSpecParam) MarshalJSON ¶
func (r EnvironmentInitializerSpecParam) MarshalJSON() (data []byte, err error)
type EnvironmentInitializerSpecsContextURL ¶
type EnvironmentInitializerSpecsContextURL struct { // url is the URL from which the environment is created URL string `json:"url" format:"uri"` JSON environmentInitializerSpecsContextURLJSON `json:"-"` }
func (*EnvironmentInitializerSpecsContextURL) UnmarshalJSON ¶
func (r *EnvironmentInitializerSpecsContextURL) UnmarshalJSON(data []byte) (err error)
type EnvironmentInitializerSpecsContextURLParam ¶
type EnvironmentInitializerSpecsContextURLParam struct { // url is the URL from which the environment is created URL param.Field[string] `json:"url" format:"uri"` }
func (EnvironmentInitializerSpecsContextURLParam) MarshalJSON ¶
func (r EnvironmentInitializerSpecsContextURLParam) MarshalJSON() (data []byte, err error)
type EnvironmentInitializerSpecsGit ¶
type EnvironmentInitializerSpecsGit struct { // a path relative to the environment root in which the code will be checked out to CheckoutLocation string `json:"checkoutLocation"` // the value for the clone target mode - use depends on the target mode CloneTarget string `json:"cloneTarget"` // remote_uri is the Git remote origin RemoteUri string `json:"remoteUri"` // the target mode determines what gets checked out TargetMode EnvironmentInitializerSpecsGitTargetMode `json:"targetMode"` // upstream_Remote_uri is the fork upstream of a repository UpstreamRemoteUri string `json:"upstreamRemoteUri"` JSON environmentInitializerSpecsGitJSON `json:"-"` }
func (*EnvironmentInitializerSpecsGit) UnmarshalJSON ¶
func (r *EnvironmentInitializerSpecsGit) UnmarshalJSON(data []byte) (err error)
type EnvironmentInitializerSpecsGitParam ¶
type EnvironmentInitializerSpecsGitParam struct { // a path relative to the environment root in which the code will be checked out to CheckoutLocation param.Field[string] `json:"checkoutLocation"` // the value for the clone target mode - use depends on the target mode CloneTarget param.Field[string] `json:"cloneTarget"` // remote_uri is the Git remote origin RemoteUri param.Field[string] `json:"remoteUri"` // the target mode determines what gets checked out TargetMode param.Field[EnvironmentInitializerSpecsGitTargetMode] `json:"targetMode"` // upstream_Remote_uri is the fork upstream of a repository UpstreamRemoteUri param.Field[string] `json:"upstreamRemoteUri"` }
func (EnvironmentInitializerSpecsGitParam) MarshalJSON ¶
func (r EnvironmentInitializerSpecsGitParam) MarshalJSON() (data []byte, err error)
type EnvironmentInitializerSpecsGitTargetMode ¶
type EnvironmentInitializerSpecsGitTargetMode string
the target mode determines what gets checked out
const ( EnvironmentInitializerSpecsGitTargetModeCloneTargetModeUnspecified EnvironmentInitializerSpecsGitTargetMode = "CLONE_TARGET_MODE_UNSPECIFIED" EnvironmentInitializerSpecsGitTargetModeCloneTargetModeRemoteHead EnvironmentInitializerSpecsGitTargetMode = "CLONE_TARGET_MODE_REMOTE_HEAD" EnvironmentInitializerSpecsGitTargetModeCloneTargetModeRemoteCommit EnvironmentInitializerSpecsGitTargetMode = "CLONE_TARGET_MODE_REMOTE_COMMIT" EnvironmentInitializerSpecsGitTargetModeCloneTargetModeRemoteBranch EnvironmentInitializerSpecsGitTargetMode = "CLONE_TARGET_MODE_REMOTE_BRANCH" EnvironmentInitializerSpecsGitTargetModeCloneTargetModeLocalBranch EnvironmentInitializerSpecsGitTargetMode = "CLONE_TARGET_MODE_LOCAL_BRANCH" )
func (EnvironmentInitializerSpecsGitTargetMode) IsKnown ¶
func (r EnvironmentInitializerSpecsGitTargetMode) IsKnown() bool
type EnvironmentListParams ¶
type EnvironmentListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` Filter param.Field[EnvironmentListParamsFilter] `json:"filter"` // pagination contains the pagination options for listing environments Pagination param.Field[EnvironmentListParamsPagination] `json:"pagination"` }
func (EnvironmentListParams) MarshalJSON ¶
func (r EnvironmentListParams) MarshalJSON() (data []byte, err error)
func (EnvironmentListParams) URLQuery ¶
func (r EnvironmentListParams) URLQuery() (v url.Values)
URLQuery serializes EnvironmentListParams's query parameters as `url.Values`.
type EnvironmentListParamsFilter ¶
type EnvironmentListParamsFilter struct { // creator_ids filters the response to only Environments created by specified // members CreatorIDs param.Field[[]string] `json:"creatorIds" format:"uuid"` // project_ids filters the response to only Environments associated with the // specified projects ProjectIDs param.Field[[]string] `json:"projectIds" format:"uuid"` // runner_ids filters the response to only Environments running on these Runner IDs RunnerIDs param.Field[[]string] `json:"runnerIds" format:"uuid"` // runner_kinds filters the response to only Environments running on these Runner // Kinds RunnerKinds param.Field[[]RunnerKind] `json:"runnerKinds"` // actual_phases is a list of phases the environment must be in for it to be // returned in the API call StatusPhases param.Field[[]EnvironmentPhase] `json:"statusPhases"` }
func (EnvironmentListParamsFilter) MarshalJSON ¶
func (r EnvironmentListParamsFilter) MarshalJSON() (data []byte, err error)
type EnvironmentListParamsPagination ¶
type EnvironmentListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing environments
func (EnvironmentListParamsPagination) MarshalJSON ¶
func (r EnvironmentListParamsPagination) MarshalJSON() (data []byte, err error)
type EnvironmentMarkActiveParams ¶
type EnvironmentMarkActiveParams struct { // activity_signal specifies the activity. ActivitySignal param.Field[EnvironmentActivitySignalParam] `json:"activitySignal"` // The ID of the environment to update activity for. EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"` }
func (EnvironmentMarkActiveParams) MarshalJSON ¶
func (r EnvironmentMarkActiveParams) MarshalJSON() (data []byte, err error)
type EnvironmentMarkActiveResponse ¶
type EnvironmentMarkActiveResponse = interface{}
type EnvironmentMetadata ¶
type EnvironmentMetadata struct { // annotations are key/value pairs that gets attached to the environment. // +internal - not yet implemented Annotations map[string]string `json:"annotations"` // Time when the Environment was created. CreatedAt time.Time `json:"createdAt" format:"date-time"` // creator is the identity of the creator of the environment Creator shared.Subject `json:"creator"` // Time when the Environment was last started (i.e. CreateEnvironment or // StartEnvironment were called). LastStartedAt time.Time `json:"lastStartedAt" format:"date-time"` // name is the name of the environment as specified by the user Name string `json:"name"` // organization_id is the ID of the organization that contains the environment OrganizationID string `json:"organizationId" format:"uuid"` // original_context_url is the normalized URL from which the environment was // created OriginalContextURL string `json:"originalContextUrl"` // If the Environment was started from a project, the project_id will reference the // project. ProjectID string `json:"projectId"` // Runner is the ID of the runner that runs this environment. RunnerID string `json:"runnerId"` JSON environmentMetadataJSON `json:"-"` }
EnvironmentMetadata is data associated with an environment that's required for other parts of the system to function
func (*EnvironmentMetadata) UnmarshalJSON ¶
func (r *EnvironmentMetadata) UnmarshalJSON(data []byte) (err error)
type EnvironmentNewFromProjectParams ¶
type EnvironmentNewFromProjectParams struct { ProjectID param.Field[string] `json:"projectId" format:"uuid"` // Spec is the configuration of the environment that's required for the runner to // start the environment Configuration already defined in the Project will override // parts of the spec, if set Spec param.Field[EnvironmentSpecParam] `json:"spec"` }
func (EnvironmentNewFromProjectParams) MarshalJSON ¶
func (r EnvironmentNewFromProjectParams) MarshalJSON() (data []byte, err error)
type EnvironmentNewFromProjectResponse ¶
type EnvironmentNewFromProjectResponse struct { // +resource get environment Environment Environment `json:"environment,required"` JSON environmentNewFromProjectResponseJSON `json:"-"` }
func (*EnvironmentNewFromProjectResponse) UnmarshalJSON ¶
func (r *EnvironmentNewFromProjectResponse) UnmarshalJSON(data []byte) (err error)
type EnvironmentNewLogsTokenParams ¶
type EnvironmentNewLogsTokenParams struct { // environment_id specifies the environment for which the logs token should be // created. // // +required EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"` }
func (EnvironmentNewLogsTokenParams) MarshalJSON ¶
func (r EnvironmentNewLogsTokenParams) MarshalJSON() (data []byte, err error)
type EnvironmentNewLogsTokenResponse ¶
type EnvironmentNewLogsTokenResponse struct { // access_token is the token that can be used to access the logs of the environment AccessToken string `json:"accessToken,required"` JSON environmentNewLogsTokenResponseJSON `json:"-"` }
func (*EnvironmentNewLogsTokenResponse) UnmarshalJSON ¶
func (r *EnvironmentNewLogsTokenResponse) UnmarshalJSON(data []byte) (err error)
type EnvironmentNewParams ¶
type EnvironmentNewParams struct { // spec is the configuration of the environment that's required for the to start // the environment Spec param.Field[EnvironmentSpecParam] `json:"spec"` }
func (EnvironmentNewParams) MarshalJSON ¶
func (r EnvironmentNewParams) MarshalJSON() (data []byte, err error)
type EnvironmentNewResponse ¶
type EnvironmentNewResponse struct { // +resource get environment Environment Environment `json:"environment,required"` JSON environmentNewResponseJSON `json:"-"` }
func (*EnvironmentNewResponse) UnmarshalJSON ¶
func (r *EnvironmentNewResponse) UnmarshalJSON(data []byte) (err error)
type EnvironmentPhase ¶
type EnvironmentPhase string
const ( EnvironmentPhaseUnspecified EnvironmentPhase = "ENVIRONMENT_PHASE_UNSPECIFIED" EnvironmentPhaseCreating EnvironmentPhase = "ENVIRONMENT_PHASE_CREATING" EnvironmentPhaseStarting EnvironmentPhase = "ENVIRONMENT_PHASE_STARTING" EnvironmentPhaseRunning EnvironmentPhase = "ENVIRONMENT_PHASE_RUNNING" EnvironmentPhaseUpdating EnvironmentPhase = "ENVIRONMENT_PHASE_UPDATING" EnvironmentPhaseStopping EnvironmentPhase = "ENVIRONMENT_PHASE_STOPPING" EnvironmentPhaseStopped EnvironmentPhase = "ENVIRONMENT_PHASE_STOPPED" EnvironmentPhaseDeleting EnvironmentPhase = "ENVIRONMENT_PHASE_DELETING" EnvironmentPhaseDeleted EnvironmentPhase = "ENVIRONMENT_PHASE_DELETED" )
func (EnvironmentPhase) IsKnown ¶
func (r EnvironmentPhase) IsKnown() bool
type EnvironmentService ¶
type EnvironmentService struct { Options []option.RequestOption Automations *EnvironmentAutomationService Classes *EnvironmentClassService }
EnvironmentService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvironmentService method instead.
func NewEnvironmentService ¶
func NewEnvironmentService(opts ...option.RequestOption) (r *EnvironmentService)
NewEnvironmentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EnvironmentService) Delete ¶
func (r *EnvironmentService) Delete(ctx context.Context, body EnvironmentDeleteParams, opts ...option.RequestOption) (res *EnvironmentDeleteResponse, err error)
Permanently deletes an environment.
Running environments are automatically stopped before deletion. If force is true, the environment is deleted immediately without graceful shutdown.
### Examples
- Delete with graceful shutdown:
Deletes an environment after gracefully stopping it. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" force: false ```
- Force delete:
Immediately deletes an environment without waiting for graceful shutdown. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" force: true ```
func (*EnvironmentService) Get ¶
func (r *EnvironmentService) Get(ctx context.Context, body EnvironmentGetParams, opts ...option.RequestOption) (res *EnvironmentGetResponse, err error)
Gets details about a specific environment including its status, configuration, and context URL.
Use this method to:
- Check if an environment is ready to use - Get connection details for IDE and exposed ports - Monitor environment health and resource usage - Debug environment setup issues
### Examples
- Get environment details:
Retrieves detailed information about a specific environment using its unique identifier. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" ```
func (*EnvironmentService) List ¶
func (r *EnvironmentService) List(ctx context.Context, params EnvironmentListParams, opts ...option.RequestOption) (res *pagination.EnvironmentsPage[Environment], err error)
Lists all environments matching the specified criteria.
Use this method to find and monitor environments across your organization. Results are ordered by creation time with newest environments first.
### Examples
- List running environments for a project:
Retrieves all running environments for a specific project with pagination. ```yaml filter: statusPhases: ["ENVIRONMENT_PHASE_RUNNING"] projectIds: ["b0e12f6c-4c67-429d-a4a6-d9838b5da047"] pagination: pageSize: 10 ```
- List all environments for a specific runner:
Filters environments by runner ID and creator ID. ```yaml filter: runnerIds: ["e6aa9c54-89d3-42c1-ac31-bd8d8f1concentrate"] creatorIds: ["f53d2330-3795-4c5d-a1f3-453121af9c60"] ```
- List stopped and deleted environments:
Retrieves all environments in stopped or deleted state. ```yaml filter: statusPhases: ["ENVIRONMENT_PHASE_STOPPED", "ENVIRONMENT_PHASE_DELETED"] ```
func (*EnvironmentService) ListAutoPaging ¶
func (r *EnvironmentService) ListAutoPaging(ctx context.Context, params EnvironmentListParams, opts ...option.RequestOption) *pagination.EnvironmentsPageAutoPager[Environment]
Lists all environments matching the specified criteria.
Use this method to find and monitor environments across your organization. Results are ordered by creation time with newest environments first.
### Examples
- List running environments for a project:
Retrieves all running environments for a specific project with pagination. ```yaml filter: statusPhases: ["ENVIRONMENT_PHASE_RUNNING"] projectIds: ["b0e12f6c-4c67-429d-a4a6-d9838b5da047"] pagination: pageSize: 10 ```
- List all environments for a specific runner:
Filters environments by runner ID and creator ID. ```yaml filter: runnerIds: ["e6aa9c54-89d3-42c1-ac31-bd8d8f1concentrate"] creatorIds: ["f53d2330-3795-4c5d-a1f3-453121af9c60"] ```
- List stopped and deleted environments:
Retrieves all environments in stopped or deleted state. ```yaml filter: statusPhases: ["ENVIRONMENT_PHASE_STOPPED", "ENVIRONMENT_PHASE_DELETED"] ```
func (*EnvironmentService) MarkActive ¶
func (r *EnvironmentService) MarkActive(ctx context.Context, body EnvironmentMarkActiveParams, opts ...option.RequestOption) (res *EnvironmentMarkActiveResponse, err error)
Records environment activity to prevent automatic shutdown.
Activity signals should be sent every 5 minutes while the environment is actively being used. The source must be between 3-80 characters.
### Examples
- Signal VS Code activity:
Records VS Code editor activity to prevent environment shutdown. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" activitySignal: source: "VS Code" timestamp: "2025-02-12T14:30:00Z" ```
func (*EnvironmentService) New ¶
func (r *EnvironmentService) New(ctx context.Context, body EnvironmentNewParams, opts ...option.RequestOption) (res *EnvironmentNewResponse, err error)
Creates a development environment from a context URL (e.g. Git repository) and starts it.
The `class` field must be a valid environment class ID. You can find a list of available environment classes with the `ListEnvironmentClasses` method.
### Examples
- Create from context URL:
Creates an environment from a Git repository URL with default settings. ```yaml spec: machine: class: "d2c94c27-3b76-4a42-b88c-95a85e392c68" content: initializer: specs: - contextUrl: url: "https://github.com/gitpod-io/gitpod" ```
- Create from Git repository:
Creates an environment from a Git repository with specific branch targeting. ```yaml spec: machine: class: "d2c94c27-3b76-4a42-b88c-95a85e392c68" content: initializer: specs: - git: remoteUri: "https://github.com/gitpod-io/gitpod" cloneTarget: "main" targetMode: "CLONE_TARGET_MODE_REMOTE_BRANCH" ```
- Create with custom timeout and ports:
Creates an environment with custom inactivity timeout and exposed port configuration. ```yaml spec: machine: class: "d2c94c27-3b76-4a42-b88c-95a85e392c68" content: initializer: specs: - contextUrl: url: "https://github.com/gitpod-io/gitpod" timeout: disconnected: "7200s" # 2 hours in seconds ports: - port: 3000 admission: "ADMISSION_LEVEL_EVERYONE" name: "Web App" ```
func (*EnvironmentService) NewFromProject ¶
func (r *EnvironmentService) NewFromProject(ctx context.Context, body EnvironmentNewFromProjectParams, opts ...option.RequestOption) (res *EnvironmentNewFromProjectResponse, err error)
Creates an environment from an existing project configuration and starts it.
This method uses project settings as defaults but allows overriding specific configurations. Project settings take precedence over default configurations, while custom specifications in the request override project settings.
### Examples
- Create with project defaults:
Creates an environment using all default settings from the project configuration. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ```
- Create with custom compute resources:
Creates an environment from project with custom machine class and timeout settings. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" spec: machine: class: "d2c94c27-3b76-4a42-b88c-95a85e392c68" timeout: disconnected: "14400s" # 4 hours in seconds ```
func (*EnvironmentService) NewLogsToken ¶
func (r *EnvironmentService) NewLogsToken(ctx context.Context, body EnvironmentNewLogsTokenParams, opts ...option.RequestOption) (res *EnvironmentNewLogsTokenResponse, err error)
Creates an access token for retrieving environment logs.
Generated tokens are valid for one hour and provide read-only access to the environment's logs.
### Examples
- Generate logs token:
Creates a temporary access token for retrieving environment logs. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" ```
func (*EnvironmentService) Start ¶
func (r *EnvironmentService) Start(ctx context.Context, body EnvironmentStartParams, opts ...option.RequestOption) (res *EnvironmentStartResponse, err error)
Starts a stopped environment.
Use this method to resume work on a previously stopped environment. The environment retains its configuration and workspace content from when it was stopped.
### Examples
- Start an environment:
Resumes a previously stopped environment with its existing configuration. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" ```
func (*EnvironmentService) Stop ¶
func (r *EnvironmentService) Stop(ctx context.Context, body EnvironmentStopParams, opts ...option.RequestOption) (res *EnvironmentStopResponse, err error)
Stops a running environment.
Use this method to pause work while preserving the environment's state. The environment can be resumed later using StartEnvironment.
### Examples
- Stop an environment:
Gracefully stops a running environment while preserving its state. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" ```
func (*EnvironmentService) Update ¶
func (r *EnvironmentService) Update(ctx context.Context, body EnvironmentUpdateParams, opts ...option.RequestOption) (res *EnvironmentUpdateResponse, err error)
Updates an environment's configuration while it is running.
Updates are limited to:
- Git credentials (username, email) - SSH public keys - Content initialization - Port configurations - Automation files - Environment timeouts
### Examples
- Update Git credentials:
Updates the Git configuration for the environment. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" spec: content: gitUsername: "example-user" gitEmail: "user@example.com" ```
- Add SSH public key:
Adds a new SSH public key for authentication. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" spec: sshPublicKeys: - id: "0194b7c1-c954-718d-91a4-9a742aa5fc11" value: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI..." ```
- Update content session:
Updates the content session identifier for the environment. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" spec: content: session: "0194b7c1-c954-718d-91a4-9a742aa5fc11" ```
Note: Machine class changes require stopping the environment and creating a new one.
type EnvironmentSpec ¶
type EnvironmentSpec struct { // admission controlls who can access the environment and its ports. Admission AdmissionLevel `json:"admission"` // automations_file is the automations file spec of the environment AutomationsFile EnvironmentSpecAutomationsFile `json:"automationsFile"` // content is the content spec of the environment Content EnvironmentSpecContent `json:"content"` // Phase is the desired phase of the environment DesiredPhase EnvironmentPhase `json:"desiredPhase"` // devcontainer is the devcontainer spec of the environment Devcontainer EnvironmentSpecDevcontainer `json:"devcontainer"` // machine is the machine spec of the environment Machine EnvironmentSpecMachine `json:"machine"` // ports is the set of ports which ought to be exposed to the internet Ports []EnvironmentSpecPort `json:"ports"` // secrets are confidential data that is mounted into the environment Secrets []EnvironmentSpecSecret `json:"secrets"` // version of the spec. The value of this field has no semantic meaning (e.g. don't // interpret it as as a timestamp), but it can be used to impose a partial order. // If a.spec_version < b.spec_version then a was the spec before b. SpecVersion string `json:"specVersion"` // ssh_public_keys are the public keys used to ssh into the environment SSHPublicKeys []EnvironmentSpecSSHPublicKey `json:"sshPublicKeys"` // Timeout configures the environment timeout Timeout EnvironmentSpecTimeout `json:"timeout"` JSON environmentSpecJSON `json:"-"` }
EnvironmentSpec specifies the configuration of an environment for an environment start
func (*EnvironmentSpec) UnmarshalJSON ¶
func (r *EnvironmentSpec) UnmarshalJSON(data []byte) (err error)
type EnvironmentSpecAutomationsFile ¶
type EnvironmentSpecAutomationsFile struct { // automations_file_path is the path to the automations file that is applied in the // environment, relative to the repo root. path must not be absolute (start with a // /): // // “` // this.matches('^$|^[^/].*') // “` AutomationsFilePath string `json:"automationsFilePath"` Session string `json:"session"` JSON environmentSpecAutomationsFileJSON `json:"-"` }
automations_file is the automations file spec of the environment
func (*EnvironmentSpecAutomationsFile) UnmarshalJSON ¶
func (r *EnvironmentSpecAutomationsFile) UnmarshalJSON(data []byte) (err error)
type EnvironmentSpecAutomationsFileParam ¶
type EnvironmentSpecAutomationsFileParam struct { // automations_file_path is the path to the automations file that is applied in the // environment, relative to the repo root. path must not be absolute (start with a // /): // // “` // this.matches('^$|^[^/].*') // “` AutomationsFilePath param.Field[string] `json:"automationsFilePath"` Session param.Field[string] `json:"session"` }
automations_file is the automations file spec of the environment
func (EnvironmentSpecAutomationsFileParam) MarshalJSON ¶
func (r EnvironmentSpecAutomationsFileParam) MarshalJSON() (data []byte, err error)
type EnvironmentSpecContent ¶
type EnvironmentSpecContent struct { // The Git email address GitEmail string `json:"gitEmail"` // The Git username GitUsername string `json:"gitUsername"` // initializer configures how the environment is to be initialized Initializer EnvironmentInitializer `json:"initializer"` Session string `json:"session"` JSON environmentSpecContentJSON `json:"-"` }
content is the content spec of the environment
func (*EnvironmentSpecContent) UnmarshalJSON ¶
func (r *EnvironmentSpecContent) UnmarshalJSON(data []byte) (err error)
type EnvironmentSpecContentParam ¶
type EnvironmentSpecContentParam struct { // The Git email address GitEmail param.Field[string] `json:"gitEmail"` // The Git username GitUsername param.Field[string] `json:"gitUsername"` // initializer configures how the environment is to be initialized Initializer param.Field[EnvironmentInitializerParam] `json:"initializer"` Session param.Field[string] `json:"session"` }
content is the content spec of the environment
func (EnvironmentSpecContentParam) MarshalJSON ¶
func (r EnvironmentSpecContentParam) MarshalJSON() (data []byte, err error)
type EnvironmentSpecDevcontainer ¶
type EnvironmentSpecDevcontainer struct { // devcontainer_file_path is the path to the devcontainer file relative to the repo // root path must not be absolute (start with a /): // // “` // this.matches('^$|^[^/].*') // “` DevcontainerFilePath string `json:"devcontainerFilePath"` // Experimental: dotfiles is the dotfiles configuration of the devcontainer Dotfiles EnvironmentSpecDevcontainerDotfiles `json:"dotfiles"` Session string `json:"session"` JSON environmentSpecDevcontainerJSON `json:"-"` }
devcontainer is the devcontainer spec of the environment
func (*EnvironmentSpecDevcontainer) UnmarshalJSON ¶
func (r *EnvironmentSpecDevcontainer) UnmarshalJSON(data []byte) (err error)
type EnvironmentSpecDevcontainerDotfiles ¶ added in v0.3.0
type EnvironmentSpecDevcontainerDotfiles struct { // URL of a dotfiles Git repository (e.g. https://github.com/owner/repository) Repository string `json:"repository,required" format:"uri"` JSON environmentSpecDevcontainerDotfilesJSON `json:"-"` }
Experimental: dotfiles is the dotfiles configuration of the devcontainer
func (*EnvironmentSpecDevcontainerDotfiles) UnmarshalJSON ¶ added in v0.3.0
func (r *EnvironmentSpecDevcontainerDotfiles) UnmarshalJSON(data []byte) (err error)
type EnvironmentSpecDevcontainerDotfilesParam ¶ added in v0.3.0
type EnvironmentSpecDevcontainerDotfilesParam struct { // URL of a dotfiles Git repository (e.g. https://github.com/owner/repository) Repository param.Field[string] `json:"repository,required" format:"uri"` }
Experimental: dotfiles is the dotfiles configuration of the devcontainer
func (EnvironmentSpecDevcontainerDotfilesParam) MarshalJSON ¶ added in v0.3.0
func (r EnvironmentSpecDevcontainerDotfilesParam) MarshalJSON() (data []byte, err error)
type EnvironmentSpecDevcontainerParam ¶
type EnvironmentSpecDevcontainerParam struct { // devcontainer_file_path is the path to the devcontainer file relative to the repo // root path must not be absolute (start with a /): // // “` // this.matches('^$|^[^/].*') // “` DevcontainerFilePath param.Field[string] `json:"devcontainerFilePath"` // Experimental: dotfiles is the dotfiles configuration of the devcontainer Dotfiles param.Field[EnvironmentSpecDevcontainerDotfilesParam] `json:"dotfiles"` Session param.Field[string] `json:"session"` }
devcontainer is the devcontainer spec of the environment
func (EnvironmentSpecDevcontainerParam) MarshalJSON ¶
func (r EnvironmentSpecDevcontainerParam) MarshalJSON() (data []byte, err error)
type EnvironmentSpecMachine ¶
type EnvironmentSpecMachine struct { // Class denotes the class of the environment we ought to start Class string `json:"class"` Session string `json:"session"` JSON environmentSpecMachineJSON `json:"-"` }
machine is the machine spec of the environment
func (*EnvironmentSpecMachine) UnmarshalJSON ¶
func (r *EnvironmentSpecMachine) UnmarshalJSON(data []byte) (err error)
type EnvironmentSpecMachineParam ¶
type EnvironmentSpecMachineParam struct { // Class denotes the class of the environment we ought to start Class param.Field[string] `json:"class"` Session param.Field[string] `json:"session"` }
machine is the machine spec of the environment
func (EnvironmentSpecMachineParam) MarshalJSON ¶
func (r EnvironmentSpecMachineParam) MarshalJSON() (data []byte, err error)
type EnvironmentSpecParam ¶
type EnvironmentSpecParam struct { // admission controlls who can access the environment and its ports. Admission param.Field[AdmissionLevel] `json:"admission"` // automations_file is the automations file spec of the environment AutomationsFile param.Field[EnvironmentSpecAutomationsFileParam] `json:"automationsFile"` // content is the content spec of the environment Content param.Field[EnvironmentSpecContentParam] `json:"content"` // Phase is the desired phase of the environment DesiredPhase param.Field[EnvironmentPhase] `json:"desiredPhase"` // devcontainer is the devcontainer spec of the environment Devcontainer param.Field[EnvironmentSpecDevcontainerParam] `json:"devcontainer"` // machine is the machine spec of the environment Machine param.Field[EnvironmentSpecMachineParam] `json:"machine"` // ports is the set of ports which ought to be exposed to the internet Ports param.Field[[]EnvironmentSpecPortParam] `json:"ports"` // secrets are confidential data that is mounted into the environment Secrets param.Field[[]EnvironmentSpecSecretParam] `json:"secrets"` // version of the spec. The value of this field has no semantic meaning (e.g. don't // interpret it as as a timestamp), but it can be used to impose a partial order. // If a.spec_version < b.spec_version then a was the spec before b. SpecVersion param.Field[string] `json:"specVersion"` // ssh_public_keys are the public keys used to ssh into the environment SSHPublicKeys param.Field[[]EnvironmentSpecSSHPublicKeyParam] `json:"sshPublicKeys"` // Timeout configures the environment timeout Timeout param.Field[EnvironmentSpecTimeoutParam] `json:"timeout"` }
EnvironmentSpec specifies the configuration of an environment for an environment start
func (EnvironmentSpecParam) MarshalJSON ¶
func (r EnvironmentSpecParam) MarshalJSON() (data []byte, err error)
type EnvironmentSpecPort ¶
type EnvironmentSpecPort struct { // policy of this port Admission AdmissionLevel `json:"admission"` // name of this port Name string `json:"name"` // port number Port int64 `json:"port"` JSON environmentSpecPortJSON `json:"-"` }
func (*EnvironmentSpecPort) UnmarshalJSON ¶
func (r *EnvironmentSpecPort) UnmarshalJSON(data []byte) (err error)
type EnvironmentSpecPortParam ¶
type EnvironmentSpecPortParam struct { // policy of this port Admission param.Field[AdmissionLevel] `json:"admission"` // name of this port Name param.Field[string] `json:"name"` // port number Port param.Field[int64] `json:"port"` }
func (EnvironmentSpecPortParam) MarshalJSON ¶
func (r EnvironmentSpecPortParam) MarshalJSON() (data []byte, err error)
type EnvironmentSpecSSHPublicKey ¶
type EnvironmentSpecSSHPublicKey struct { // id is the unique identifier of the public key ID string `json:"id"` // value is the actual public key in the public key file format Value string `json:"value"` JSON environmentSpecSSHPublicKeyJSON `json:"-"` }
func (*EnvironmentSpecSSHPublicKey) UnmarshalJSON ¶
func (r *EnvironmentSpecSSHPublicKey) UnmarshalJSON(data []byte) (err error)
type EnvironmentSpecSSHPublicKeyParam ¶
type EnvironmentSpecSSHPublicKeyParam struct { // id is the unique identifier of the public key ID param.Field[string] `json:"id"` // value is the actual public key in the public key file format Value param.Field[string] `json:"value"` }
func (EnvironmentSpecSSHPublicKeyParam) MarshalJSON ¶
func (r EnvironmentSpecSSHPublicKeyParam) MarshalJSON() (data []byte, err error)
type EnvironmentSpecSecret ¶
type EnvironmentSpecSecret struct { // container_registry_basic_auth_host is the hostname of the container registry // that supports basic auth ContainerRegistryBasicAuthHost string `json:"containerRegistryBasicAuthHost"` EnvironmentVariable string `json:"environmentVariable"` // file_path is the path inside the devcontainer where the secret is mounted FilePath string `json:"filePath"` GitCredentialHost string `json:"gitCredentialHost"` // name is the human readable description of the secret Name string `json:"name"` // session indicated the current session of the secret. When the session does not // change, secrets are not reloaded in the environment. Session string `json:"session"` // source is the source of the secret, for now control-plane or runner Source string `json:"source"` // source_ref into the source, in case of control-plane this is uuid of the secret SourceRef string `json:"sourceRef"` JSON environmentSpecSecretJSON `json:"-"` }
func (*EnvironmentSpecSecret) UnmarshalJSON ¶
func (r *EnvironmentSpecSecret) UnmarshalJSON(data []byte) (err error)
type EnvironmentSpecSecretParam ¶
type EnvironmentSpecSecretParam struct { // container_registry_basic_auth_host is the hostname of the container registry // that supports basic auth ContainerRegistryBasicAuthHost param.Field[string] `json:"containerRegistryBasicAuthHost"` EnvironmentVariable param.Field[string] `json:"environmentVariable"` // file_path is the path inside the devcontainer where the secret is mounted FilePath param.Field[string] `json:"filePath"` GitCredentialHost param.Field[string] `json:"gitCredentialHost"` // name is the human readable description of the secret Name param.Field[string] `json:"name"` // session indicated the current session of the secret. When the session does not // change, secrets are not reloaded in the environment. Session param.Field[string] `json:"session"` // source is the source of the secret, for now control-plane or runner Source param.Field[string] `json:"source"` // source_ref into the source, in case of control-plane this is uuid of the secret SourceRef param.Field[string] `json:"sourceRef"` }
func (EnvironmentSpecSecretParam) MarshalJSON ¶
func (r EnvironmentSpecSecretParam) MarshalJSON() (data []byte, err error)
type EnvironmentSpecTimeout ¶
type EnvironmentSpecTimeout struct { // inacitivity is the maximum time of disconnection before the environment is // stopped or paused. Minimum duration is 30 minutes. Set to 0 to disable. Disconnected string `json:"disconnected" format:"regex"` JSON environmentSpecTimeoutJSON `json:"-"` }
Timeout configures the environment timeout
func (*EnvironmentSpecTimeout) UnmarshalJSON ¶
func (r *EnvironmentSpecTimeout) UnmarshalJSON(data []byte) (err error)
type EnvironmentSpecTimeoutParam ¶
type EnvironmentSpecTimeoutParam struct { // inacitivity is the maximum time of disconnection before the environment is // stopped or paused. Minimum duration is 30 minutes. Set to 0 to disable. Disconnected param.Field[string] `json:"disconnected" format:"regex"` }
Timeout configures the environment timeout
func (EnvironmentSpecTimeoutParam) MarshalJSON ¶
func (r EnvironmentSpecTimeoutParam) MarshalJSON() (data []byte, err error)
type EnvironmentStartParams ¶
type EnvironmentStartParams struct { // environment_id specifies which environment should be started. EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"` }
func (EnvironmentStartParams) MarshalJSON ¶
func (r EnvironmentStartParams) MarshalJSON() (data []byte, err error)
type EnvironmentStartResponse ¶
type EnvironmentStartResponse = interface{}
type EnvironmentStatus ¶
type EnvironmentStatus struct { // activity_signal is the last activity signal for the environment. ActivitySignal EnvironmentActivitySignal `json:"activitySignal"` // automations_file contains the status of the automations file. AutomationsFile EnvironmentStatusAutomationsFile `json:"automationsFile"` // content contains the status of the environment content. Content EnvironmentStatusContent `json:"content"` // devcontainer contains the status of the devcontainer. Devcontainer EnvironmentStatusDevcontainer `json:"devcontainer"` // environment_url contains the URL at which the environment can be accessed. This // field is only set if the environment is running. EnvironmentURLs EnvironmentStatusEnvironmentURLs `json:"environmentUrls"` // failure_message summarises why the environment failed to operate. If this is // non-empty the environment has failed to operate and will likely transition to a // stopped state. FailureMessage []string `json:"failureMessage"` // machine contains the status of the environment machine Machine EnvironmentStatusMachine `json:"machine"` // the phase of an environment is a simple, high-level summary of where the // environment is in its lifecycle Phase EnvironmentPhase `json:"phase"` // runner_ack contains the acknowledgement from the runner that is has received the // environment spec. RunnerAck EnvironmentStatusRunnerAck `json:"runnerAck"` // secrets contains the status of the environment secrets Secrets []EnvironmentStatusSecret `json:"secrets"` // ssh_public_keys contains the status of the environment ssh public keys SSHPublicKeys []EnvironmentStatusSSHPublicKey `json:"sshPublicKeys"` // version of the status update. Environment instances themselves are unversioned, // but their status has different versions. The value of this field has no semantic // meaning (e.g. don't interpret it as as a timestamp), but it can be used to // impose a partial order. If a.status_version < b.status_version then a was the // status before b. StatusVersion string `json:"statusVersion"` // warning_message contains warnings, e.g. when the environment is present but not // in the expected state. WarningMessage []string `json:"warningMessage"` JSON environmentStatusJSON `json:"-"` }
EnvironmentStatus describes an environment status
func (*EnvironmentStatus) UnmarshalJSON ¶
func (r *EnvironmentStatus) UnmarshalJSON(data []byte) (err error)
type EnvironmentStatusAutomationsFile ¶
type EnvironmentStatusAutomationsFile struct { // automations_file_path is the path to the automations file relative to the repo // root. AutomationsFilePath string `json:"automationsFilePath"` // automations_file_presence indicates how an automations file is present in the // environment. AutomationsFilePresence EnvironmentStatusAutomationsFileAutomationsFilePresence `json:"automationsFilePresence"` // failure_message contains the reason the automations file failed to be applied. // This is only set if the phase is FAILED. FailureMessage string `json:"failureMessage"` // phase is the current phase of the automations file. Phase EnvironmentStatusAutomationsFilePhase `json:"phase"` // session is the automations file session that is currently applied in the // environment. Session string `json:"session"` JSON environmentStatusAutomationsFileJSON `json:"-"` }
automations_file contains the status of the automations file.
func (*EnvironmentStatusAutomationsFile) UnmarshalJSON ¶
func (r *EnvironmentStatusAutomationsFile) UnmarshalJSON(data []byte) (err error)
type EnvironmentStatusAutomationsFileAutomationsFilePresence ¶
type EnvironmentStatusAutomationsFileAutomationsFilePresence string
automations_file_presence indicates how an automations file is present in the environment.
const ( EnvironmentStatusAutomationsFileAutomationsFilePresencePresenceUnspecified EnvironmentStatusAutomationsFileAutomationsFilePresence = "PRESENCE_UNSPECIFIED" EnvironmentStatusAutomationsFileAutomationsFilePresencePresenceAbsent EnvironmentStatusAutomationsFileAutomationsFilePresence = "PRESENCE_ABSENT" EnvironmentStatusAutomationsFileAutomationsFilePresencePresenceDiscovered EnvironmentStatusAutomationsFileAutomationsFilePresence = "PRESENCE_DISCOVERED" EnvironmentStatusAutomationsFileAutomationsFilePresencePresenceSpecified EnvironmentStatusAutomationsFileAutomationsFilePresence = "PRESENCE_SPECIFIED" )
func (EnvironmentStatusAutomationsFileAutomationsFilePresence) IsKnown ¶
func (r EnvironmentStatusAutomationsFileAutomationsFilePresence) IsKnown() bool
type EnvironmentStatusAutomationsFilePhase ¶
type EnvironmentStatusAutomationsFilePhase string
phase is the current phase of the automations file.
const ( EnvironmentStatusAutomationsFilePhaseContentPhaseUnspecified EnvironmentStatusAutomationsFilePhase = "CONTENT_PHASE_UNSPECIFIED" EnvironmentStatusAutomationsFilePhaseContentPhaseCreating EnvironmentStatusAutomationsFilePhase = "CONTENT_PHASE_CREATING" EnvironmentStatusAutomationsFilePhaseContentPhaseInitializing EnvironmentStatusAutomationsFilePhase = "CONTENT_PHASE_INITIALIZING" EnvironmentStatusAutomationsFilePhaseContentPhaseReady EnvironmentStatusAutomationsFilePhase = "CONTENT_PHASE_READY" EnvironmentStatusAutomationsFilePhaseContentPhaseUpdating EnvironmentStatusAutomationsFilePhase = "CONTENT_PHASE_UPDATING" EnvironmentStatusAutomationsFilePhaseContentPhaseFailed EnvironmentStatusAutomationsFilePhase = "CONTENT_PHASE_FAILED" )
func (EnvironmentStatusAutomationsFilePhase) IsKnown ¶
func (r EnvironmentStatusAutomationsFilePhase) IsKnown() bool
type EnvironmentStatusContent ¶
type EnvironmentStatusContent struct { // content_location_in_machine is the location of the content in the machine ContentLocationInMachine string `json:"contentLocationInMachine"` // failure_message contains the reason the content initialization failed. FailureMessage string `json:"failureMessage"` // git is the Git working copy status of the environment. Note: this is a // best-effort field and more often than not will not be present. Its absence does // not indicate the absence of a working copy. Git EnvironmentStatusContentGit `json:"git"` // phase is the current phase of the environment content Phase EnvironmentStatusContentPhase `json:"phase"` // session is the session that is currently active in the environment. Session string `json:"session"` // warning_message contains warnings, e.g. when the content is present but not in // the expected state. WarningMessage string `json:"warningMessage"` JSON environmentStatusContentJSON `json:"-"` }
content contains the status of the environment content.
func (*EnvironmentStatusContent) UnmarshalJSON ¶
func (r *EnvironmentStatusContent) UnmarshalJSON(data []byte) (err error)
type EnvironmentStatusContentGit ¶
type EnvironmentStatusContentGit struct { // branch is branch we're currently on Branch string `json:"branch"` // changed_files is an array of changed files in the environment, possibly // truncated ChangedFiles []EnvironmentStatusContentGitChangedFile `json:"changedFiles"` // clone_url is the repository url as you would pass it to "git clone". Only HTTPS // clone URLs are supported. CloneURL string `json:"cloneUrl"` // latest_commit is the most recent commit on the current branch LatestCommit string `json:"latestCommit"` TotalChangedFiles int64 `json:"totalChangedFiles"` // the total number of unpushed changes TotalUnpushedCommits int64 `json:"totalUnpushedCommits"` // unpushed_commits is an array of unpushed changes in the environment, possibly // truncated UnpushedCommits []string `json:"unpushedCommits"` JSON environmentStatusContentGitJSON `json:"-"` }
git is the Git working copy status of the environment. Note: this is a best-effort field and more often than not will not be present. Its absence does not indicate the absence of a working copy.
func (*EnvironmentStatusContentGit) UnmarshalJSON ¶
func (r *EnvironmentStatusContentGit) UnmarshalJSON(data []byte) (err error)
type EnvironmentStatusContentGitChangedFile ¶
type EnvironmentStatusContentGitChangedFile struct { // ChangeType is the type of change that happened to the file ChangeType EnvironmentStatusContentGitChangedFilesChangeType `json:"changeType"` // path is the path of the file Path string `json:"path"` JSON environmentStatusContentGitChangedFileJSON `json:"-"` }
func (*EnvironmentStatusContentGitChangedFile) UnmarshalJSON ¶
func (r *EnvironmentStatusContentGitChangedFile) UnmarshalJSON(data []byte) (err error)
type EnvironmentStatusContentGitChangedFilesChangeType ¶
type EnvironmentStatusContentGitChangedFilesChangeType string
ChangeType is the type of change that happened to the file
const ( EnvironmentStatusContentGitChangedFilesChangeTypeChangeTypeUnspecified EnvironmentStatusContentGitChangedFilesChangeType = "CHANGE_TYPE_UNSPECIFIED" EnvironmentStatusContentGitChangedFilesChangeTypeChangeTypeAdded EnvironmentStatusContentGitChangedFilesChangeType = "CHANGE_TYPE_ADDED" EnvironmentStatusContentGitChangedFilesChangeTypeChangeTypeModified EnvironmentStatusContentGitChangedFilesChangeType = "CHANGE_TYPE_MODIFIED" EnvironmentStatusContentGitChangedFilesChangeTypeChangeTypeDeleted EnvironmentStatusContentGitChangedFilesChangeType = "CHANGE_TYPE_DELETED" EnvironmentStatusContentGitChangedFilesChangeTypeChangeTypeRenamed EnvironmentStatusContentGitChangedFilesChangeType = "CHANGE_TYPE_RENAMED" EnvironmentStatusContentGitChangedFilesChangeTypeChangeTypeCopied EnvironmentStatusContentGitChangedFilesChangeType = "CHANGE_TYPE_COPIED" EnvironmentStatusContentGitChangedFilesChangeTypeChangeTypeUpdatedButUnmerged EnvironmentStatusContentGitChangedFilesChangeType = "CHANGE_TYPE_UPDATED_BUT_UNMERGED" EnvironmentStatusContentGitChangedFilesChangeTypeChangeTypeUntracked EnvironmentStatusContentGitChangedFilesChangeType = "CHANGE_TYPE_UNTRACKED" )
func (EnvironmentStatusContentGitChangedFilesChangeType) IsKnown ¶
func (r EnvironmentStatusContentGitChangedFilesChangeType) IsKnown() bool
type EnvironmentStatusContentPhase ¶
type EnvironmentStatusContentPhase string
phase is the current phase of the environment content
const ( EnvironmentStatusContentPhaseContentPhaseUnspecified EnvironmentStatusContentPhase = "CONTENT_PHASE_UNSPECIFIED" EnvironmentStatusContentPhaseContentPhaseCreating EnvironmentStatusContentPhase = "CONTENT_PHASE_CREATING" EnvironmentStatusContentPhaseContentPhaseInitializing EnvironmentStatusContentPhase = "CONTENT_PHASE_INITIALIZING" EnvironmentStatusContentPhaseContentPhaseReady EnvironmentStatusContentPhase = "CONTENT_PHASE_READY" EnvironmentStatusContentPhaseContentPhaseUpdating EnvironmentStatusContentPhase = "CONTENT_PHASE_UPDATING" EnvironmentStatusContentPhaseContentPhaseFailed EnvironmentStatusContentPhase = "CONTENT_PHASE_FAILED" )
func (EnvironmentStatusContentPhase) IsKnown ¶
func (r EnvironmentStatusContentPhase) IsKnown() bool
type EnvironmentStatusDevcontainer ¶
type EnvironmentStatusDevcontainer struct { // container_id is the ID of the container. ContainerID string `json:"containerId"` // container_name is the name of the container that is used to connect to the // devcontainer ContainerName string `json:"containerName"` // devcontainerconfig_in_sync indicates if the devcontainer is up to date w.r.t. // the devcontainer config file. DevcontainerconfigInSync bool `json:"devcontainerconfigInSync"` // devcontainer_file_path is the path to the devcontainer file relative to the repo // root DevcontainerFilePath string `json:"devcontainerFilePath"` // devcontainer_file_presence indicates how the devcontainer file is present in the // repo. DevcontainerFilePresence EnvironmentStatusDevcontainerDevcontainerFilePresence `json:"devcontainerFilePresence"` // failure_message contains the reason the devcontainer failed to operate. FailureMessage string `json:"failureMessage"` // phase is the current phase of the devcontainer Phase EnvironmentStatusDevcontainerPhase `json:"phase"` // remote_user is the user that is used to connect to the devcontainer RemoteUser string `json:"remoteUser"` // remote_workspace_folder is the folder that is used to connect to the // devcontainer RemoteWorkspaceFolder string `json:"remoteWorkspaceFolder"` // secrets_in_sync indicates if the secrets are up to date w.r.t. the running // devcontainer. SecretsInSync bool `json:"secretsInSync"` // session is the session that is currently active in the devcontainer. Session string `json:"session"` // warning_message contains warnings, e.g. when the devcontainer is present but not // in the expected state. WarningMessage string `json:"warningMessage"` JSON environmentStatusDevcontainerJSON `json:"-"` }
devcontainer contains the status of the devcontainer.
func (*EnvironmentStatusDevcontainer) UnmarshalJSON ¶
func (r *EnvironmentStatusDevcontainer) UnmarshalJSON(data []byte) (err error)
type EnvironmentStatusDevcontainerDevcontainerFilePresence ¶
type EnvironmentStatusDevcontainerDevcontainerFilePresence string
devcontainer_file_presence indicates how the devcontainer file is present in the repo.
const ( EnvironmentStatusDevcontainerDevcontainerFilePresencePresenceUnspecified EnvironmentStatusDevcontainerDevcontainerFilePresence = "PRESENCE_UNSPECIFIED" EnvironmentStatusDevcontainerDevcontainerFilePresencePresenceGenerated EnvironmentStatusDevcontainerDevcontainerFilePresence = "PRESENCE_GENERATED" EnvironmentStatusDevcontainerDevcontainerFilePresencePresenceDiscovered EnvironmentStatusDevcontainerDevcontainerFilePresence = "PRESENCE_DISCOVERED" EnvironmentStatusDevcontainerDevcontainerFilePresencePresenceSpecified EnvironmentStatusDevcontainerDevcontainerFilePresence = "PRESENCE_SPECIFIED" )
func (EnvironmentStatusDevcontainerDevcontainerFilePresence) IsKnown ¶
func (r EnvironmentStatusDevcontainerDevcontainerFilePresence) IsKnown() bool
type EnvironmentStatusDevcontainerPhase ¶
type EnvironmentStatusDevcontainerPhase string
phase is the current phase of the devcontainer
const ( EnvironmentStatusDevcontainerPhasePhaseUnspecified EnvironmentStatusDevcontainerPhase = "PHASE_UNSPECIFIED" EnvironmentStatusDevcontainerPhasePhaseCreating EnvironmentStatusDevcontainerPhase = "PHASE_CREATING" EnvironmentStatusDevcontainerPhasePhaseRunning EnvironmentStatusDevcontainerPhase = "PHASE_RUNNING" EnvironmentStatusDevcontainerPhasePhaseStopped EnvironmentStatusDevcontainerPhase = "PHASE_STOPPED" EnvironmentStatusDevcontainerPhasePhaseFailed EnvironmentStatusDevcontainerPhase = "PHASE_FAILED" )
func (EnvironmentStatusDevcontainerPhase) IsKnown ¶
func (r EnvironmentStatusDevcontainerPhase) IsKnown() bool
type EnvironmentStatusEnvironmentURLs ¶
type EnvironmentStatusEnvironmentURLs struct { // logs is the URL at which the environment logs can be accessed. Logs string `json:"logs"` Ports []EnvironmentStatusEnvironmentURLsPort `json:"ports"` // SSH is the URL at which the environment can be accessed via SSH. SSH EnvironmentStatusEnvironmentURLsSSH `json:"ssh"` JSON environmentStatusEnvironmentURLsJSON `json:"-"` }
environment_url contains the URL at which the environment can be accessed. This field is only set if the environment is running.
func (*EnvironmentStatusEnvironmentURLs) UnmarshalJSON ¶
func (r *EnvironmentStatusEnvironmentURLs) UnmarshalJSON(data []byte) (err error)
type EnvironmentStatusEnvironmentURLsPort ¶
type EnvironmentStatusEnvironmentURLsPort struct { // port is the port number of the environment port Port int64 `json:"port"` // url is the URL at which the environment port can be accessed URL string `json:"url"` JSON environmentStatusEnvironmentURLsPortJSON `json:"-"` }
func (*EnvironmentStatusEnvironmentURLsPort) UnmarshalJSON ¶
func (r *EnvironmentStatusEnvironmentURLsPort) UnmarshalJSON(data []byte) (err error)
type EnvironmentStatusEnvironmentURLsSSH ¶
type EnvironmentStatusEnvironmentURLsSSH struct { URL string `json:"url"` JSON environmentStatusEnvironmentURLsSSHJSON `json:"-"` }
SSH is the URL at which the environment can be accessed via SSH.
func (*EnvironmentStatusEnvironmentURLsSSH) UnmarshalJSON ¶
func (r *EnvironmentStatusEnvironmentURLsSSH) UnmarshalJSON(data []byte) (err error)
type EnvironmentStatusMachine ¶
type EnvironmentStatusMachine struct { // failure_message contains the reason the machine failed to operate. FailureMessage string `json:"failureMessage"` // phase is the current phase of the environment machine Phase EnvironmentStatusMachinePhase `json:"phase"` // session is the session that is currently active in the machine. Session string `json:"session"` // timeout contains the reason the environment has timed out. If this field is // empty, the environment has not timed out. Timeout string `json:"timeout"` // versions contains the versions of components in the machine. Versions EnvironmentStatusMachineVersions `json:"versions"` // warning_message contains warnings, e.g. when the machine is present but not in // the expected state. WarningMessage string `json:"warningMessage"` JSON environmentStatusMachineJSON `json:"-"` }
machine contains the status of the environment machine
func (*EnvironmentStatusMachine) UnmarshalJSON ¶
func (r *EnvironmentStatusMachine) UnmarshalJSON(data []byte) (err error)
type EnvironmentStatusMachinePhase ¶
type EnvironmentStatusMachinePhase string
phase is the current phase of the environment machine
const ( EnvironmentStatusMachinePhasePhaseUnspecified EnvironmentStatusMachinePhase = "PHASE_UNSPECIFIED" EnvironmentStatusMachinePhasePhaseCreating EnvironmentStatusMachinePhase = "PHASE_CREATING" EnvironmentStatusMachinePhasePhaseStarting EnvironmentStatusMachinePhase = "PHASE_STARTING" EnvironmentStatusMachinePhasePhaseRunning EnvironmentStatusMachinePhase = "PHASE_RUNNING" EnvironmentStatusMachinePhasePhaseStopping EnvironmentStatusMachinePhase = "PHASE_STOPPING" EnvironmentStatusMachinePhasePhaseStopped EnvironmentStatusMachinePhase = "PHASE_STOPPED" EnvironmentStatusMachinePhasePhaseDeleting EnvironmentStatusMachinePhase = "PHASE_DELETING" EnvironmentStatusMachinePhasePhaseDeleted EnvironmentStatusMachinePhase = "PHASE_DELETED" )
func (EnvironmentStatusMachinePhase) IsKnown ¶
func (r EnvironmentStatusMachinePhase) IsKnown() bool
type EnvironmentStatusMachineVersions ¶
type EnvironmentStatusMachineVersions struct { SupervisorCommit string `json:"supervisorCommit"` SupervisorVersion string `json:"supervisorVersion"` JSON environmentStatusMachineVersionsJSON `json:"-"` }
versions contains the versions of components in the machine.
func (*EnvironmentStatusMachineVersions) UnmarshalJSON ¶
func (r *EnvironmentStatusMachineVersions) UnmarshalJSON(data []byte) (err error)
type EnvironmentStatusRunnerAck ¶
type EnvironmentStatusRunnerAck struct { Message string `json:"message"` SpecVersion string `json:"specVersion"` StatusCode EnvironmentStatusRunnerAckStatusCode `json:"statusCode"` JSON environmentStatusRunnerAckJSON `json:"-"` }
runner_ack contains the acknowledgement from the runner that is has received the environment spec.
func (*EnvironmentStatusRunnerAck) UnmarshalJSON ¶
func (r *EnvironmentStatusRunnerAck) UnmarshalJSON(data []byte) (err error)
type EnvironmentStatusRunnerAckStatusCode ¶
type EnvironmentStatusRunnerAckStatusCode string
const ( EnvironmentStatusRunnerAckStatusCodeStatusCodeUnspecified EnvironmentStatusRunnerAckStatusCode = "STATUS_CODE_UNSPECIFIED" EnvironmentStatusRunnerAckStatusCodeStatusCodeOk EnvironmentStatusRunnerAckStatusCode = "STATUS_CODE_OK" EnvironmentStatusRunnerAckStatusCodeStatusCodeInvalidResource EnvironmentStatusRunnerAckStatusCode = "STATUS_CODE_INVALID_RESOURCE" EnvironmentStatusRunnerAckStatusCodeStatusCodeFailedPrecondition EnvironmentStatusRunnerAckStatusCode = "STATUS_CODE_FAILED_PRECONDITION" )
func (EnvironmentStatusRunnerAckStatusCode) IsKnown ¶
func (r EnvironmentStatusRunnerAckStatusCode) IsKnown() bool
type EnvironmentStatusSSHPublicKey ¶
type EnvironmentStatusSSHPublicKey struct { // id is the unique identifier of the public key ID string `json:"id"` // phase is the current phase of the public key Phase EnvironmentStatusSSHPublicKeysPhase `json:"phase"` JSON environmentStatusSSHPublicKeyJSON `json:"-"` }
func (*EnvironmentStatusSSHPublicKey) UnmarshalJSON ¶
func (r *EnvironmentStatusSSHPublicKey) UnmarshalJSON(data []byte) (err error)
type EnvironmentStatusSSHPublicKeysPhase ¶
type EnvironmentStatusSSHPublicKeysPhase string
phase is the current phase of the public key
const ( EnvironmentStatusSSHPublicKeysPhaseContentPhaseUnspecified EnvironmentStatusSSHPublicKeysPhase = "CONTENT_PHASE_UNSPECIFIED" EnvironmentStatusSSHPublicKeysPhaseContentPhaseCreating EnvironmentStatusSSHPublicKeysPhase = "CONTENT_PHASE_CREATING" EnvironmentStatusSSHPublicKeysPhaseContentPhaseInitializing EnvironmentStatusSSHPublicKeysPhase = "CONTENT_PHASE_INITIALIZING" EnvironmentStatusSSHPublicKeysPhaseContentPhaseReady EnvironmentStatusSSHPublicKeysPhase = "CONTENT_PHASE_READY" EnvironmentStatusSSHPublicKeysPhaseContentPhaseUpdating EnvironmentStatusSSHPublicKeysPhase = "CONTENT_PHASE_UPDATING" EnvironmentStatusSSHPublicKeysPhaseContentPhaseFailed EnvironmentStatusSSHPublicKeysPhase = "CONTENT_PHASE_FAILED" )
func (EnvironmentStatusSSHPublicKeysPhase) IsKnown ¶
func (r EnvironmentStatusSSHPublicKeysPhase) IsKnown() bool
type EnvironmentStatusSecret ¶
type EnvironmentStatusSecret struct { // failure_message contains the reason the secret failed to be materialize. FailureMessage string `json:"failureMessage"` Phase EnvironmentStatusSecretsPhase `json:"phase"` SecretName string `json:"secretName"` // session is the session that is currently active in the environment. Session string `json:"session"` // warning_message contains warnings, e.g. when the secret is present but not in // the expected state. WarningMessage string `json:"warningMessage"` JSON environmentStatusSecretJSON `json:"-"` }
func (*EnvironmentStatusSecret) UnmarshalJSON ¶
func (r *EnvironmentStatusSecret) UnmarshalJSON(data []byte) (err error)
type EnvironmentStatusSecretsPhase ¶
type EnvironmentStatusSecretsPhase string
const ( EnvironmentStatusSecretsPhaseContentPhaseUnspecified EnvironmentStatusSecretsPhase = "CONTENT_PHASE_UNSPECIFIED" EnvironmentStatusSecretsPhaseContentPhaseCreating EnvironmentStatusSecretsPhase = "CONTENT_PHASE_CREATING" EnvironmentStatusSecretsPhaseContentPhaseInitializing EnvironmentStatusSecretsPhase = "CONTENT_PHASE_INITIALIZING" EnvironmentStatusSecretsPhaseContentPhaseReady EnvironmentStatusSecretsPhase = "CONTENT_PHASE_READY" EnvironmentStatusSecretsPhaseContentPhaseUpdating EnvironmentStatusSecretsPhase = "CONTENT_PHASE_UPDATING" EnvironmentStatusSecretsPhaseContentPhaseFailed EnvironmentStatusSecretsPhase = "CONTENT_PHASE_FAILED" )
func (EnvironmentStatusSecretsPhase) IsKnown ¶
func (r EnvironmentStatusSecretsPhase) IsKnown() bool
type EnvironmentStopParams ¶
type EnvironmentStopParams struct { // environment_id specifies which environment should be stopped. // // +required EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"` }
func (EnvironmentStopParams) MarshalJSON ¶
func (r EnvironmentStopParams) MarshalJSON() (data []byte, err error)
type EnvironmentStopResponse ¶
type EnvironmentStopResponse = interface{}
type EnvironmentUpdateParams ¶
type EnvironmentUpdateParams struct { // environment_id specifies which environment should be updated. // // +required EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"` Metadata param.Field[interface{}] `json:"metadata"` Spec param.Field[EnvironmentUpdateParamsSpec] `json:"spec"` }
func (EnvironmentUpdateParams) MarshalJSON ¶
func (r EnvironmentUpdateParams) MarshalJSON() (data []byte, err error)
type EnvironmentUpdateParamsSpec ¶
type EnvironmentUpdateParamsSpec struct { // automations_file is the automations file spec of the environment AutomationsFile param.Field[EnvironmentUpdateParamsSpecAutomationsFile] `json:"automationsFile"` Content param.Field[EnvironmentUpdateParamsSpecContent] `json:"content"` Devcontainer param.Field[EnvironmentUpdateParamsSpecDevcontainer] `json:"devcontainer"` // ports controls port sharing Ports param.Field[[]EnvironmentUpdateParamsSpecPort] `json:"ports"` // ssh_public_keys are the public keys to update empty array means nothing to // update SSHPublicKeys param.Field[[]EnvironmentUpdateParamsSpecSSHPublicKey] `json:"sshPublicKeys"` // Timeout configures the environment timeout Timeout param.Field[EnvironmentUpdateParamsSpecTimeout] `json:"timeout"` }
func (EnvironmentUpdateParamsSpec) MarshalJSON ¶
func (r EnvironmentUpdateParamsSpec) MarshalJSON() (data []byte, err error)
type EnvironmentUpdateParamsSpecAutomationsFile ¶
type EnvironmentUpdateParamsSpecAutomationsFile struct { // automations_file_path is the path to the automations file that is applied in the // environment, relative to the repo root. path must not be absolute (start with a // /): // // “` // this.matches('^$|^[^/].*') // “` AutomationsFilePath param.Field[string] `json:"automationsFilePath"` Session param.Field[string] `json:"session"` }
automations_file is the automations file spec of the environment
func (EnvironmentUpdateParamsSpecAutomationsFile) MarshalJSON ¶
func (r EnvironmentUpdateParamsSpecAutomationsFile) MarshalJSON() (data []byte, err error)
type EnvironmentUpdateParamsSpecContent ¶
type EnvironmentUpdateParamsSpecContent struct { // The Git email address GitEmail param.Field[string] `json:"gitEmail"` // The Git username GitUsername param.Field[string] `json:"gitUsername"` // initializer configures how the environment is to be initialized Initializer param.Field[EnvironmentInitializerParam] `json:"initializer"` // session should be changed to trigger a content reinitialization Session param.Field[string] `json:"session"` }
func (EnvironmentUpdateParamsSpecContent) MarshalJSON ¶
func (r EnvironmentUpdateParamsSpecContent) MarshalJSON() (data []byte, err error)
type EnvironmentUpdateParamsSpecDevcontainer ¶
type EnvironmentUpdateParamsSpecDevcontainer struct { // devcontainer_file_path is the path to the devcontainer file relative to the repo // root path must not be absolute (start with a /): // // “` // this.matches('^$|^[^/].*') // “` DevcontainerFilePath param.Field[string] `json:"devcontainerFilePath"` // session should be changed to trigger a devcontainer rebuild Session param.Field[string] `json:"session"` }
func (EnvironmentUpdateParamsSpecDevcontainer) MarshalJSON ¶
func (r EnvironmentUpdateParamsSpecDevcontainer) MarshalJSON() (data []byte, err error)
type EnvironmentUpdateParamsSpecPort ¶
type EnvironmentUpdateParamsSpecPort struct { // policy of this port Admission param.Field[AdmissionLevel] `json:"admission"` // name of this port Name param.Field[string] `json:"name"` // port number Port param.Field[int64] `json:"port"` }
func (EnvironmentUpdateParamsSpecPort) MarshalJSON ¶
func (r EnvironmentUpdateParamsSpecPort) MarshalJSON() (data []byte, err error)
type EnvironmentUpdateParamsSpecSSHPublicKey ¶
type EnvironmentUpdateParamsSpecSSHPublicKey struct { // id is the unique identifier of the public key ID param.Field[string] `json:"id"` // value is the actual public key in the public key file format if not provided, // the public key will be removed Value param.Field[string] `json:"value"` }
func (EnvironmentUpdateParamsSpecSSHPublicKey) MarshalJSON ¶
func (r EnvironmentUpdateParamsSpecSSHPublicKey) MarshalJSON() (data []byte, err error)
type EnvironmentUpdateParamsSpecTimeout ¶
type EnvironmentUpdateParamsSpecTimeout struct { // inacitivity is the maximum time of disconnection before the environment is // stopped or paused. Minimum duration is 30 minutes. Set to 0 to disable. Disconnected param.Field[string] `json:"disconnected" format:"regex"` }
Timeout configures the environment timeout
func (EnvironmentUpdateParamsSpecTimeout) MarshalJSON ¶
func (r EnvironmentUpdateParamsSpecTimeout) MarshalJSON() (data []byte, err error)
type EnvironmentUpdateResponse ¶
type EnvironmentUpdateResponse = interface{}
type EventListParams ¶
type EventListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` Filter param.Field[EventListParamsFilter] `json:"filter"` // pagination contains the pagination options for listing environments Pagination param.Field[EventListParamsPagination] `json:"pagination"` }
func (EventListParams) MarshalJSON ¶
func (r EventListParams) MarshalJSON() (data []byte, err error)
func (EventListParams) URLQuery ¶
func (r EventListParams) URLQuery() (v url.Values)
URLQuery serializes EventListParams's query parameters as `url.Values`.
type EventListParamsFilter ¶
type EventListParamsFilter struct { ActorIDs param.Field[[]string] `json:"actorIds" format:"uuid"` ActorPrincipals param.Field[[]shared.Principal] `json:"actorPrincipals"` SubjectIDs param.Field[[]string] `json:"subjectIds" format:"uuid"` SubjectTypes param.Field[[]ResourceType] `json:"subjectTypes"` }
func (EventListParamsFilter) MarshalJSON ¶
func (r EventListParamsFilter) MarshalJSON() (data []byte, err error)
type EventListParamsPagination ¶
type EventListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing environments
func (EventListParamsPagination) MarshalJSON ¶
func (r EventListParamsPagination) MarshalJSON() (data []byte, err error)
type EventListResponse ¶
type EventListResponse struct { ID string `json:"id"` Action string `json:"action"` ActorID string `json:"actorId"` ActorPrincipal shared.Principal `json:"actorPrincipal"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. CreatedAt time.Time `json:"createdAt" format:"date-time"` SubjectID string `json:"subjectId"` SubjectType ResourceType `json:"subjectType"` JSON eventListResponseJSON `json:"-"` }
func (*EventListResponse) UnmarshalJSON ¶
func (r *EventListResponse) UnmarshalJSON(data []byte) (err error)
type EventService ¶
type EventService struct {
Options []option.RequestOption
}
EventService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEventService method instead.
func NewEventService ¶
func NewEventService(opts ...option.RequestOption) (r *EventService)
NewEventService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EventService) List ¶
func (r *EventService) List(ctx context.Context, params EventListParams, opts ...option.RequestOption) (res *pagination.EntriesPage[EventListResponse], err error)
Lists audit logs with filtering and pagination options.
Use this method to:
- View audit history - Track user actions - Monitor system changes
### Examples
- List all logs:
```yaml pagination: pageSize: 20 ```
- Filter by actor:
```yaml filter: actorIds: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"] actorPrincipals: ["PRINCIPAL_USER"] pagination: pageSize: 20 ```
func (*EventService) ListAutoPaging ¶
func (r *EventService) ListAutoPaging(ctx context.Context, params EventListParams, opts ...option.RequestOption) *pagination.EntriesPageAutoPager[EventListResponse]
Lists audit logs with filtering and pagination options.
Use this method to:
- View audit history - Track user actions - Monitor system changes
### Examples
- List all logs:
```yaml pagination: pageSize: 20 ```
- Filter by actor:
```yaml filter: actorIds: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"] actorPrincipals: ["PRINCIPAL_USER"] pagination: pageSize: 20 ```
func (*EventService) WatchStreaming ¶
func (r *EventService) WatchStreaming(ctx context.Context, body EventWatchParams, opts ...option.RequestOption) (stream *jsonl.Stream[EventWatchResponse])
Streams events for all projects, runners, environments, tasks, and services based on the specified scope.
Use this method to:
- Monitor resource changes in real-time - Track system events - Receive notifications
The scope parameter determines which events to watch:
- Organization scope (default): Watch all organization-wide events including projects, runners and environments. Task and service events are not included. Use by setting organization=true or omitting the scope.
- Environment scope: Watch events for a specific environment, including its tasks, task executions, and services. Use by setting environment_id to the UUID of the environment to watch.
type EventWatchParams ¶
type EventWatchParams struct { // Environment scope produces events for the environment itself, all tasks, task // executions, and services associated with that environment. EnvironmentID param.Field[string] `json:"environmentId"` // Organization scope produces events for all projects, runners and environments // the caller can see within their organization. No task, task execution or service // events are produed. Organization param.Field[bool] `json:"organization"` }
func (EventWatchParams) MarshalJSON ¶
func (r EventWatchParams) MarshalJSON() (data []byte, err error)
type EventWatchResponse ¶
type EventWatchResponse struct { Operation ResourceOperation `json:"operation"` ResourceID string `json:"resourceId" format:"uuid"` ResourceType ResourceType `json:"resourceType"` JSON eventWatchResponseJSON `json:"-"` }
func (*EventWatchResponse) UnmarshalJSON ¶
func (r *EventWatchResponse) UnmarshalJSON(data []byte) (err error)
type FieldValidationError ¶
type FieldValidationError struct { Error string `json:"error"` Key string `json:"key"` JSON fieldValidationErrorJSON `json:"-"` }
func (*FieldValidationError) UnmarshalJSON ¶
func (r *FieldValidationError) UnmarshalJSON(data []byte) (err error)
type FieldValueParam ¶
type FieldValueParam = shared.FieldValueParam
This is an alias to an internal type.
type Group ¶
type Group struct { ID string `json:"id" format:"uuid"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. CreatedAt time.Time `json:"createdAt" format:"date-time"` Name string `json:"name"` OrganizationID string `json:"organizationId" format:"uuid"` // system_managed indicates that this group is created by the system automatically SystemManaged bool `json:"systemManaged"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. UpdatedAt time.Time `json:"updatedAt" format:"date-time"` JSON groupJSON `json:"-"` }
func (*Group) UnmarshalJSON ¶
type GroupListParams ¶
type GroupListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` // pagination contains the pagination options for listing groups Pagination param.Field[GroupListParamsPagination] `json:"pagination"` }
func (GroupListParams) MarshalJSON ¶
func (r GroupListParams) MarshalJSON() (data []byte, err error)
func (GroupListParams) URLQuery ¶
func (r GroupListParams) URLQuery() (v url.Values)
URLQuery serializes GroupListParams's query parameters as `url.Values`.
type GroupListParamsPagination ¶
type GroupListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing groups
func (GroupListParamsPagination) MarshalJSON ¶
func (r GroupListParamsPagination) MarshalJSON() (data []byte, err error)
type GroupService ¶
type GroupService struct {
Options []option.RequestOption
}
GroupService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGroupService method instead.
func NewGroupService ¶
func NewGroupService(opts ...option.RequestOption) (r *GroupService)
NewGroupService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GroupService) List ¶
func (r *GroupService) List(ctx context.Context, params GroupListParams, opts ...option.RequestOption) (res *pagination.GroupsPage[Group], err error)
Lists groups with optional pagination.
Use this method to:
- View all groups - Check group memberships - Monitor group configurations - Audit group access
### Examples
- List all groups:
Shows all groups with pagination. ```yaml pagination: pageSize: 20 ```
- List with custom page size:
Shows groups with specified page size. ```yaml pagination: pageSize: 50 token: "next-page-token-from-previous-response" ```
func (*GroupService) ListAutoPaging ¶
func (r *GroupService) ListAutoPaging(ctx context.Context, params GroupListParams, opts ...option.RequestOption) *pagination.GroupsPageAutoPager[Group]
Lists groups with optional pagination.
Use this method to:
- View all groups - Check group memberships - Monitor group configurations - Audit group access
### Examples
- List all groups:
Shows all groups with pagination. ```yaml pagination: pageSize: 20 ```
- List with custom page size:
Shows groups with specified page size. ```yaml pagination: pageSize: 50 token: "next-page-token-from-previous-response" ```
type HostAuthenticationToken ¶
type HostAuthenticationToken struct { ID string `json:"id,required"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. ExpiresAt time.Time `json:"expiresAt" format:"date-time"` Host string `json:"host"` RunnerID string `json:"runnerId"` Source HostAuthenticationTokenSource `json:"source"` UserID string `json:"userId"` JSON hostAuthenticationTokenJSON `json:"-"` }
func (*HostAuthenticationToken) UnmarshalJSON ¶
func (r *HostAuthenticationToken) UnmarshalJSON(data []byte) (err error)
type HostAuthenticationTokenSource ¶
type HostAuthenticationTokenSource string
const ( HostAuthenticationTokenSourceUnspecified HostAuthenticationTokenSource = "HOST_AUTHENTICATION_TOKEN_SOURCE_UNSPECIFIED" HostAuthenticationTokenSourceOAuth HostAuthenticationTokenSource = "HOST_AUTHENTICATION_TOKEN_SOURCE_OAUTH" HostAuthenticationTokenSourcePat HostAuthenticationTokenSource = "HOST_AUTHENTICATION_TOKEN_SOURCE_PAT" )
func (HostAuthenticationTokenSource) IsKnown ¶
func (r HostAuthenticationTokenSource) IsKnown() bool
type IdentityExchangeTokenParams ¶
type IdentityExchangeTokenParams struct { // exchange_token is the token to exchange ExchangeToken param.Field[string] `json:"exchangeToken"` }
func (IdentityExchangeTokenParams) MarshalJSON ¶
func (r IdentityExchangeTokenParams) MarshalJSON() (data []byte, err error)
type IdentityExchangeTokenResponse ¶
type IdentityExchangeTokenResponse struct { // access_token is the new access token AccessToken string `json:"accessToken"` JSON identityExchangeTokenResponseJSON `json:"-"` }
func (*IdentityExchangeTokenResponse) UnmarshalJSON ¶
func (r *IdentityExchangeTokenResponse) UnmarshalJSON(data []byte) (err error)
type IdentityGetAuthenticatedIdentityParams ¶
func (IdentityGetAuthenticatedIdentityParams) MarshalJSON ¶
func (r IdentityGetAuthenticatedIdentityParams) MarshalJSON() (data []byte, err error)
type IdentityGetAuthenticatedIdentityResponse ¶
type IdentityGetAuthenticatedIdentityResponse struct { OrganizationID string `json:"organizationId"` // subject is the identity of the current user Subject shared.Subject `json:"subject"` JSON identityGetAuthenticatedIdentityResponseJSON `json:"-"` }
func (*IdentityGetAuthenticatedIdentityResponse) UnmarshalJSON ¶
func (r *IdentityGetAuthenticatedIdentityResponse) UnmarshalJSON(data []byte) (err error)
type IdentityGetIDTokenParams ¶
func (IdentityGetIDTokenParams) MarshalJSON ¶
func (r IdentityGetIDTokenParams) MarshalJSON() (data []byte, err error)
type IdentityGetIDTokenResponse ¶
type IdentityGetIDTokenResponse struct { Token string `json:"token"` JSON identityGetIDTokenResponseJSON `json:"-"` }
func (*IdentityGetIDTokenResponse) UnmarshalJSON ¶
func (r *IdentityGetIDTokenResponse) UnmarshalJSON(data []byte) (err error)
type IdentityService ¶
type IdentityService struct {
Options []option.RequestOption
}
IdentityService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIdentityService method instead.
func NewIdentityService ¶
func NewIdentityService(opts ...option.RequestOption) (r *IdentityService)
NewIdentityService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*IdentityService) ExchangeToken ¶
func (r *IdentityService) ExchangeToken(ctx context.Context, body IdentityExchangeTokenParams, opts ...option.RequestOption) (res *IdentityExchangeTokenResponse, err error)
Exchanges an exchange token for a new access token.
Use this method to:
- Convert exchange tokens to access tokens - Obtain new access credentials - Complete token exchange flows
### Examples
- Exchange token:
Trades an exchange token for an access token. ```yaml exchangeToken: "exchange-token-value" ```
func (*IdentityService) GetAuthenticatedIdentity ¶
func (r *IdentityService) GetAuthenticatedIdentity(ctx context.Context, body IdentityGetAuthenticatedIdentityParams, opts ...option.RequestOption) (res *IdentityGetAuthenticatedIdentityResponse, err error)
Retrieves information about the currently authenticated identity.
Use this method to:
- Get current user information - Check authentication status - Retrieve organization context - Validate authentication principal
### Examples
- Get current identity:
Retrieves details about the authenticated user. ```yaml {} ```
func (*IdentityService) GetIDToken ¶
func (r *IdentityService) GetIDToken(ctx context.Context, body IdentityGetIDTokenParams, opts ...option.RequestOption) (res *IdentityGetIDTokenResponse, err error)
Gets an ID token for authenticating with other services.
Use this method to:
- Obtain authentication tokens for service-to-service calls - Access protected resources - Generate scoped access tokens
### Examples
- Get token for single service:
Retrieves a token for authenticating with one service. ```yaml audience: - "https://api.gitpod.io" ```
- Get token for multiple services:
Retrieves a token valid for multiple services. ```yaml audience: - "https://api.gitpod.io" - "https://ws.gitpod.io" ```
type InviteDomains ¶
type InviteDomains struct { // domains is the list of domains that are allowed to join the organization Domains []string `json:"domains"` JSON inviteDomainsJSON `json:"-"` }
func (*InviteDomains) UnmarshalJSON ¶
func (r *InviteDomains) UnmarshalJSON(data []byte) (err error)
type InviteDomainsParam ¶
type InviteDomainsParam struct { // domains is the list of domains that are allowed to join the organization Domains param.Field[[]string] `json:"domains"` }
func (InviteDomainsParam) MarshalJSON ¶
func (r InviteDomainsParam) MarshalJSON() (data []byte, err error)
type JoinableOrganization ¶
type JoinableOrganization struct { // organization_id is the id of the organization the user can join OrganizationID string `json:"organizationId,required" format:"uuid"` // organization_name is the name of the organization the user can join OrganizationName string `json:"organizationName,required"` // organization_member_count is the member count of the organization the user can // join OrganizationMemberCount int64 `json:"organizationMemberCount"` JSON joinableOrganizationJSON `json:"-"` }
func (*JoinableOrganization) UnmarshalJSON ¶
func (r *JoinableOrganization) UnmarshalJSON(data []byte) (err error)
type LoginProvider ¶
type LoginProvider struct { // provider is the provider used by this login method, e.g. "github", "google", // "custom" Provider string `json:"provider,required"` // login_url is the URL to redirect the browser agent to for login, when provider // is "custom" LoginURL string `json:"loginUrl"` JSON loginProviderJSON `json:"-"` }
func (*LoginProvider) UnmarshalJSON ¶
func (r *LoginProvider) UnmarshalJSON(data []byte) (err error)
type Organization ¶
type Organization struct { ID string `json:"id,required" format:"uuid"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. CreatedAt time.Time `json:"createdAt,required" format:"date-time"` Name string `json:"name,required"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. UpdatedAt time.Time `json:"updatedAt,required" format:"date-time"` InviteDomains InviteDomains `json:"inviteDomains"` JSON organizationJSON `json:"-"` }
func (*Organization) UnmarshalJSON ¶
func (r *Organization) UnmarshalJSON(data []byte) (err error)
type OrganizationDeleteParams ¶
type OrganizationDeleteParams struct { // organization_id is the ID of the organization to delete OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"` }
func (OrganizationDeleteParams) MarshalJSON ¶
func (r OrganizationDeleteParams) MarshalJSON() (data []byte, err error)
type OrganizationDeleteResponse ¶
type OrganizationDeleteResponse = interface{}
type OrganizationDomainVerificationDeleteParams ¶
type OrganizationDomainVerificationDeleteParams struct {
DomainVerificationID param.Field[string] `json:"domainVerificationId,required" format:"uuid"`
}
func (OrganizationDomainVerificationDeleteParams) MarshalJSON ¶
func (r OrganizationDomainVerificationDeleteParams) MarshalJSON() (data []byte, err error)
type OrganizationDomainVerificationDeleteResponse ¶
type OrganizationDomainVerificationDeleteResponse = interface{}
type OrganizationDomainVerificationGetParams ¶
type OrganizationDomainVerificationGetParams struct {
DomainVerificationID param.Field[string] `json:"domainVerificationId,required" format:"uuid"`
}
func (OrganizationDomainVerificationGetParams) MarshalJSON ¶
func (r OrganizationDomainVerificationGetParams) MarshalJSON() (data []byte, err error)
type OrganizationDomainVerificationGetResponse ¶
type OrganizationDomainVerificationGetResponse struct { DomainVerification DomainVerification `json:"domainVerification,required"` JSON organizationDomainVerificationGetResponseJSON `json:"-"` }
func (*OrganizationDomainVerificationGetResponse) UnmarshalJSON ¶
func (r *OrganizationDomainVerificationGetResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationDomainVerificationListParams ¶
type OrganizationDomainVerificationListParams struct { OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"` Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` Pagination param.Field[OrganizationDomainVerificationListParamsPagination] `json:"pagination"` }
func (OrganizationDomainVerificationListParams) MarshalJSON ¶
func (r OrganizationDomainVerificationListParams) MarshalJSON() (data []byte, err error)
func (OrganizationDomainVerificationListParams) URLQuery ¶
func (r OrganizationDomainVerificationListParams) URLQuery() (v url.Values)
URLQuery serializes OrganizationDomainVerificationListParams's query parameters as `url.Values`.
type OrganizationDomainVerificationListParamsPagination ¶
type OrganizationDomainVerificationListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
func (OrganizationDomainVerificationListParamsPagination) MarshalJSON ¶
func (r OrganizationDomainVerificationListParamsPagination) MarshalJSON() (data []byte, err error)
type OrganizationDomainVerificationNewParams ¶
type OrganizationDomainVerificationNewParams struct { Domain param.Field[string] `json:"domain,required"` OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"` }
func (OrganizationDomainVerificationNewParams) MarshalJSON ¶
func (r OrganizationDomainVerificationNewParams) MarshalJSON() (data []byte, err error)
type OrganizationDomainVerificationNewResponse ¶
type OrganizationDomainVerificationNewResponse struct { DomainVerification DomainVerification `json:"domainVerification,required"` JSON organizationDomainVerificationNewResponseJSON `json:"-"` }
func (*OrganizationDomainVerificationNewResponse) UnmarshalJSON ¶
func (r *OrganizationDomainVerificationNewResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationDomainVerificationService ¶
type OrganizationDomainVerificationService struct {
Options []option.RequestOption
}
OrganizationDomainVerificationService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationDomainVerificationService method instead.
func NewOrganizationDomainVerificationService ¶
func NewOrganizationDomainVerificationService(opts ...option.RequestOption) (r *OrganizationDomainVerificationService)
NewOrganizationDomainVerificationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OrganizationDomainVerificationService) Delete ¶
func (r *OrganizationDomainVerificationService) Delete(ctx context.Context, body OrganizationDomainVerificationDeleteParams, opts ...option.RequestOption) (res *OrganizationDomainVerificationDeleteResponse, err error)
Removes a domain verification request.
Use this method to:
- Cancel pending verifications - Remove verified domains - Clean up unused domain records
### Examples
- Delete verification:
Removes a domain verification request. ```yaml domainVerificationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*OrganizationDomainVerificationService) Get ¶
func (r *OrganizationDomainVerificationService) Get(ctx context.Context, body OrganizationDomainVerificationGetParams, opts ...option.RequestOption) (res *OrganizationDomainVerificationGetResponse, err error)
Retrieves the status of a domain verification request.
Use this method to:
- Check verification progress - View verification requirements - Monitor domain status
### Examples
- Get verification status:
Checks the current state of a domain verification. ```yaml domainVerificationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*OrganizationDomainVerificationService) List ¶
func (r *OrganizationDomainVerificationService) List(ctx context.Context, params OrganizationDomainVerificationListParams, opts ...option.RequestOption) (res *pagination.DomainVerificationsPage[DomainVerification], err error)
Lists and monitors domain verification status across an organization.
Use this method to:
- Track verification progress - View all verified domains - Monitor pending verifications - Audit domain settings
### Examples
- List all verifications:
Shows all domain verifications regardless of status. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 ```
- List with pagination:
Retrieves next page of verifications. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 token: "next-page-token-from-previous-response" ```
func (*OrganizationDomainVerificationService) ListAutoPaging ¶
func (r *OrganizationDomainVerificationService) ListAutoPaging(ctx context.Context, params OrganizationDomainVerificationListParams, opts ...option.RequestOption) *pagination.DomainVerificationsPageAutoPager[DomainVerification]
Lists and monitors domain verification status across an organization.
Use this method to:
- Track verification progress - View all verified domains - Monitor pending verifications - Audit domain settings
### Examples
- List all verifications:
Shows all domain verifications regardless of status. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 ```
- List with pagination:
Retrieves next page of verifications. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 token: "next-page-token-from-previous-response" ```
func (*OrganizationDomainVerificationService) New ¶
func (r *OrganizationDomainVerificationService) New(ctx context.Context, body OrganizationDomainVerificationNewParams, opts ...option.RequestOption) (res *OrganizationDomainVerificationNewResponse, err error)
Initiates domain verification process to enable organization features.
Use this method to:
- Start domain ownership verification - Enable automatic team joining - Set up SSO restrictions - Configure email-based policies
### Examples
- Verify primary domain:
Starts verification for main company domain. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" domain: "acme-corp.com" ```
- Verify subsidiary domain:
Adds verification for additional company domain. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" domain: "acme-subsidiary.com" ```
func (*OrganizationDomainVerificationService) Verify ¶
func (r *OrganizationDomainVerificationService) Verify(ctx context.Context, body OrganizationDomainVerificationVerifyParams, opts ...option.RequestOption) (res *OrganizationDomainVerificationVerifyResponse, err error)
Verifies domain ownership for an organization.
Use this method to:
- Complete domain verification process - Enable domain-based features - Validate DNS configuration
### Examples
- Verify domain ownership:
Verifies ownership after DNS records are configured. ```yaml domainVerificationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
type OrganizationDomainVerificationVerifyParams ¶
type OrganizationDomainVerificationVerifyParams struct {
DomainVerificationID param.Field[string] `json:"domainVerificationId,required" format:"uuid"`
}
func (OrganizationDomainVerificationVerifyParams) MarshalJSON ¶
func (r OrganizationDomainVerificationVerifyParams) MarshalJSON() (data []byte, err error)
type OrganizationDomainVerificationVerifyResponse ¶
type OrganizationDomainVerificationVerifyResponse struct { DomainVerification DomainVerification `json:"domainVerification,required"` JSON organizationDomainVerificationVerifyResponseJSON `json:"-"` }
func (*OrganizationDomainVerificationVerifyResponse) UnmarshalJSON ¶
func (r *OrganizationDomainVerificationVerifyResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationGetParams ¶
type OrganizationGetParams struct { // organization_id is the unique identifier of the Organization to retreive. OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"` }
func (OrganizationGetParams) MarshalJSON ¶
func (r OrganizationGetParams) MarshalJSON() (data []byte, err error)
type OrganizationGetResponse ¶
type OrganizationGetResponse struct { // organization is the requested organization Organization Organization `json:"organization,required"` JSON organizationGetResponseJSON `json:"-"` }
func (*OrganizationGetResponse) UnmarshalJSON ¶
func (r *OrganizationGetResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationInvite ¶
type OrganizationInvite struct { // invite_id is the unique identifier of the invite to join the organization. Use // JoinOrganization with this ID to join the organization. InviteID string `json:"inviteId,required" format:"uuid"` JSON organizationInviteJSON `json:"-"` }
func (*OrganizationInvite) UnmarshalJSON ¶
func (r *OrganizationInvite) UnmarshalJSON(data []byte) (err error)
type OrganizationInviteGetParams ¶
type OrganizationInviteGetParams struct {
OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
}
func (OrganizationInviteGetParams) MarshalJSON ¶
func (r OrganizationInviteGetParams) MarshalJSON() (data []byte, err error)
type OrganizationInviteGetResponse ¶
type OrganizationInviteGetResponse struct { Invite OrganizationInvite `json:"invite,required"` JSON organizationInviteGetResponseJSON `json:"-"` }
func (*OrganizationInviteGetResponse) UnmarshalJSON ¶
func (r *OrganizationInviteGetResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationInviteGetSummaryParams ¶
type OrganizationInviteGetSummaryParams struct {
InviteID param.Field[string] `json:"inviteId,required" format:"uuid"`
}
func (OrganizationInviteGetSummaryParams) MarshalJSON ¶
func (r OrganizationInviteGetSummaryParams) MarshalJSON() (data []byte, err error)
type OrganizationInviteGetSummaryResponse ¶
type OrganizationInviteGetSummaryResponse struct { OrganizationID string `json:"organizationId,required" format:"uuid"` OrganizationMemberCount int64 `json:"organizationMemberCount"` OrganizationName string `json:"organizationName"` JSON organizationInviteGetSummaryResponseJSON `json:"-"` }
func (*OrganizationInviteGetSummaryResponse) UnmarshalJSON ¶
func (r *OrganizationInviteGetSummaryResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationInviteNewParams ¶
type OrganizationInviteNewParams struct {
OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
}
func (OrganizationInviteNewParams) MarshalJSON ¶
func (r OrganizationInviteNewParams) MarshalJSON() (data []byte, err error)
type OrganizationInviteNewResponse ¶
type OrganizationInviteNewResponse struct { Invite OrganizationInvite `json:"invite,required"` JSON organizationInviteNewResponseJSON `json:"-"` }
func (*OrganizationInviteNewResponse) UnmarshalJSON ¶
func (r *OrganizationInviteNewResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationInviteService ¶
type OrganizationInviteService struct {
Options []option.RequestOption
}
OrganizationInviteService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationInviteService method instead.
func NewOrganizationInviteService ¶
func NewOrganizationInviteService(opts ...option.RequestOption) (r *OrganizationInviteService)
NewOrganizationInviteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OrganizationInviteService) Get ¶
func (r *OrganizationInviteService) Get(ctx context.Context, body OrganizationInviteGetParams, opts ...option.RequestOption) (res *OrganizationInviteGetResponse, err error)
GetOrganizationInvite
func (*OrganizationInviteService) GetSummary ¶
func (r *OrganizationInviteService) GetSummary(ctx context.Context, body OrganizationInviteGetSummaryParams, opts ...option.RequestOption) (res *OrganizationInviteGetSummaryResponse, err error)
Retrieves organization details and membership info based on an invite link.
Use this method to:
- Preview organization details before joining - Validate invite link authenticity - Check organization size and activity - View team information before accepting
### Examples
- Get invite summary:
Retrieves organization information from an invite. ```yaml inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*OrganizationInviteService) New ¶
func (r *OrganizationInviteService) New(ctx context.Context, body OrganizationInviteNewParams, opts ...option.RequestOption) (res *OrganizationInviteNewResponse, err error)
Creates an invite link for joining an organization. Any existing OrganizationInvites are invalidated and can no longer be used.
Use this method to:
- Generate shareable invite links - Manage team growth - Control organization access
### Examples
- Create organization invite:
Generates a new invite link for the organization. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ```
type OrganizationJoinParams ¶
type OrganizationJoinParams struct { // invite_id is the unique identifier of the invite to join the organization. InviteID param.Field[string] `json:"inviteId" format:"uuid"` // organization_id is the unique identifier of the Organization to join. OrganizationID param.Field[string] `json:"organizationId" format:"uuid"` }
func (OrganizationJoinParams) MarshalJSON ¶
func (r OrganizationJoinParams) MarshalJSON() (data []byte, err error)
type OrganizationJoinResponse ¶
type OrganizationJoinResponse struct { // member is the member that was created by joining the organization. Member OrganizationMember `json:"member,required"` JSON organizationJoinResponseJSON `json:"-"` }
func (*OrganizationJoinResponse) UnmarshalJSON ¶
func (r *OrganizationJoinResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationLeaveParams ¶
type OrganizationLeaveParams struct {
UserID param.Field[string] `json:"userId,required" format:"uuid"`
}
func (OrganizationLeaveParams) MarshalJSON ¶
func (r OrganizationLeaveParams) MarshalJSON() (data []byte, err error)
type OrganizationLeaveResponse ¶
type OrganizationLeaveResponse = interface{}
type OrganizationListMembersParams ¶
type OrganizationListMembersParams struct { // organization_id is the ID of the organization to list members for OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"` Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` // pagination contains the pagination options for listing members Pagination param.Field[OrganizationListMembersParamsPagination] `json:"pagination"` }
func (OrganizationListMembersParams) MarshalJSON ¶
func (r OrganizationListMembersParams) MarshalJSON() (data []byte, err error)
func (OrganizationListMembersParams) URLQuery ¶
func (r OrganizationListMembersParams) URLQuery() (v url.Values)
URLQuery serializes OrganizationListMembersParams's query parameters as `url.Values`.
type OrganizationListMembersParamsPagination ¶
type OrganizationListMembersParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing members
func (OrganizationListMembersParamsPagination) MarshalJSON ¶
func (r OrganizationListMembersParamsPagination) MarshalJSON() (data []byte, err error)
type OrganizationListParams ¶
type OrganizationListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` // pagination contains the pagination options for listing organizations Pagination param.Field[OrganizationListParamsPagination] `json:"pagination"` // scope is the scope of the organizations to list Scope param.Field[Scope] `json:"scope"` }
func (OrganizationListParams) MarshalJSON ¶
func (r OrganizationListParams) MarshalJSON() (data []byte, err error)
func (OrganizationListParams) URLQuery ¶
func (r OrganizationListParams) URLQuery() (v url.Values)
URLQuery serializes OrganizationListParams's query parameters as `url.Values`.
type OrganizationListParamsPagination ¶
type OrganizationListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing organizations
func (OrganizationListParamsPagination) MarshalJSON ¶
func (r OrganizationListParamsPagination) MarshalJSON() (data []byte, err error)
type OrganizationMember ¶
type OrganizationMember struct { Email string `json:"email,required"` FullName string `json:"fullName,required"` // login_provider is the login provider the user uses to sign in LoginProvider string `json:"loginProvider,required"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. MemberSince time.Time `json:"memberSince,required" format:"date-time"` Role shared.OrganizationRole `json:"role,required"` Status shared.UserStatus `json:"status,required"` UserID string `json:"userId,required" format:"uuid"` AvatarURL string `json:"avatarUrl"` JSON organizationMemberJSON `json:"-"` }
func (*OrganizationMember) UnmarshalJSON ¶
func (r *OrganizationMember) UnmarshalJSON(data []byte) (err error)
type OrganizationNewParams ¶
type OrganizationNewParams struct { // name is the organization name Name param.Field[string] `json:"name,required"` // Should other Accounts with the same domain be automatically invited to the // organization? InviteAccountsWithMatchingDomain param.Field[bool] `json:"inviteAccountsWithMatchingDomain"` // join_organization decides whether the Identity issuing this request joins the // org on creation JoinOrganization param.Field[bool] `json:"joinOrganization"` }
func (OrganizationNewParams) MarshalJSON ¶
func (r OrganizationNewParams) MarshalJSON() (data []byte, err error)
type OrganizationNewResponse ¶
type OrganizationNewResponse struct { // organization is the created organization Organization Organization `json:"organization,required"` // member is the member that joined the org on creation. Only set if specified // "join_organization" is "true" in the request. Member OrganizationMember `json:"member"` JSON organizationNewResponseJSON `json:"-"` }
func (*OrganizationNewResponse) UnmarshalJSON ¶
func (r *OrganizationNewResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationRole ¶
type OrganizationRole = shared.OrganizationRole
This is an alias to an internal type.
type OrganizationSSOConfigurationDeleteParams ¶
type OrganizationSSOConfigurationDeleteParams struct {
SSOConfigurationID param.Field[string] `json:"ssoConfigurationId,required" format:"uuid"`
}
func (OrganizationSSOConfigurationDeleteParams) MarshalJSON ¶
func (r OrganizationSSOConfigurationDeleteParams) MarshalJSON() (data []byte, err error)
type OrganizationSSOConfigurationDeleteResponse ¶
type OrganizationSSOConfigurationDeleteResponse = interface{}
type OrganizationSSOConfigurationGetParams ¶
type OrganizationSSOConfigurationGetParams struct { // sso_configuration_id is the ID of the SSO configuration to get SSOConfigurationID param.Field[string] `json:"ssoConfigurationId,required" format:"uuid"` }
func (OrganizationSSOConfigurationGetParams) MarshalJSON ¶
func (r OrganizationSSOConfigurationGetParams) MarshalJSON() (data []byte, err error)
type OrganizationSSOConfigurationGetResponse ¶
type OrganizationSSOConfigurationGetResponse struct { // sso_configuration is the SSO configuration identified by the ID SSOConfiguration SSOConfiguration `json:"ssoConfiguration,required"` JSON organizationSSOConfigurationGetResponseJSON `json:"-"` }
func (*OrganizationSSOConfigurationGetResponse) UnmarshalJSON ¶
func (r *OrganizationSSOConfigurationGetResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationSSOConfigurationListParams ¶
type OrganizationSSOConfigurationListParams struct { // organization_id is the ID of the organization to list SSO configurations for. OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"` Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` Pagination param.Field[OrganizationSSOConfigurationListParamsPagination] `json:"pagination"` }
func (OrganizationSSOConfigurationListParams) MarshalJSON ¶
func (r OrganizationSSOConfigurationListParams) MarshalJSON() (data []byte, err error)
func (OrganizationSSOConfigurationListParams) URLQuery ¶
func (r OrganizationSSOConfigurationListParams) URLQuery() (v url.Values)
URLQuery serializes OrganizationSSOConfigurationListParams's query parameters as `url.Values`.
type OrganizationSSOConfigurationListParamsPagination ¶
type OrganizationSSOConfigurationListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
func (OrganizationSSOConfigurationListParamsPagination) MarshalJSON ¶
func (r OrganizationSSOConfigurationListParamsPagination) MarshalJSON() (data []byte, err error)
type OrganizationSSOConfigurationNewParams ¶
type OrganizationSSOConfigurationNewParams struct { // client_id is the client ID of the OIDC application set on the IdP ClientID param.Field[string] `json:"clientId,required"` // client_secret is the client secret of the OIDC application set on the IdP ClientSecret param.Field[string] `json:"clientSecret,required"` // email_domain is the domain that is allowed to sign in to the organization EmailDomain param.Field[string] `json:"emailDomain,required"` // issuer_url is the URL of the IdP issuer IssuerURL param.Field[string] `json:"issuerUrl,required" format:"uri"` OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"` }
func (OrganizationSSOConfigurationNewParams) MarshalJSON ¶
func (r OrganizationSSOConfigurationNewParams) MarshalJSON() (data []byte, err error)
type OrganizationSSOConfigurationNewResponse ¶
type OrganizationSSOConfigurationNewResponse struct { // sso_configuration is the created SSO configuration SSOConfiguration SSOConfiguration `json:"ssoConfiguration,required"` JSON organizationSSOConfigurationNewResponseJSON `json:"-"` }
func (*OrganizationSSOConfigurationNewResponse) UnmarshalJSON ¶
func (r *OrganizationSSOConfigurationNewResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationSSOConfigurationService ¶
type OrganizationSSOConfigurationService struct {
Options []option.RequestOption
}
OrganizationSSOConfigurationService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationSSOConfigurationService method instead.
func NewOrganizationSSOConfigurationService ¶
func NewOrganizationSSOConfigurationService(opts ...option.RequestOption) (r *OrganizationSSOConfigurationService)
NewOrganizationSSOConfigurationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OrganizationSSOConfigurationService) Delete ¶
func (r *OrganizationSSOConfigurationService) Delete(ctx context.Context, body OrganizationSSOConfigurationDeleteParams, opts ...option.RequestOption) (res *OrganizationSSOConfigurationDeleteResponse, err error)
Removes an SSO configuration from an organization.
Use this method to:
- Disable SSO authentication - Remove outdated providers - Clean up unused configurations
### Examples
- Delete SSO configuration:
Removes a specific SSO configuration. ```yaml ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*OrganizationSSOConfigurationService) Get ¶
func (r *OrganizationSSOConfigurationService) Get(ctx context.Context, body OrganizationSSOConfigurationGetParams, opts ...option.RequestOption) (res *OrganizationSSOConfigurationGetResponse, err error)
Retrieves a specific SSO configuration.
Use this method to:
- View SSO provider details - Check configuration status - Verify SSO settings
### Examples
- Get SSO configuration:
Retrieves details of a specific SSO configuration. ```yaml ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*OrganizationSSOConfigurationService) List ¶
func (r *OrganizationSSOConfigurationService) List(ctx context.Context, params OrganizationSSOConfigurationListParams, opts ...option.RequestOption) (res *pagination.SSOConfigurationsPage[SSOConfiguration], err error)
Lists and filters SSO configurations for an organization.
Use this method to:
- View all SSO providers - Monitor authentication status - Audit security settings - Manage provider configurations
### Examples
- List active configurations:
Shows all active SSO providers. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 ```
- List by provider type:
Shows custom SSO configurations. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 token: "next-page-token-from-previous-response" ```
func (*OrganizationSSOConfigurationService) ListAutoPaging ¶
func (r *OrganizationSSOConfigurationService) ListAutoPaging(ctx context.Context, params OrganizationSSOConfigurationListParams, opts ...option.RequestOption) *pagination.SSOConfigurationsPageAutoPager[SSOConfiguration]
Lists and filters SSO configurations for an organization.
Use this method to:
- View all SSO providers - Monitor authentication status - Audit security settings - Manage provider configurations
### Examples
- List active configurations:
Shows all active SSO providers. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 ```
- List by provider type:
Shows custom SSO configurations. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 token: "next-page-token-from-previous-response" ```
func (*OrganizationSSOConfigurationService) New ¶
func (r *OrganizationSSOConfigurationService) New(ctx context.Context, body OrganizationSSOConfigurationNewParams, opts ...option.RequestOption) (res *OrganizationSSOConfigurationNewResponse, err error)
Creates or updates SSO configuration for organizational authentication.
Use this method to:
- Configure OIDC-based SSO providers - Set up built-in providers (Google, GitHub, etc.) - Define custom identity providers - Manage authentication policies
### Examples
- Configure built-in Google SSO:
Sets up SSO using Google Workspace. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" clientId: "012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com" clientSecret: "GOCSPX-abcdefghijklmnopqrstuvwxyz123456" issuerUrl: "https://accounts.google.com" emailDomain: "acme-corp.com" ```
- Configure custom OIDC provider:
Sets up SSO with a custom identity provider. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" clientId: "acme-corp-gitpod" clientSecret: "secret-token-value" issuerUrl: "https://sso.acme-corp.com" emailDomain: "acme-corp.com" ```
func (*OrganizationSSOConfigurationService) Update ¶
func (r *OrganizationSSOConfigurationService) Update(ctx context.Context, body OrganizationSSOConfigurationUpdateParams, opts ...option.RequestOption) (res *OrganizationSSOConfigurationUpdateResponse, err error)
Updates SSO provider settings and authentication rules.
Use this method to:
- Rotate client credentials - Update provider endpoints - Modify claim mappings - Change authentication policies - Toggle SSO enforcement
### Examples
- Update credentials:
Rotates client ID and secret. ```yaml ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" clientId: "new-client-id" clientSecret: "new-client-secret" ```
- Update provider status:
Activates or deactivates SSO provider. ```yaml ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" state: SSO_CONFIGURATION_STATE_ACTIVE ```
type OrganizationSSOConfigurationUpdateParams ¶
type OrganizationSSOConfigurationUpdateParams struct { // sso_configuration_id is the ID of the SSO configuration to update SSOConfigurationID param.Field[string] `json:"ssoConfigurationId,required" format:"uuid"` // claims are key/value pairs that defines a mapping of claims issued by the IdP. Claims param.Field[map[string]string] `json:"claims"` // client_id is the client ID of the SSO provider ClientID param.Field[string] `json:"clientId"` // client_secret is the client secret of the SSO provider ClientSecret param.Field[string] `json:"clientSecret"` EmailDomain param.Field[string] `json:"emailDomain"` // issuer_url is the URL of the IdP issuer IssuerURL param.Field[string] `json:"issuerUrl" format:"uri"` // state is the state of the SSO configuration State param.Field[SSOConfigurationState] `json:"state"` }
func (OrganizationSSOConfigurationUpdateParams) MarshalJSON ¶
func (r OrganizationSSOConfigurationUpdateParams) MarshalJSON() (data []byte, err error)
type OrganizationSSOConfigurationUpdateResponse ¶
type OrganizationSSOConfigurationUpdateResponse = interface{}
type OrganizationService ¶
type OrganizationService struct { Options []option.RequestOption DomainVerifications *OrganizationDomainVerificationService Invites *OrganizationInviteService SSOConfigurations *OrganizationSSOConfigurationService }
OrganizationService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationService method instead.
func NewOrganizationService ¶
func NewOrganizationService(opts ...option.RequestOption) (r *OrganizationService)
NewOrganizationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OrganizationService) Delete ¶
func (r *OrganizationService) Delete(ctx context.Context, body OrganizationDeleteParams, opts ...option.RequestOption) (res *OrganizationDeleteResponse, err error)
Permanently deletes an organization.
Use this method to:
- Remove unused organizations - Clean up test organizations - Complete organization migration
### Examples
- Delete organization:
Permanently removes an organization and all its data. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ```
func (*OrganizationService) Get ¶
func (r *OrganizationService) Get(ctx context.Context, body OrganizationGetParams, opts ...option.RequestOption) (res *OrganizationGetResponse, err error)
Gets details about a specific organization.
Use this method to:
- Retrieve organization settings and configuration - Check organization membership status - View domain verification settings
### Examples
- Get organization details:
Retrieves information about a specific organization. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ```
func (*OrganizationService) Join ¶
func (r *OrganizationService) Join(ctx context.Context, body OrganizationJoinParams, opts ...option.RequestOption) (res *OrganizationJoinResponse, err error)
Allows users to join an organization through direct ID, invite link, or domain-based auto-join.
Use this method to:
- Join an organization via direct ID or invite - Join automatically based on email domain - Accept organization invitations
### Examples
- Join via organization ID:
Joins an organization directly when you have the ID. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ```
- Join via invite:
Accepts an organization invitation link. ```yaml inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*OrganizationService) Leave ¶
func (r *OrganizationService) Leave(ctx context.Context, body OrganizationLeaveParams, opts ...option.RequestOption) (res *OrganizationLeaveResponse, err error)
Removes a user from an organization while preserving organization data.
Use this method to:
- Remove yourself from an organization - Clean up inactive memberships - Transfer project ownership before leaving - Manage team transitions
### Examples
- Leave organization:
Removes user from organization membership. ```yaml userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" ```
Note: Ensure all projects and resources are transferred before leaving.
func (*OrganizationService) List ¶
func (r *OrganizationService) List(ctx context.Context, params OrganizationListParams, opts ...option.RequestOption) (res *pagination.OrganizationsPage[Organization], err error)
Lists all organizations the caller has access to with optional filtering.
Use this method to:
- View organizations you're a member of - Browse all available organizations - Paginate through organization results
### Examples
- List member organizations:
Shows organizations where the caller is a member. ```yaml pagination: pageSize: 20 scope: SCOPE_MEMBER ```
- List all organizations:
Shows all organizations visible to the caller. ```yaml pagination: pageSize: 50 scope: SCOPE_ALL ```
func (*OrganizationService) ListAutoPaging ¶
func (r *OrganizationService) ListAutoPaging(ctx context.Context, params OrganizationListParams, opts ...option.RequestOption) *pagination.OrganizationsPageAutoPager[Organization]
Lists all organizations the caller has access to with optional filtering.
Use this method to:
- View organizations you're a member of - Browse all available organizations - Paginate through organization results
### Examples
- List member organizations:
Shows organizations where the caller is a member. ```yaml pagination: pageSize: 20 scope: SCOPE_MEMBER ```
- List all organizations:
Shows all organizations visible to the caller. ```yaml pagination: pageSize: 50 scope: SCOPE_ALL ```
func (*OrganizationService) ListMembers ¶
func (r *OrganizationService) ListMembers(ctx context.Context, params OrganizationListMembersParams, opts ...option.RequestOption) (res *pagination.MembersPage[OrganizationMember], err error)
Lists and filters organization members with optional pagination.
Use this method to:
- View all organization members - Monitor member activity - Manage team membership
### Examples
- List active members:
Retrieves active members with pagination. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 ```
- List with pagination:
Retrieves next page of members. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 50 token: "next-page-token-from-previous-response" ```
func (*OrganizationService) ListMembersAutoPaging ¶
func (r *OrganizationService) ListMembersAutoPaging(ctx context.Context, params OrganizationListMembersParams, opts ...option.RequestOption) *pagination.MembersPageAutoPager[OrganizationMember]
Lists and filters organization members with optional pagination.
Use this method to:
- View all organization members - Monitor member activity - Manage team membership
### Examples
- List active members:
Retrieves active members with pagination. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 ```
- List with pagination:
Retrieves next page of members. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 50 token: "next-page-token-from-previous-response" ```
func (*OrganizationService) New ¶
func (r *OrganizationService) New(ctx context.Context, body OrganizationNewParams, opts ...option.RequestOption) (res *OrganizationNewResponse, err error)
Creates a new organization with the specified name and settings.
Use this method to:
- Create a new organization for team collaboration - Set up automatic domain-based invites for team members - Join the organization immediately upon creation
### Examples
- Create a basic organization:
Creates an organization with just a name. ```yaml name: "Acme Corp Engineering" joinOrganization: true ```
- Create with domain-based invites:
Creates an organization that automatically invites users with matching email domains. ```yaml name: "Acme Corp" joinOrganization: true inviteAccountsWithMatchingDomain: true ```
func (*OrganizationService) SetRole ¶
func (r *OrganizationService) SetRole(ctx context.Context, body OrganizationSetRoleParams, opts ...option.RequestOption) (res *OrganizationSetRoleResponse, err error)
Manages organization membership and roles by setting a user's role within the organization.
Use this method to:
- Promote members to admin role - Change member permissions - Demote admins to regular members
### Examples
- Promote to admin:
Makes a user an organization administrator. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" role: ORGANIZATION_ROLE_ADMIN ```
- Change to member:
Changes a user's role to regular member. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" role: ORGANIZATION_ROLE_MEMBER ```
func (*OrganizationService) Update ¶
func (r *OrganizationService) Update(ctx context.Context, body OrganizationUpdateParams, opts ...option.RequestOption) (res *OrganizationUpdateResponse, err error)
Updates an organization's settings including name, invite domains, and member policies.
Use this method to:
- Modify organization display name - Configure email domain restrictions - Update organization-wide settings - Manage member access policies
### Examples
- Update basic settings:
Changes organization name and invite domains. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" name: "New Company Name" inviteDomains: domains: - "company.com" - "subsidiary.com" ```
- Remove domain restrictions:
Clears all domain-based invite restrictions. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" inviteDomains: domains: [] ```
type OrganizationSetRoleParams ¶
type OrganizationSetRoleParams struct { OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"` UserID param.Field[string] `json:"userId,required" format:"uuid"` Role param.Field[shared.OrganizationRole] `json:"role"` }
func (OrganizationSetRoleParams) MarshalJSON ¶
func (r OrganizationSetRoleParams) MarshalJSON() (data []byte, err error)
type OrganizationSetRoleResponse ¶
type OrganizationSetRoleResponse = interface{}
type OrganizationUpdateParams ¶
type OrganizationUpdateParams struct { // organization_id is the ID of the organization to update the settings for. OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"` // invite_domains is the domain allowlist of the organization InviteDomains param.Field[InviteDomainsParam] `json:"inviteDomains"` // name is the new name of the organization Name param.Field[string] `json:"name"` }
func (OrganizationUpdateParams) MarshalJSON ¶
func (r OrganizationUpdateParams) MarshalJSON() (data []byte, err error)
type OrganizationUpdateResponse ¶
type OrganizationUpdateResponse struct { // organization is the updated organization Organization Organization `json:"organization,required"` JSON organizationUpdateResponseJSON `json:"-"` }
func (*OrganizationUpdateResponse) UnmarshalJSON ¶
func (r *OrganizationUpdateResponse) UnmarshalJSON(data []byte) (err error)
type PersonalAccessToken ¶
type PersonalAccessToken struct { ID string `json:"id" format:"uuid"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. CreatedAt time.Time `json:"createdAt" format:"date-time"` Creator shared.Subject `json:"creator"` Description string `json:"description"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. ExpiresAt time.Time `json:"expiresAt" format:"date-time"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. LastUsed time.Time `json:"lastUsed" format:"date-time"` UserID string `json:"userId" format:"uuid"` JSON personalAccessTokenJSON `json:"-"` }
func (*PersonalAccessToken) UnmarshalJSON ¶
func (r *PersonalAccessToken) UnmarshalJSON(data []byte) (err error)
type Project ¶
type Project struct { EnvironmentClass ProjectEnvironmentClass `json:"environmentClass,required"` // id is the unique identifier for the project ID string `json:"id" format:"uuid"` // automations_file_path is the path to the automations file relative to the repo // root AutomationsFilePath string `json:"automationsFilePath"` // devcontainer_file_path is the path to the devcontainer file relative to the repo // root DevcontainerFilePath string `json:"devcontainerFilePath"` // initializer is the content initializer Initializer EnvironmentInitializer `json:"initializer"` Metadata ProjectMetadata `json:"metadata"` UsedBy ProjectUsedBy `json:"usedBy"` JSON projectJSON `json:"-"` }
func (*Project) UnmarshalJSON ¶
type ProjectDeleteParams ¶
type ProjectDeleteParams struct { // project_id specifies the project identifier ProjectID param.Field[string] `json:"projectId" format:"uuid"` }
func (ProjectDeleteParams) MarshalJSON ¶
func (r ProjectDeleteParams) MarshalJSON() (data []byte, err error)
type ProjectDeleteResponse ¶
type ProjectDeleteResponse = interface{}
type ProjectEnvironmentClass ¶
type ProjectEnvironmentClass struct { // Use a fixed environment class on a given Runner. This cannot be a local runner's // environment class. EnvironmentClassID string `json:"environmentClassId" format:"uuid"` // Use a local runner for the user LocalRunner bool `json:"localRunner"` JSON projectEnvironmentClassJSON `json:"-"` }
func (*ProjectEnvironmentClass) UnmarshalJSON ¶
func (r *ProjectEnvironmentClass) UnmarshalJSON(data []byte) (err error)
type ProjectEnvironmentClassParam ¶
type ProjectEnvironmentClassParam struct { // Use a fixed environment class on a given Runner. This cannot be a local runner's // environment class. EnvironmentClassID param.Field[string] `json:"environmentClassId" format:"uuid"` // Use a local runner for the user LocalRunner param.Field[bool] `json:"localRunner"` }
func (ProjectEnvironmentClassParam) MarshalJSON ¶
func (r ProjectEnvironmentClassParam) MarshalJSON() (data []byte, err error)
type ProjectGetParams ¶
type ProjectGetParams struct { // project_id specifies the project identifier ProjectID param.Field[string] `json:"projectId" format:"uuid"` }
func (ProjectGetParams) MarshalJSON ¶
func (r ProjectGetParams) MarshalJSON() (data []byte, err error)
type ProjectGetResponse ¶
type ProjectGetResponse struct { Project Project `json:"project"` JSON projectGetResponseJSON `json:"-"` }
func (*ProjectGetResponse) UnmarshalJSON ¶
func (r *ProjectGetResponse) UnmarshalJSON(data []byte) (err error)
type ProjectListParams ¶
type ProjectListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` // pagination contains the pagination options for listing organizations Pagination param.Field[ProjectListParamsPagination] `json:"pagination"` }
func (ProjectListParams) MarshalJSON ¶
func (r ProjectListParams) MarshalJSON() (data []byte, err error)
func (ProjectListParams) URLQuery ¶
func (r ProjectListParams) URLQuery() (v url.Values)
URLQuery serializes ProjectListParams's query parameters as `url.Values`.
type ProjectListParamsPagination ¶
type ProjectListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing organizations
func (ProjectListParamsPagination) MarshalJSON ¶
func (r ProjectListParamsPagination) MarshalJSON() (data []byte, err error)
type ProjectMetadata ¶
type ProjectMetadata struct { // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. CreatedAt time.Time `json:"createdAt" format:"date-time"` // creator is the identity of the project creator Creator shared.Subject `json:"creator"` // name is the human readable name of the project Name string `json:"name"` // organization_id is the ID of the organization that contains the environment OrganizationID string `json:"organizationId" format:"uuid"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. UpdatedAt time.Time `json:"updatedAt" format:"date-time"` JSON projectMetadataJSON `json:"-"` }
func (*ProjectMetadata) UnmarshalJSON ¶
func (r *ProjectMetadata) UnmarshalJSON(data []byte) (err error)
type ProjectNewFromEnvironmentParams ¶
type ProjectNewFromEnvironmentParams struct { // environment_id specifies the environment identifier EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"` Name param.Field[string] `json:"name"` }
func (ProjectNewFromEnvironmentParams) MarshalJSON ¶
func (r ProjectNewFromEnvironmentParams) MarshalJSON() (data []byte, err error)
type ProjectNewFromEnvironmentResponse ¶
type ProjectNewFromEnvironmentResponse struct { Project Project `json:"project"` JSON projectNewFromEnvironmentResponseJSON `json:"-"` }
func (*ProjectNewFromEnvironmentResponse) UnmarshalJSON ¶
func (r *ProjectNewFromEnvironmentResponse) UnmarshalJSON(data []byte) (err error)
type ProjectNewParams ¶
type ProjectNewParams struct { EnvironmentClass param.Field[ProjectEnvironmentClassParam] `json:"environmentClass,required"` // initializer is the content initializer Initializer param.Field[EnvironmentInitializerParam] `json:"initializer,required"` // automations_file_path is the path to the automations file relative to the repo // root path must not be absolute (start with a /): // // “` // this.matches('^$|^[^/].*') // “` AutomationsFilePath param.Field[string] `json:"automationsFilePath"` // devcontainer_file_path is the path to the devcontainer file relative to the repo // root path must not be absolute (start with a /): // // “` // this.matches('^$|^[^/].*') // “` DevcontainerFilePath param.Field[string] `json:"devcontainerFilePath"` Name param.Field[string] `json:"name"` }
func (ProjectNewParams) MarshalJSON ¶
func (r ProjectNewParams) MarshalJSON() (data []byte, err error)
type ProjectNewResponse ¶
type ProjectNewResponse struct { Project Project `json:"project"` JSON projectNewResponseJSON `json:"-"` }
func (*ProjectNewResponse) UnmarshalJSON ¶
func (r *ProjectNewResponse) UnmarshalJSON(data []byte) (err error)
type ProjectPolicy ¶
type ProjectPolicy struct { GroupID string `json:"groupId" format:"uuid"` // role is the role assigned to the group Role ProjectRole `json:"role"` JSON projectPolicyJSON `json:"-"` }
func (*ProjectPolicy) UnmarshalJSON ¶
func (r *ProjectPolicy) UnmarshalJSON(data []byte) (err error)
type ProjectPolicyDeleteParams ¶
type ProjectPolicyDeleteParams struct { // group_id specifies the group_id identifier GroupID param.Field[string] `json:"groupId" format:"uuid"` // project_id specifies the project identifier ProjectID param.Field[string] `json:"projectId" format:"uuid"` }
func (ProjectPolicyDeleteParams) MarshalJSON ¶
func (r ProjectPolicyDeleteParams) MarshalJSON() (data []byte, err error)
type ProjectPolicyDeleteResponse ¶
type ProjectPolicyDeleteResponse = interface{}
type ProjectPolicyListParams ¶
type ProjectPolicyListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` // pagination contains the pagination options for listing project policies Pagination param.Field[ProjectPolicyListParamsPagination] `json:"pagination"` // project_id specifies the project identifier ProjectID param.Field[string] `json:"projectId" format:"uuid"` }
func (ProjectPolicyListParams) MarshalJSON ¶
func (r ProjectPolicyListParams) MarshalJSON() (data []byte, err error)
func (ProjectPolicyListParams) URLQuery ¶
func (r ProjectPolicyListParams) URLQuery() (v url.Values)
URLQuery serializes ProjectPolicyListParams's query parameters as `url.Values`.
type ProjectPolicyListParamsPagination ¶
type ProjectPolicyListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing project policies
func (ProjectPolicyListParamsPagination) MarshalJSON ¶
func (r ProjectPolicyListParamsPagination) MarshalJSON() (data []byte, err error)
type ProjectPolicyNewParams ¶
type ProjectPolicyNewParams struct { // group_id specifies the group_id identifier GroupID param.Field[string] `json:"groupId" format:"uuid"` // project_id specifies the project identifier ProjectID param.Field[string] `json:"projectId" format:"uuid"` Role param.Field[ProjectRole] `json:"role"` }
func (ProjectPolicyNewParams) MarshalJSON ¶
func (r ProjectPolicyNewParams) MarshalJSON() (data []byte, err error)
type ProjectPolicyNewResponse ¶
type ProjectPolicyNewResponse struct { Policy ProjectPolicy `json:"policy"` JSON projectPolicyNewResponseJSON `json:"-"` }
func (*ProjectPolicyNewResponse) UnmarshalJSON ¶
func (r *ProjectPolicyNewResponse) UnmarshalJSON(data []byte) (err error)
type ProjectPolicyService ¶
type ProjectPolicyService struct {
Options []option.RequestOption
}
ProjectPolicyService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProjectPolicyService method instead.
func NewProjectPolicyService ¶
func NewProjectPolicyService(opts ...option.RequestOption) (r *ProjectPolicyService)
NewProjectPolicyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ProjectPolicyService) Delete ¶
func (r *ProjectPolicyService) Delete(ctx context.Context, body ProjectPolicyDeleteParams, opts ...option.RequestOption) (res *ProjectPolicyDeleteResponse, err error)
Deletes a project policy.
Use this method to:
- Remove access controls - Revoke permissions - Clean up policies
### Examples
- Delete policy:
Removes a group's access policy. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60" ```
func (*ProjectPolicyService) List ¶
func (r *ProjectPolicyService) List(ctx context.Context, params ProjectPolicyListParams, opts ...option.RequestOption) (res *pagination.PoliciesPage[ProjectPolicy], err error)
Lists policies for a project.
Use this method to:
- View access controls - Check policy configurations - Audit permissions
### Examples
- List policies:
Shows all policies for a project. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 ```
func (*ProjectPolicyService) ListAutoPaging ¶
func (r *ProjectPolicyService) ListAutoPaging(ctx context.Context, params ProjectPolicyListParams, opts ...option.RequestOption) *pagination.PoliciesPageAutoPager[ProjectPolicy]
Lists policies for a project.
Use this method to:
- View access controls - Check policy configurations - Audit permissions
### Examples
- List policies:
Shows all policies for a project. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 ```
func (*ProjectPolicyService) New ¶
func (r *ProjectPolicyService) New(ctx context.Context, body ProjectPolicyNewParams, opts ...option.RequestOption) (res *ProjectPolicyNewResponse, err error)
Creates a new policy for a project.
Use this method to:
- Set up access controls - Define group permissions - Configure role-based access
### Examples
- Create admin policy:
Grants admin access to a group. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60" role: PROJECT_ROLE_ADMIN ```
func (*ProjectPolicyService) Update ¶
func (r *ProjectPolicyService) Update(ctx context.Context, body ProjectPolicyUpdateParams, opts ...option.RequestOption) (res *ProjectPolicyUpdateResponse, err error)
Updates an existing project policy.
Use this method to:
- Modify access levels - Change group roles - Update permissions
### Examples
- Update policy role:
Changes a group's access level. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60" role: PROJECT_ROLE_EDITOR ```
type ProjectPolicyUpdateParams ¶
type ProjectPolicyUpdateParams struct { // group_id specifies the group_id identifier GroupID param.Field[string] `json:"groupId" format:"uuid"` // project_id specifies the project identifier ProjectID param.Field[string] `json:"projectId" format:"uuid"` Role param.Field[ProjectRole] `json:"role"` }
func (ProjectPolicyUpdateParams) MarshalJSON ¶
func (r ProjectPolicyUpdateParams) MarshalJSON() (data []byte, err error)
type ProjectPolicyUpdateResponse ¶
type ProjectPolicyUpdateResponse struct { Policy ProjectPolicy `json:"policy"` JSON projectPolicyUpdateResponseJSON `json:"-"` }
func (*ProjectPolicyUpdateResponse) UnmarshalJSON ¶
func (r *ProjectPolicyUpdateResponse) UnmarshalJSON(data []byte) (err error)
type ProjectRole ¶
type ProjectRole string
const ( ProjectRoleUnspecified ProjectRole = "PROJECT_ROLE_UNSPECIFIED" ProjectRoleAdmin ProjectRole = "PROJECT_ROLE_ADMIN" ProjectRoleUser ProjectRole = "PROJECT_ROLE_USER" ProjectRoleEditor ProjectRole = "PROJECT_ROLE_EDITOR" )
func (ProjectRole) IsKnown ¶
func (r ProjectRole) IsKnown() bool
type ProjectService ¶
type ProjectService struct { Options []option.RequestOption Policies *ProjectPolicyService }
ProjectService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProjectService method instead.
func NewProjectService ¶
func NewProjectService(opts ...option.RequestOption) (r *ProjectService)
NewProjectService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ProjectService) Delete ¶
func (r *ProjectService) Delete(ctx context.Context, body ProjectDeleteParams, opts ...option.RequestOption) (res *ProjectDeleteResponse, err error)
Deletes a project permanently.
Use this method to:
- Remove unused projects - Clean up test projects - Delete obsolete configurations
### Examples
- Delete project:
Permanently removes a project. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ```
func (*ProjectService) Get ¶
func (r *ProjectService) Get(ctx context.Context, body ProjectGetParams, opts ...option.RequestOption) (res *ProjectGetResponse, err error)
Gets details about a specific project.
Use this method to:
- View project configuration - Check project status - Get project metadata
### Examples
- Get project details:
Retrieves information about a specific project. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ```
func (*ProjectService) List ¶
func (r *ProjectService) List(ctx context.Context, params ProjectListParams, opts ...option.RequestOption) (res *pagination.ProjectsPage[Project], err error)
Lists projects with optional filtering.
Use this method to:
- View all accessible projects - Browse project configurations - Monitor project status
### Examples
- List projects:
Shows all projects with pagination. ```yaml pagination: pageSize: 20 ```
func (*ProjectService) ListAutoPaging ¶
func (r *ProjectService) ListAutoPaging(ctx context.Context, params ProjectListParams, opts ...option.RequestOption) *pagination.ProjectsPageAutoPager[Project]
Lists projects with optional filtering.
Use this method to:
- View all accessible projects - Browse project configurations - Monitor project status
### Examples
- List projects:
Shows all projects with pagination. ```yaml pagination: pageSize: 20 ```
func (*ProjectService) New ¶
func (r *ProjectService) New(ctx context.Context, body ProjectNewParams, opts ...option.RequestOption) (res *ProjectNewResponse, err error)
Creates a new project with specified configuration.
Use this method to:
- Set up development projects - Configure project environments - Define project settings - Initialize project content
### Examples
- Create basic project:
Creates a project with minimal configuration. ```yaml name: "Web Application" environmentClass: environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" initializer: specs: - git: remoteUri: "https://github.com/org/repo" ```
- Create project with devcontainer:
Creates a project with custom development container. ```yaml name: "Backend Service" environmentClass: environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" initializer: specs: - git: remoteUri: "https://github.com/org/backend" devcontainerFilePath: ".devcontainer/devcontainer.json" automationsFilePath: ".gitpod/automations.yaml" ```
func (*ProjectService) NewFromEnvironment ¶
func (r *ProjectService) NewFromEnvironment(ctx context.Context, body ProjectNewFromEnvironmentParams, opts ...option.RequestOption) (res *ProjectNewFromEnvironmentResponse, err error)
Creates a new project using an existing environment as a template.
Use this method to:
- Clone environment configurations - Create projects from templates - Share environment setups
### Examples
- Create from environment:
Creates a project based on existing environment. ```yaml name: "Frontend Project" environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" ```
func (*ProjectService) Update ¶
func (r *ProjectService) Update(ctx context.Context, body ProjectUpdateParams, opts ...option.RequestOption) (res *ProjectUpdateResponse, err error)
Updates a project's configuration.
Use this method to:
- Modify project settings - Update environment class - Change project name - Configure initializers
### Examples
- Update project name:
Changes the project's display name. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" name: "New Project Name" ```
- Update environment class:
Changes the project's environment class. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" environmentClass: environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
type ProjectUpdateParams ¶
type ProjectUpdateParams struct { // automations_file_path is the path to the automations file relative to the repo // root path must not be absolute (start with a /): // // “` // this.matches('^$|^[^/].*') // “` AutomationsFilePath param.Field[string] `json:"automationsFilePath"` // devcontainer_file_path is the path to the devcontainer file relative to the repo // root path must not be absolute (start with a /): // // “` // this.matches('^$|^[^/].*') // “` DevcontainerFilePath param.Field[string] `json:"devcontainerFilePath"` EnvironmentClass param.Field[ProjectEnvironmentClassParam] `json:"environmentClass"` // initializer is the content initializer Initializer param.Field[EnvironmentInitializerParam] `json:"initializer"` Name param.Field[string] `json:"name"` // project_id specifies the project identifier ProjectID param.Field[string] `json:"projectId" format:"uuid"` }
func (ProjectUpdateParams) MarshalJSON ¶
func (r ProjectUpdateParams) MarshalJSON() (data []byte, err error)
type ProjectUpdateResponse ¶
type ProjectUpdateResponse struct { Project Project `json:"project"` JSON projectUpdateResponseJSON `json:"-"` }
func (*ProjectUpdateResponse) UnmarshalJSON ¶
func (r *ProjectUpdateResponse) UnmarshalJSON(data []byte) (err error)
type ProjectUsedBy ¶
type ProjectUsedBy struct { // Subjects are the 10 most recent subjects who have used the project to create an // environment Subjects []shared.Subject `json:"subjects"` // Total number of unique subjects who have used the project TotalSubjects int64 `json:"totalSubjects"` JSON projectUsedByJSON `json:"-"` }
func (*ProjectUsedBy) UnmarshalJSON ¶
func (r *ProjectUsedBy) UnmarshalJSON(data []byte) (err error)
type ProviderType ¶
type ProviderType string
const ( ProviderTypeUnspecified ProviderType = "PROVIDER_TYPE_UNSPECIFIED" ProviderTypeBuiltin ProviderType = "PROVIDER_TYPE_BUILTIN" ProviderTypeCustom ProviderType = "PROVIDER_TYPE_CUSTOM" )
func (ProviderType) IsKnown ¶
func (r ProviderType) IsKnown() bool
type ResourceOperation ¶
type ResourceOperation string
const ( ResourceOperationUnspecified ResourceOperation = "RESOURCE_OPERATION_UNSPECIFIED" ResourceOperationCreate ResourceOperation = "RESOURCE_OPERATION_CREATE" ResourceOperationUpdate ResourceOperation = "RESOURCE_OPERATION_UPDATE" ResourceOperationDelete ResourceOperation = "RESOURCE_OPERATION_DELETE" ResourceOperationUpdateStatus ResourceOperation = "RESOURCE_OPERATION_UPDATE_STATUS" )
func (ResourceOperation) IsKnown ¶
func (r ResourceOperation) IsKnown() bool
type ResourceType ¶
type ResourceType string
const ( ResourceTypeUnspecified ResourceType = "RESOURCE_TYPE_UNSPECIFIED" ResourceTypeEnvironment ResourceType = "RESOURCE_TYPE_ENVIRONMENT" ResourceTypeRunner ResourceType = "RESOURCE_TYPE_RUNNER" ResourceTypeProject ResourceType = "RESOURCE_TYPE_PROJECT" ResourceTypeTask ResourceType = "RESOURCE_TYPE_TASK" ResourceTypeTaskExecution ResourceType = "RESOURCE_TYPE_TASK_EXECUTION" ResourceTypeService ResourceType = "RESOURCE_TYPE_SERVICE" ResourceTypeOrganization ResourceType = "RESOURCE_TYPE_ORGANIZATION" ResourceTypeUser ResourceType = "RESOURCE_TYPE_USER" ResourceTypeEnvironmentClass ResourceType = "RESOURCE_TYPE_ENVIRONMENT_CLASS" ResourceTypeRunnerScmIntegration ResourceType = "RESOURCE_TYPE_RUNNER_SCM_INTEGRATION" ResourceTypeHostAuthenticationToken ResourceType = "RESOURCE_TYPE_HOST_AUTHENTICATION_TOKEN" ResourceTypeGroup ResourceType = "RESOURCE_TYPE_GROUP" ResourceTypePersonalAccessToken ResourceType = "RESOURCE_TYPE_PERSONAL_ACCESS_TOKEN" ResourceTypeUserPreference ResourceType = "RESOURCE_TYPE_USER_PREFERENCE" ResourceTypeServiceAccount ResourceType = "RESOURCE_TYPE_SERVICE_ACCOUNT" ResourceTypeSecret ResourceType = "RESOURCE_TYPE_SECRET" ResourceTypeSSOConfig ResourceType = "RESOURCE_TYPE_SSO_CONFIG" ResourceTypeDomainVerification ResourceType = "RESOURCE_TYPE_DOMAIN_VERIFICATION" )
func (ResourceType) IsKnown ¶
func (r ResourceType) IsKnown() bool
type Runner ¶
type Runner struct { // Time when the Runner was created. CreatedAt time.Time `json:"createdAt" format:"date-time"` // creator is the identity of the creator of the environment Creator shared.Subject `json:"creator"` // The runner's kind Kind RunnerKind `json:"kind"` // The runner's name which is shown to users Name string `json:"name"` // The runner's provider Provider RunnerProvider `json:"provider"` RunnerID string `json:"runnerId"` // The runner's specification Spec RunnerSpec `json:"spec"` // The runner's status Status RunnerStatus `json:"status"` // Time when the Runner was last udpated. UpdatedAt time.Time `json:"updatedAt" format:"date-time"` JSON runnerJSON `json:"-"` }
func (*Runner) UnmarshalJSON ¶
type RunnerCapability ¶
type RunnerCapability string
const ( RunnerCapabilityUnspecified RunnerCapability = "RUNNER_CAPABILITY_UNSPECIFIED" RunnerCapabilityFetchLocalScmIntegrations RunnerCapability = "RUNNER_CAPABILITY_FETCH_LOCAL_SCM_INTEGRATIONS" RunnerCapabilitySecretContainerRegistry RunnerCapability = "RUNNER_CAPABILITY_SECRET_CONTAINER_REGISTRY" )
func (RunnerCapability) IsKnown ¶
func (r RunnerCapability) IsKnown() bool
type RunnerCheckAuthenticationForHostParams ¶
type RunnerCheckAuthenticationForHostParams struct { Host param.Field[string] `json:"host"` RunnerID param.Field[string] `json:"runnerId" format:"uuid"` }
func (RunnerCheckAuthenticationForHostParams) MarshalJSON ¶
func (r RunnerCheckAuthenticationForHostParams) MarshalJSON() (data []byte, err error)
type RunnerCheckAuthenticationForHostResponse ¶
type RunnerCheckAuthenticationForHostResponse struct { Authenticated bool `json:"authenticated"` // Deprecated: deprecated AuthenticationURL string `json:"authenticationUrl"` // Deprecated: deprecated PatSupported bool `json:"patSupported"` // scm_id is the unique identifier of the SCM provider ScmID string `json:"scmId"` // scm_name is the human-readable name of the SCM provider (e.g., "GitHub", // "GitLab") ScmName string `json:"scmName"` // supports_oauth2 indicates that the host supports OAuth2 authentication SupportsOauth2 RunnerCheckAuthenticationForHostResponseSupportsOauth2 `json:"supportsOauth2"` // supports_pat indicates that the host supports Personal Access Token // authentication SupportsPat RunnerCheckAuthenticationForHostResponseSupportsPat `json:"supportsPat"` JSON runnerCheckAuthenticationForHostResponseJSON `json:"-"` }
func (*RunnerCheckAuthenticationForHostResponse) UnmarshalJSON ¶
func (r *RunnerCheckAuthenticationForHostResponse) UnmarshalJSON(data []byte) (err error)
type RunnerCheckAuthenticationForHostResponseSupportsOauth2 ¶ added in v0.2.0
type RunnerCheckAuthenticationForHostResponseSupportsOauth2 struct { // auth_url is the URL where users can authenticate AuthURL string `json:"authUrl"` // docs_url is the URL to the documentation explaining this authentication method DocsURL string `json:"docsUrl"` JSON runnerCheckAuthenticationForHostResponseSupportsOauth2JSON `json:"-"` }
supports_oauth2 indicates that the host supports OAuth2 authentication
func (*RunnerCheckAuthenticationForHostResponseSupportsOauth2) UnmarshalJSON ¶ added in v0.2.0
func (r *RunnerCheckAuthenticationForHostResponseSupportsOauth2) UnmarshalJSON(data []byte) (err error)
type RunnerCheckAuthenticationForHostResponseSupportsPat ¶ added in v0.2.0
type RunnerCheckAuthenticationForHostResponseSupportsPat struct { // create_url is the URL where users can create a new Personal Access Token CreateURL string `json:"createUrl"` // docs_url is the URL to the documentation explaining PAT usage for this host DocsURL string `json:"docsUrl"` // example is an example of a Personal Access Token Example string `json:"example"` // required_scopes is the list of permissions required for the Personal Access // Token RequiredScopes []string `json:"requiredScopes"` JSON runnerCheckAuthenticationForHostResponseSupportsPatJSON `json:"-"` }
supports_pat indicates that the host supports Personal Access Token authentication
func (*RunnerCheckAuthenticationForHostResponseSupportsPat) UnmarshalJSON ¶ added in v0.2.0
func (r *RunnerCheckAuthenticationForHostResponseSupportsPat) UnmarshalJSON(data []byte) (err error)
type RunnerConfiguration ¶
type RunnerConfiguration struct { // auto_update indicates whether the runner should automatically update itself. AutoUpdate bool `json:"autoUpdate"` // Region to deploy the runner in, if applicable. This is mainly used for remote // runners, and is only a hint. The runner may be deployed in a different region. // See the runner's status for the actual region. Region string `json:"region"` // The release channel the runner is on ReleaseChannel RunnerReleaseChannel `json:"releaseChannel"` JSON runnerConfigurationJSON `json:"-"` }
func (*RunnerConfiguration) UnmarshalJSON ¶
func (r *RunnerConfiguration) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationEnvironmentClassGetParams ¶
type RunnerConfigurationEnvironmentClassGetParams struct {
EnvironmentClassID param.Field[string] `json:"environmentClassId" format:"uuid"`
}
func (RunnerConfigurationEnvironmentClassGetParams) MarshalJSON ¶
func (r RunnerConfigurationEnvironmentClassGetParams) MarshalJSON() (data []byte, err error)
type RunnerConfigurationEnvironmentClassGetResponse ¶
type RunnerConfigurationEnvironmentClassGetResponse struct { EnvironmentClass shared.EnvironmentClass `json:"environmentClass"` JSON runnerConfigurationEnvironmentClassGetResponseJSON `json:"-"` }
func (*RunnerConfigurationEnvironmentClassGetResponse) UnmarshalJSON ¶
func (r *RunnerConfigurationEnvironmentClassGetResponse) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationEnvironmentClassListParams ¶
type RunnerConfigurationEnvironmentClassListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` Filter param.Field[RunnerConfigurationEnvironmentClassListParamsFilter] `json:"filter"` // pagination contains the pagination options for listing environment classes Pagination param.Field[RunnerConfigurationEnvironmentClassListParamsPagination] `json:"pagination"` }
func (RunnerConfigurationEnvironmentClassListParams) MarshalJSON ¶
func (r RunnerConfigurationEnvironmentClassListParams) MarshalJSON() (data []byte, err error)
func (RunnerConfigurationEnvironmentClassListParams) URLQuery ¶
func (r RunnerConfigurationEnvironmentClassListParams) URLQuery() (v url.Values)
URLQuery serializes RunnerConfigurationEnvironmentClassListParams's query parameters as `url.Values`.
type RunnerConfigurationEnvironmentClassListParamsFilter ¶
type RunnerConfigurationEnvironmentClassListParamsFilter struct { // can_create_environments filters the response to only environment classes that // can be used to create new environments by the caller. Unlike enabled, which // indicates general availability, this ensures the caller only sees environment // classes they are allowed to use. CanCreateEnvironments param.Field[bool] `json:"canCreateEnvironments"` // enabled filters the response to only enabled or disabled environment classes. If // not set, all environment classes are returned. Enabled param.Field[bool] `json:"enabled"` // runner_ids filters the response to only EnvironmentClasses of these Runner IDs RunnerIDs param.Field[[]string] `json:"runnerIds" format:"uuid"` // runner_kind filters the response to only environment classes from runners of // these kinds. RunnerKinds param.Field[[]RunnerKind] `json:"runnerKinds"` // runner_providers filters the response to only environment classes from runners // of these providers. RunnerProviders param.Field[[]RunnerProvider] `json:"runnerProviders"` }
func (RunnerConfigurationEnvironmentClassListParamsFilter) MarshalJSON ¶
func (r RunnerConfigurationEnvironmentClassListParamsFilter) MarshalJSON() (data []byte, err error)
type RunnerConfigurationEnvironmentClassListParamsPagination ¶
type RunnerConfigurationEnvironmentClassListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing environment classes
func (RunnerConfigurationEnvironmentClassListParamsPagination) MarshalJSON ¶
func (r RunnerConfigurationEnvironmentClassListParamsPagination) MarshalJSON() (data []byte, err error)
type RunnerConfigurationEnvironmentClassNewParams ¶
type RunnerConfigurationEnvironmentClassNewParams struct { Configuration param.Field[[]shared.FieldValueParam] `json:"configuration"` Description param.Field[string] `json:"description"` DisplayName param.Field[string] `json:"displayName"` RunnerID param.Field[string] `json:"runnerId" format:"uuid"` }
func (RunnerConfigurationEnvironmentClassNewParams) MarshalJSON ¶
func (r RunnerConfigurationEnvironmentClassNewParams) MarshalJSON() (data []byte, err error)
type RunnerConfigurationEnvironmentClassNewResponse ¶
type RunnerConfigurationEnvironmentClassNewResponse struct { ID string `json:"id"` JSON runnerConfigurationEnvironmentClassNewResponseJSON `json:"-"` }
func (*RunnerConfigurationEnvironmentClassNewResponse) UnmarshalJSON ¶
func (r *RunnerConfigurationEnvironmentClassNewResponse) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationEnvironmentClassService ¶
type RunnerConfigurationEnvironmentClassService struct {
Options []option.RequestOption
}
RunnerConfigurationEnvironmentClassService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRunnerConfigurationEnvironmentClassService method instead.
func NewRunnerConfigurationEnvironmentClassService ¶
func NewRunnerConfigurationEnvironmentClassService(opts ...option.RequestOption) (r *RunnerConfigurationEnvironmentClassService)
NewRunnerConfigurationEnvironmentClassService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RunnerConfigurationEnvironmentClassService) Get ¶
func (r *RunnerConfigurationEnvironmentClassService) Get(ctx context.Context, body RunnerConfigurationEnvironmentClassGetParams, opts ...option.RequestOption) (res *RunnerConfigurationEnvironmentClassGetResponse, err error)
Gets details about a specific environment class.
Use this method to:
- View class configuration - Check resource settings - Verify availability
### Examples
- Get class details:
Retrieves information about a specific class. ```yaml environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*RunnerConfigurationEnvironmentClassService) List ¶
func (r *RunnerConfigurationEnvironmentClassService) List(ctx context.Context, params RunnerConfigurationEnvironmentClassListParams, opts ...option.RequestOption) (res *pagination.EnvironmentClassesPage[shared.EnvironmentClass], err error)
Lists environment classes with optional filtering.
Use this method to:
- View available classes - Filter by capability - Check enabled status
### Examples
- List all classes:
Shows all environment classes. ```yaml pagination: pageSize: 20 ```
- Filter enabled classes:
Lists only enabled environment classes. ```yaml filter: enabled: true pagination: pageSize: 20 ``` buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
func (*RunnerConfigurationEnvironmentClassService) ListAutoPaging ¶
func (r *RunnerConfigurationEnvironmentClassService) ListAutoPaging(ctx context.Context, params RunnerConfigurationEnvironmentClassListParams, opts ...option.RequestOption) *pagination.EnvironmentClassesPageAutoPager[shared.EnvironmentClass]
Lists environment classes with optional filtering.
Use this method to:
- View available classes - Filter by capability - Check enabled status
### Examples
- List all classes:
Shows all environment classes. ```yaml pagination: pageSize: 20 ```
- Filter enabled classes:
Lists only enabled environment classes. ```yaml filter: enabled: true pagination: pageSize: 20 ``` buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
func (*RunnerConfigurationEnvironmentClassService) New ¶
func (r *RunnerConfigurationEnvironmentClassService) New(ctx context.Context, body RunnerConfigurationEnvironmentClassNewParams, opts ...option.RequestOption) (res *RunnerConfigurationEnvironmentClassNewResponse, err error)
Creates a new environment class for a runner.
Use this method to:
- Define compute resources - Configure environment settings - Set up runtime options
### Examples
- Create environment class:
Creates a new environment configuration. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" displayName: "Large Instance" description: "8 CPU, 16GB RAM" configuration: - key: "cpu" value: "8" - key: "memory" value: "16384" ```
func (*RunnerConfigurationEnvironmentClassService) Update ¶
func (r *RunnerConfigurationEnvironmentClassService) Update(ctx context.Context, body RunnerConfigurationEnvironmentClassUpdateParams, opts ...option.RequestOption) (res *RunnerConfigurationEnvironmentClassUpdateResponse, err error)
Updates an environment class.
Use this method to:
- Modify class settings - Update resource limits - Change availability
### Examples
- Update class:
Changes class configuration. ```yaml environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" displayName: "Updated Large Instance" description: "16 CPU, 32GB RAM" enabled: true ```
type RunnerConfigurationEnvironmentClassUpdateParams ¶
type RunnerConfigurationEnvironmentClassUpdateParams struct { Description param.Field[string] `json:"description"` DisplayName param.Field[string] `json:"displayName"` Enabled param.Field[bool] `json:"enabled"` EnvironmentClassID param.Field[string] `json:"environmentClassId" format:"uuid"` }
func (RunnerConfigurationEnvironmentClassUpdateParams) MarshalJSON ¶
func (r RunnerConfigurationEnvironmentClassUpdateParams) MarshalJSON() (data []byte, err error)
type RunnerConfigurationEnvironmentClassUpdateResponse ¶
type RunnerConfigurationEnvironmentClassUpdateResponse = interface{}
type RunnerConfigurationHostAuthenticationTokenDeleteParams ¶
type RunnerConfigurationHostAuthenticationTokenDeleteParams struct {
ID param.Field[string] `json:"id" format:"uuid"`
}
func (RunnerConfigurationHostAuthenticationTokenDeleteParams) MarshalJSON ¶
func (r RunnerConfigurationHostAuthenticationTokenDeleteParams) MarshalJSON() (data []byte, err error)
type RunnerConfigurationHostAuthenticationTokenDeleteResponse ¶
type RunnerConfigurationHostAuthenticationTokenDeleteResponse = interface{}
type RunnerConfigurationHostAuthenticationTokenGetParams ¶
type RunnerConfigurationHostAuthenticationTokenGetParams struct {
ID param.Field[string] `json:"id" format:"uuid"`
}
func (RunnerConfigurationHostAuthenticationTokenGetParams) MarshalJSON ¶
func (r RunnerConfigurationHostAuthenticationTokenGetParams) MarshalJSON() (data []byte, err error)
type RunnerConfigurationHostAuthenticationTokenGetResponse ¶
type RunnerConfigurationHostAuthenticationTokenGetResponse struct { Token HostAuthenticationToken `json:"token,required"` JSON runnerConfigurationHostAuthenticationTokenGetResponseJSON `json:"-"` }
func (*RunnerConfigurationHostAuthenticationTokenGetResponse) UnmarshalJSON ¶
func (r *RunnerConfigurationHostAuthenticationTokenGetResponse) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationHostAuthenticationTokenListParams ¶
type RunnerConfigurationHostAuthenticationTokenListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` Filter param.Field[RunnerConfigurationHostAuthenticationTokenListParamsFilter] `json:"filter"` Pagination param.Field[RunnerConfigurationHostAuthenticationTokenListParamsPagination] `json:"pagination"` }
func (RunnerConfigurationHostAuthenticationTokenListParams) MarshalJSON ¶
func (r RunnerConfigurationHostAuthenticationTokenListParams) MarshalJSON() (data []byte, err error)
func (RunnerConfigurationHostAuthenticationTokenListParams) URLQuery ¶
func (r RunnerConfigurationHostAuthenticationTokenListParams) URLQuery() (v url.Values)
URLQuery serializes RunnerConfigurationHostAuthenticationTokenListParams's query parameters as `url.Values`.
type RunnerConfigurationHostAuthenticationTokenListParamsFilter ¶
type RunnerConfigurationHostAuthenticationTokenListParamsFilter struct { RunnerID param.Field[string] `json:"runnerId" format:"uuid"` UserID param.Field[string] `json:"userId" format:"uuid"` }
func (RunnerConfigurationHostAuthenticationTokenListParamsFilter) MarshalJSON ¶
func (r RunnerConfigurationHostAuthenticationTokenListParamsFilter) MarshalJSON() (data []byte, err error)
type RunnerConfigurationHostAuthenticationTokenListParamsPagination ¶
type RunnerConfigurationHostAuthenticationTokenListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
func (RunnerConfigurationHostAuthenticationTokenListParamsPagination) MarshalJSON ¶
func (r RunnerConfigurationHostAuthenticationTokenListParamsPagination) MarshalJSON() (data []byte, err error)
type RunnerConfigurationHostAuthenticationTokenNewParams ¶
type RunnerConfigurationHostAuthenticationTokenNewParams struct { Token param.Field[string] `json:"token"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. ExpiresAt param.Field[time.Time] `json:"expiresAt" format:"date-time"` Host param.Field[string] `json:"host"` RefreshToken param.Field[string] `json:"refreshToken"` RunnerID param.Field[string] `json:"runnerId" format:"uuid"` Source param.Field[HostAuthenticationTokenSource] `json:"source"` UserID param.Field[string] `json:"userId" format:"uuid"` }
func (RunnerConfigurationHostAuthenticationTokenNewParams) MarshalJSON ¶
func (r RunnerConfigurationHostAuthenticationTokenNewParams) MarshalJSON() (data []byte, err error)
type RunnerConfigurationHostAuthenticationTokenNewResponse ¶
type RunnerConfigurationHostAuthenticationTokenNewResponse struct { Token HostAuthenticationToken `json:"token,required"` JSON runnerConfigurationHostAuthenticationTokenNewResponseJSON `json:"-"` }
func (*RunnerConfigurationHostAuthenticationTokenNewResponse) UnmarshalJSON ¶
func (r *RunnerConfigurationHostAuthenticationTokenNewResponse) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationHostAuthenticationTokenService ¶
type RunnerConfigurationHostAuthenticationTokenService struct {
Options []option.RequestOption
}
RunnerConfigurationHostAuthenticationTokenService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRunnerConfigurationHostAuthenticationTokenService method instead.
func NewRunnerConfigurationHostAuthenticationTokenService ¶
func NewRunnerConfigurationHostAuthenticationTokenService(opts ...option.RequestOption) (r *RunnerConfigurationHostAuthenticationTokenService)
NewRunnerConfigurationHostAuthenticationTokenService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RunnerConfigurationHostAuthenticationTokenService) Delete ¶
func (r *RunnerConfigurationHostAuthenticationTokenService) Delete(ctx context.Context, body RunnerConfigurationHostAuthenticationTokenDeleteParams, opts ...option.RequestOption) (res *RunnerConfigurationHostAuthenticationTokenDeleteResponse, err error)
Deletes a host authentication token.
Use this method to:
- Remove unused tokens - Revoke access - Clean up expired tokens
### Examples
- Delete token:
Permanently removes a token. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*RunnerConfigurationHostAuthenticationTokenService) Get ¶
func (r *RunnerConfigurationHostAuthenticationTokenService) Get(ctx context.Context, body RunnerConfigurationHostAuthenticationTokenGetParams, opts ...option.RequestOption) (res *RunnerConfigurationHostAuthenticationTokenGetResponse, err error)
Gets details about a specific host authentication token.
Use this method to:
- View token information - Check token expiration - Verify token validity
### Examples
- Get token details:
Retrieves information about a specific token. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*RunnerConfigurationHostAuthenticationTokenService) List ¶
func (r *RunnerConfigurationHostAuthenticationTokenService) List(ctx context.Context, params RunnerConfigurationHostAuthenticationTokenListParams, opts ...option.RequestOption) (res *pagination.TokensPage[HostAuthenticationToken], err error)
Lists host authentication tokens with optional filtering.
Use this method to:
- View all tokens - Filter by runner or user - Monitor token status
### Examples
- List all tokens:
Shows all tokens with pagination. ```yaml pagination: pageSize: 20 ```
- Filter by runner:
Lists tokens for a specific runner. ```yaml filter: runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" pagination: pageSize: 20 ```
func (*RunnerConfigurationHostAuthenticationTokenService) ListAutoPaging ¶
func (r *RunnerConfigurationHostAuthenticationTokenService) ListAutoPaging(ctx context.Context, params RunnerConfigurationHostAuthenticationTokenListParams, opts ...option.RequestOption) *pagination.TokensPageAutoPager[HostAuthenticationToken]
Lists host authentication tokens with optional filtering.
Use this method to:
- View all tokens - Filter by runner or user - Monitor token status
### Examples
- List all tokens:
Shows all tokens with pagination. ```yaml pagination: pageSize: 20 ```
- Filter by runner:
Lists tokens for a specific runner. ```yaml filter: runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" pagination: pageSize: 20 ```
func (*RunnerConfigurationHostAuthenticationTokenService) New ¶
func (r *RunnerConfigurationHostAuthenticationTokenService) New(ctx context.Context, body RunnerConfigurationHostAuthenticationTokenNewParams, opts ...option.RequestOption) (res *RunnerConfigurationHostAuthenticationTokenNewResponse, err error)
Creates a new authentication token for accessing remote hosts.
Use this method to:
- Set up SCM authentication - Configure OAuth credentials - Manage PAT tokens
### Examples
- Create OAuth token:
Creates a new OAuth-based authentication token. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" host: "github.com" token: "gho_xxxxxxxxxxxx" source: HOST_AUTHENTICATION_TOKEN_SOURCE_OAUTH expiresAt: "2024-12-31T23:59:59Z" refreshToken: "ghr_xxxxxxxxxxxx" ```
func (*RunnerConfigurationHostAuthenticationTokenService) Update ¶
func (r *RunnerConfigurationHostAuthenticationTokenService) Update(ctx context.Context, body RunnerConfigurationHostAuthenticationTokenUpdateParams, opts ...option.RequestOption) (res *RunnerConfigurationHostAuthenticationTokenUpdateResponse, err error)
Updates an existing host authentication token.
Use this method to:
- Refresh token values - Update expiration - Modify token settings
### Examples
- Update token:
Updates token value and expiration. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" token: "gho_xxxxxxxxxxxx" expiresAt: "2024-12-31T23:59:59Z" refreshToken: "ghr_xxxxxxxxxxxx" ```
type RunnerConfigurationHostAuthenticationTokenUpdateParams ¶
type RunnerConfigurationHostAuthenticationTokenUpdateParams struct { ID param.Field[string] `json:"id" format:"uuid"` Token param.Field[string] `json:"token"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. ExpiresAt param.Field[time.Time] `json:"expiresAt" format:"date-time"` RefreshToken param.Field[string] `json:"refreshToken"` }
func (RunnerConfigurationHostAuthenticationTokenUpdateParams) MarshalJSON ¶
func (r RunnerConfigurationHostAuthenticationTokenUpdateParams) MarshalJSON() (data []byte, err error)
type RunnerConfigurationHostAuthenticationTokenUpdateResponse ¶
type RunnerConfigurationHostAuthenticationTokenUpdateResponse = interface{}
type RunnerConfigurationParam ¶
type RunnerConfigurationParam struct { // auto_update indicates whether the runner should automatically update itself. AutoUpdate param.Field[bool] `json:"autoUpdate"` // Region to deploy the runner in, if applicable. This is mainly used for remote // runners, and is only a hint. The runner may be deployed in a different region. // See the runner's status for the actual region. Region param.Field[string] `json:"region"` // The release channel the runner is on ReleaseChannel param.Field[RunnerReleaseChannel] `json:"releaseChannel"` }
func (RunnerConfigurationParam) MarshalJSON ¶
func (r RunnerConfigurationParam) MarshalJSON() (data []byte, err error)
type RunnerConfigurationSchema ¶
type RunnerConfigurationSchema struct { EnvironmentClasses []RunnerConfigurationSchemaEnvironmentClass `json:"environmentClasses"` RunnerConfig []RunnerConfigurationSchemaRunnerConfig `json:"runnerConfig"` Scm []RunnerConfigurationSchemaScm `json:"scm"` // The schema version Version string `json:"version"` JSON runnerConfigurationSchemaJSON `json:"-"` }
func (*RunnerConfigurationSchema) UnmarshalJSON ¶
func (r *RunnerConfigurationSchema) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaEnvironmentClass ¶
type RunnerConfigurationSchemaEnvironmentClass struct { ID string `json:"id"` Bool RunnerConfigurationSchemaEnvironmentClassesBool `json:"bool"` Description string `json:"description"` Display RunnerConfigurationSchemaEnvironmentClassesDisplay `json:"display"` Enum RunnerConfigurationSchemaEnvironmentClassesEnum `json:"enum"` Int RunnerConfigurationSchemaEnvironmentClassesInt `json:"int"` Name string `json:"name"` Required bool `json:"required"` Secret bool `json:"secret"` String RunnerConfigurationSchemaEnvironmentClassesString `json:"string"` JSON runnerConfigurationSchemaEnvironmentClassJSON `json:"-"` }
func (*RunnerConfigurationSchemaEnvironmentClass) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaEnvironmentClass) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaEnvironmentClassesBool ¶
type RunnerConfigurationSchemaEnvironmentClassesBool struct { Default bool `json:"default"` JSON runnerConfigurationSchemaEnvironmentClassesBoolJSON `json:"-"` }
func (*RunnerConfigurationSchemaEnvironmentClassesBool) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaEnvironmentClassesBool) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaEnvironmentClassesDisplay ¶
type RunnerConfigurationSchemaEnvironmentClassesDisplay struct { Default string `json:"default"` JSON runnerConfigurationSchemaEnvironmentClassesDisplayJSON `json:"-"` }
func (*RunnerConfigurationSchemaEnvironmentClassesDisplay) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaEnvironmentClassesDisplay) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaEnvironmentClassesEnum ¶
type RunnerConfigurationSchemaEnvironmentClassesEnum struct { Default string `json:"default"` Values []string `json:"values"` JSON runnerConfigurationSchemaEnvironmentClassesEnumJSON `json:"-"` }
func (*RunnerConfigurationSchemaEnvironmentClassesEnum) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaEnvironmentClassesEnum) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaEnvironmentClassesInt ¶
type RunnerConfigurationSchemaEnvironmentClassesInt struct { Default int64 `json:"default"` Max int64 `json:"max"` Min int64 `json:"min"` JSON runnerConfigurationSchemaEnvironmentClassesIntJSON `json:"-"` }
func (*RunnerConfigurationSchemaEnvironmentClassesInt) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaEnvironmentClassesInt) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaEnvironmentClassesString ¶
type RunnerConfigurationSchemaEnvironmentClassesString struct { Default string `json:"default"` Pattern string `json:"pattern"` JSON runnerConfigurationSchemaEnvironmentClassesStringJSON `json:"-"` }
func (*RunnerConfigurationSchemaEnvironmentClassesString) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaEnvironmentClassesString) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaGetParams ¶
type RunnerConfigurationSchemaGetParams struct {
RunnerID param.Field[string] `json:"runnerId" format:"uuid"`
}
func (RunnerConfigurationSchemaGetParams) MarshalJSON ¶
func (r RunnerConfigurationSchemaGetParams) MarshalJSON() (data []byte, err error)
type RunnerConfigurationSchemaGetResponse ¶
type RunnerConfigurationSchemaGetResponse struct { Schema RunnerConfigurationSchema `json:"schema"` JSON runnerConfigurationSchemaGetResponseJSON `json:"-"` }
func (*RunnerConfigurationSchemaGetResponse) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaGetResponse) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaRunnerConfig ¶
type RunnerConfigurationSchemaRunnerConfig struct { ID string `json:"id"` Bool RunnerConfigurationSchemaRunnerConfigBool `json:"bool"` Description string `json:"description"` Display RunnerConfigurationSchemaRunnerConfigDisplay `json:"display"` Enum RunnerConfigurationSchemaRunnerConfigEnum `json:"enum"` Int RunnerConfigurationSchemaRunnerConfigInt `json:"int"` Name string `json:"name"` Required bool `json:"required"` Secret bool `json:"secret"` String RunnerConfigurationSchemaRunnerConfigString `json:"string"` JSON runnerConfigurationSchemaRunnerConfigJSON `json:"-"` }
func (*RunnerConfigurationSchemaRunnerConfig) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaRunnerConfig) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaRunnerConfigBool ¶
type RunnerConfigurationSchemaRunnerConfigBool struct { Default bool `json:"default"` JSON runnerConfigurationSchemaRunnerConfigBoolJSON `json:"-"` }
func (*RunnerConfigurationSchemaRunnerConfigBool) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaRunnerConfigBool) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaRunnerConfigDisplay ¶
type RunnerConfigurationSchemaRunnerConfigDisplay struct { Default string `json:"default"` JSON runnerConfigurationSchemaRunnerConfigDisplayJSON `json:"-"` }
func (*RunnerConfigurationSchemaRunnerConfigDisplay) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaRunnerConfigDisplay) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaRunnerConfigEnum ¶
type RunnerConfigurationSchemaRunnerConfigEnum struct { Default string `json:"default"` Values []string `json:"values"` JSON runnerConfigurationSchemaRunnerConfigEnumJSON `json:"-"` }
func (*RunnerConfigurationSchemaRunnerConfigEnum) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaRunnerConfigEnum) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaRunnerConfigInt ¶
type RunnerConfigurationSchemaRunnerConfigInt struct { Default int64 `json:"default"` Max int64 `json:"max"` Min int64 `json:"min"` JSON runnerConfigurationSchemaRunnerConfigIntJSON `json:"-"` }
func (*RunnerConfigurationSchemaRunnerConfigInt) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaRunnerConfigInt) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaRunnerConfigString ¶
type RunnerConfigurationSchemaRunnerConfigString struct { Default string `json:"default"` Pattern string `json:"pattern"` JSON runnerConfigurationSchemaRunnerConfigStringJSON `json:"-"` }
func (*RunnerConfigurationSchemaRunnerConfigString) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaRunnerConfigString) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaScm ¶
type RunnerConfigurationSchemaScm struct { DefaultHosts []string `json:"defaultHosts"` Name string `json:"name"` OAuth RunnerConfigurationSchemaScmOAuth `json:"oauth"` Pat RunnerConfigurationSchemaScmPat `json:"pat"` ScmID string `json:"scmId"` JSON runnerConfigurationSchemaScmJSON `json:"-"` }
func (*RunnerConfigurationSchemaScm) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaScm) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaScmOAuth ¶
type RunnerConfigurationSchemaScmOAuth struct { // callback_url is the URL the OAuth app will redirect to after the user has // authenticated. CallbackURL string `json:"callbackUrl"` JSON runnerConfigurationSchemaScmOAuthJSON `json:"-"` }
func (*RunnerConfigurationSchemaScmOAuth) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaScmOAuth) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaScmPat ¶
type RunnerConfigurationSchemaScmPat struct { // description is a human-readable description of the PAT. Description string `json:"description"` // docs_link is a link to the documentation on how to create a PAT for this SCM // system. DocsLink string `json:"docsLink"` JSON runnerConfigurationSchemaScmPatJSON `json:"-"` }
func (*RunnerConfigurationSchemaScmPat) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaScmPat) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaService ¶
type RunnerConfigurationSchemaService struct {
Options []option.RequestOption
}
RunnerConfigurationSchemaService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRunnerConfigurationSchemaService method instead.
func NewRunnerConfigurationSchemaService ¶
func NewRunnerConfigurationSchemaService(opts ...option.RequestOption) (r *RunnerConfigurationSchemaService)
NewRunnerConfigurationSchemaService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RunnerConfigurationSchemaService) Get ¶
func (r *RunnerConfigurationSchemaService) Get(ctx context.Context, body RunnerConfigurationSchemaGetParams, opts ...option.RequestOption) (res *RunnerConfigurationSchemaGetResponse, err error)
Gets the latest runner configuration schema.
Use this method to:
- View available settings - Check configuration options - Validate configurations
### Examples
- Get schema:
Retrieves configuration schema for a runner. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
type RunnerConfigurationScmIntegrationDeleteParams ¶
type RunnerConfigurationScmIntegrationDeleteParams struct {
ID param.Field[string] `json:"id" format:"uuid"`
}
func (RunnerConfigurationScmIntegrationDeleteParams) MarshalJSON ¶
func (r RunnerConfigurationScmIntegrationDeleteParams) MarshalJSON() (data []byte, err error)
type RunnerConfigurationScmIntegrationDeleteResponse ¶
type RunnerConfigurationScmIntegrationDeleteResponse = interface{}
type RunnerConfigurationScmIntegrationGetParams ¶
type RunnerConfigurationScmIntegrationGetParams struct {
ID param.Field[string] `json:"id" format:"uuid"`
}
func (RunnerConfigurationScmIntegrationGetParams) MarshalJSON ¶
func (r RunnerConfigurationScmIntegrationGetParams) MarshalJSON() (data []byte, err error)
type RunnerConfigurationScmIntegrationGetResponse ¶
type RunnerConfigurationScmIntegrationGetResponse struct { Integration ScmIntegration `json:"integration"` JSON runnerConfigurationScmIntegrationGetResponseJSON `json:"-"` }
func (*RunnerConfigurationScmIntegrationGetResponse) UnmarshalJSON ¶
func (r *RunnerConfigurationScmIntegrationGetResponse) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationScmIntegrationListParams ¶
type RunnerConfigurationScmIntegrationListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` Filter param.Field[RunnerConfigurationScmIntegrationListParamsFilter] `json:"filter"` // pagination contains the pagination options for listing scm integrations Pagination param.Field[RunnerConfigurationScmIntegrationListParamsPagination] `json:"pagination"` }
func (RunnerConfigurationScmIntegrationListParams) MarshalJSON ¶
func (r RunnerConfigurationScmIntegrationListParams) MarshalJSON() (data []byte, err error)
func (RunnerConfigurationScmIntegrationListParams) URLQuery ¶
func (r RunnerConfigurationScmIntegrationListParams) URLQuery() (v url.Values)
URLQuery serializes RunnerConfigurationScmIntegrationListParams's query parameters as `url.Values`.
type RunnerConfigurationScmIntegrationListParamsFilter ¶
type RunnerConfigurationScmIntegrationListParamsFilter struct { // runner_ids filters the response to only SCM integrations of these Runner IDs RunnerIDs param.Field[[]string] `json:"runnerIds" format:"uuid"` }
func (RunnerConfigurationScmIntegrationListParamsFilter) MarshalJSON ¶
func (r RunnerConfigurationScmIntegrationListParamsFilter) MarshalJSON() (data []byte, err error)
type RunnerConfigurationScmIntegrationListParamsPagination ¶
type RunnerConfigurationScmIntegrationListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing scm integrations
func (RunnerConfigurationScmIntegrationListParamsPagination) MarshalJSON ¶
func (r RunnerConfigurationScmIntegrationListParamsPagination) MarshalJSON() (data []byte, err error)
type RunnerConfigurationScmIntegrationNewParams ¶
type RunnerConfigurationScmIntegrationNewParams struct { Host param.Field[string] `json:"host"` // oauth_client_id is the OAuth app's client ID, if OAuth is configured. If // configured, oauth_plaintext_client_secret must also be set. OAuthClientID param.Field[string] `json:"oauthClientId"` // oauth_plaintext_client_secret is the OAuth app's client secret in clear text. // This will first be encrypted with the runner's public key before being stored. OAuthPlaintextClientSecret param.Field[string] `json:"oauthPlaintextClientSecret"` Pat param.Field[bool] `json:"pat"` RunnerID param.Field[string] `json:"runnerId" format:"uuid"` // scm_id references the scm_id in the runner's configuration schema that this // integration is for ScmID param.Field[string] `json:"scmId"` }
func (RunnerConfigurationScmIntegrationNewParams) MarshalJSON ¶
func (r RunnerConfigurationScmIntegrationNewParams) MarshalJSON() (data []byte, err error)
type RunnerConfigurationScmIntegrationNewResponse ¶
type RunnerConfigurationScmIntegrationNewResponse struct { // id is a uniquely generated identifier for the SCM integration ID string `json:"id" format:"uuid"` JSON runnerConfigurationScmIntegrationNewResponseJSON `json:"-"` }
func (*RunnerConfigurationScmIntegrationNewResponse) UnmarshalJSON ¶
func (r *RunnerConfigurationScmIntegrationNewResponse) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationScmIntegrationService ¶
type RunnerConfigurationScmIntegrationService struct {
Options []option.RequestOption
}
RunnerConfigurationScmIntegrationService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRunnerConfigurationScmIntegrationService method instead.
func NewRunnerConfigurationScmIntegrationService ¶
func NewRunnerConfigurationScmIntegrationService(opts ...option.RequestOption) (r *RunnerConfigurationScmIntegrationService)
NewRunnerConfigurationScmIntegrationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RunnerConfigurationScmIntegrationService) Delete ¶
func (r *RunnerConfigurationScmIntegrationService) Delete(ctx context.Context, body RunnerConfigurationScmIntegrationDeleteParams, opts ...option.RequestOption) (res *RunnerConfigurationScmIntegrationDeleteResponse, err error)
Deletes an SCM integration.
Use this method to:
- Remove unused integrations - Clean up configurations - Revoke SCM access
### Examples
- Delete integration:
Removes an SCM integration. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*RunnerConfigurationScmIntegrationService) Get ¶
func (r *RunnerConfigurationScmIntegrationService) Get(ctx context.Context, body RunnerConfigurationScmIntegrationGetParams, opts ...option.RequestOption) (res *RunnerConfigurationScmIntegrationGetResponse, err error)
Gets details about a specific SCM integration.
Use this method to:
- View integration settings - Check integration status - Verify configuration
### Examples
- Get integration details:
Retrieves information about a specific integration. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*RunnerConfigurationScmIntegrationService) List ¶
func (r *RunnerConfigurationScmIntegrationService) List(ctx context.Context, params RunnerConfigurationScmIntegrationListParams, opts ...option.RequestOption) (res *pagination.IntegrationsPage[ScmIntegration], err error)
Lists SCM integrations for a runner.
Use this method to:
- View all integrations - Monitor integration status - Check available SCMs
### Examples
- List integrations:
Shows all SCM integrations. ```yaml filter: runnerIds: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"] pagination: pageSize: 20 ```
func (*RunnerConfigurationScmIntegrationService) ListAutoPaging ¶
func (r *RunnerConfigurationScmIntegrationService) ListAutoPaging(ctx context.Context, params RunnerConfigurationScmIntegrationListParams, opts ...option.RequestOption) *pagination.IntegrationsPageAutoPager[ScmIntegration]
Lists SCM integrations for a runner.
Use this method to:
- View all integrations - Monitor integration status - Check available SCMs
### Examples
- List integrations:
Shows all SCM integrations. ```yaml filter: runnerIds: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"] pagination: pageSize: 20 ```
func (*RunnerConfigurationScmIntegrationService) New ¶
func (r *RunnerConfigurationScmIntegrationService) New(ctx context.Context, body RunnerConfigurationScmIntegrationNewParams, opts ...option.RequestOption) (res *RunnerConfigurationScmIntegrationNewResponse, err error)
Creates a new SCM integration for a runner.
Use this method to:
- Configure source control access - Set up repository integrations - Enable code synchronization
### Examples
- Create GitHub integration:
Sets up GitHub SCM integration. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" scmId: "github" host: "github.com" oauthClientId: "client_id" oauthPlaintextClientSecret: "client_secret" ```
func (*RunnerConfigurationScmIntegrationService) Update ¶
func (r *RunnerConfigurationScmIntegrationService) Update(ctx context.Context, body RunnerConfigurationScmIntegrationUpdateParams, opts ...option.RequestOption) (res *RunnerConfigurationScmIntegrationUpdateResponse, err error)
Updates an existing SCM integration.
Use this method to:
- Modify integration settings - Update credentials - Change configuration
### Examples
- Update integration:
Updates OAuth credentials. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" oauthClientId: "new_client_id" oauthPlaintextClientSecret: "new_client_secret" ```
type RunnerConfigurationScmIntegrationUpdateParams ¶
type RunnerConfigurationScmIntegrationUpdateParams struct { ID param.Field[string] `json:"id" format:"uuid"` // oauth_client_id can be set to update the OAuth app's client ID. If an empty // string is set, the OAuth configuration will be removed (regardless of whether a // client secret is set), and any existing Host Authentication Tokens for the SCM // integration's runner and host that were created using the OAuth app will be // deleted. This might lead to users being unable to access their repositories // until they re-authenticate. OAuthClientID param.Field[string] `json:"oauthClientId"` // oauth_plaintext_client_secret can be set to update the OAuth app's client // secret. The cleartext secret will be encrypted with the runner's public key // before being stored. OAuthPlaintextClientSecret param.Field[string] `json:"oauthPlaintextClientSecret"` // pat can be set to enable or disable Personal Access Tokens support. When // disabling PATs, any existing Host Authentication Tokens for the SCM // integration's runner and host that were created using a PAT will be deleted. // This might lead to users being unable to access their repositories until they // re-authenticate. Pat param.Field[bool] `json:"pat"` }
func (RunnerConfigurationScmIntegrationUpdateParams) MarshalJSON ¶
func (r RunnerConfigurationScmIntegrationUpdateParams) MarshalJSON() (data []byte, err error)
type RunnerConfigurationScmIntegrationUpdateResponse ¶
type RunnerConfigurationScmIntegrationUpdateResponse = interface{}
type RunnerConfigurationService ¶
type RunnerConfigurationService struct { Options []option.RequestOption EnvironmentClasses *RunnerConfigurationEnvironmentClassService HostAuthenticationTokens *RunnerConfigurationHostAuthenticationTokenService Schema *RunnerConfigurationSchemaService ScmIntegrations *RunnerConfigurationScmIntegrationService }
RunnerConfigurationService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRunnerConfigurationService method instead.
func NewRunnerConfigurationService ¶
func NewRunnerConfigurationService(opts ...option.RequestOption) (r *RunnerConfigurationService)
NewRunnerConfigurationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RunnerConfigurationService) Validate ¶
func (r *RunnerConfigurationService) Validate(ctx context.Context, body RunnerConfigurationValidateParams, opts ...option.RequestOption) (res *RunnerConfigurationValidateResponse, err error)
Validates a runner configuration.
Use this method to:
- Check configuration validity - Verify integration settings - Validate environment classes
### Examples
- Validate SCM integration:
Checks if an SCM integration is valid. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" scmIntegration: id: "integration-id" scmId: "github" host: "github.com" oauthClientId: "client_id" oauthPlaintextClientSecret: "client_secret" ```
type RunnerConfigurationValidateParams ¶
type RunnerConfigurationValidateParams struct { EnvironmentClass param.Field[shared.EnvironmentClassParam] `json:"environmentClass"` RunnerID param.Field[string] `json:"runnerId" format:"uuid"` ScmIntegration param.Field[RunnerConfigurationValidateParamsScmIntegration] `json:"scmIntegration"` }
func (RunnerConfigurationValidateParams) MarshalJSON ¶
func (r RunnerConfigurationValidateParams) MarshalJSON() (data []byte, err error)
type RunnerConfigurationValidateParamsScmIntegration ¶
type RunnerConfigurationValidateParamsScmIntegration struct { // id is the unique identifier of the SCM integration ID param.Field[string] `json:"id"` Host param.Field[string] `json:"host"` // oauth_client_id is the OAuth app's client ID, if OAuth is configured. If // configured, oauth_client_secret must also be set. OAuthClientID param.Field[string] `json:"oauthClientId"` // oauth_encrypted_client_secret is the OAuth app's client secret encrypted with // the runner's public key, if OAuth is configured. This can be used to e.g. // validate an already encrypted client secret of an existing SCM integration. OAuthEncryptedClientSecret param.Field[string] `json:"oauthEncryptedClientSecret" format:"byte"` // oauth_plaintext_client_secret is the OAuth app's client secret in clear text, if // OAuth is configured. This can be set to validate any new client secret before it // is encrypted and stored. This value will not be stored and get encrypted with // the runner's public key before passing it to the runner. OAuthPlaintextClientSecret param.Field[string] `json:"oauthPlaintextClientSecret"` Pat param.Field[bool] `json:"pat"` // scm_id references the scm_id in the runner's configuration schema that this // integration is for ScmID param.Field[string] `json:"scmId"` }
func (RunnerConfigurationValidateParamsScmIntegration) MarshalJSON ¶
func (r RunnerConfigurationValidateParamsScmIntegration) MarshalJSON() (data []byte, err error)
type RunnerConfigurationValidateResponse ¶
type RunnerConfigurationValidateResponse struct { EnvironmentClass EnvironmentClassValidationResult `json:"environmentClass"` ScmIntegration ScmIntegrationValidationResult `json:"scmIntegration"` JSON runnerConfigurationValidateResponseJSON `json:"-"` }
func (*RunnerConfigurationValidateResponse) UnmarshalJSON ¶
func (r *RunnerConfigurationValidateResponse) UnmarshalJSON(data []byte) (err error)
type RunnerDeleteParams ¶
type RunnerDeleteParams struct { // force indicates whether the runner should be deleted forcefully. When force // deleting a Runner, all Environments on the runner are also force deleted and // regular Runner lifecycle is not respected. Force deleting can result in data // loss. Force param.Field[bool] `json:"force"` RunnerID param.Field[string] `json:"runnerId" format:"uuid"` }
func (RunnerDeleteParams) MarshalJSON ¶
func (r RunnerDeleteParams) MarshalJSON() (data []byte, err error)
type RunnerDeleteResponse ¶
type RunnerDeleteResponse = interface{}
type RunnerGetParams ¶
func (RunnerGetParams) MarshalJSON ¶
func (r RunnerGetParams) MarshalJSON() (data []byte, err error)
type RunnerGetResponse ¶
type RunnerGetResponse struct { Runner Runner `json:"runner,required"` JSON runnerGetResponseJSON `json:"-"` }
func (*RunnerGetResponse) UnmarshalJSON ¶
func (r *RunnerGetResponse) UnmarshalJSON(data []byte) (err error)
type RunnerKind ¶
type RunnerKind string
RunnerKind represents the kind of a runner
const ( RunnerKindUnspecified RunnerKind = "RUNNER_KIND_UNSPECIFIED" RunnerKindLocal RunnerKind = "RUNNER_KIND_LOCAL" RunnerKindRemote RunnerKind = "RUNNER_KIND_REMOTE" RunnerKindLocalConfiguration RunnerKind = "RUNNER_KIND_LOCAL_CONFIGURATION" )
func (RunnerKind) IsKnown ¶
func (r RunnerKind) IsKnown() bool
type RunnerListParams ¶
type RunnerListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` Filter param.Field[RunnerListParamsFilter] `json:"filter"` // pagination contains the pagination options for listing runners Pagination param.Field[RunnerListParamsPagination] `json:"pagination"` }
func (RunnerListParams) MarshalJSON ¶
func (r RunnerListParams) MarshalJSON() (data []byte, err error)
func (RunnerListParams) URLQuery ¶
func (r RunnerListParams) URLQuery() (v url.Values)
URLQuery serializes RunnerListParams's query parameters as `url.Values`.
type RunnerListParamsFilter ¶
type RunnerListParamsFilter struct { // creator_ids filters the response to only runner created by specified users CreatorIDs param.Field[[]string] `json:"creatorIds" format:"uuid"` // kinds filters the response to only runners of the specified kinds Kinds param.Field[[]RunnerKind] `json:"kinds"` // providers filters the response to only runners of the specified providers Providers param.Field[[]RunnerProvider] `json:"providers"` }
func (RunnerListParamsFilter) MarshalJSON ¶
func (r RunnerListParamsFilter) MarshalJSON() (data []byte, err error)
type RunnerListParamsPagination ¶
type RunnerListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing runners
func (RunnerListParamsPagination) MarshalJSON ¶
func (r RunnerListParamsPagination) MarshalJSON() (data []byte, err error)
type RunnerNewParams ¶
type RunnerNewParams struct { // The runner's kind This field is optional and here for backwards-compatibility. // Use the provider field instead. If provider is set, the runner's kind will be // deduced from the provider. Only one of kind and provider must be set. Kind param.Field[RunnerKind] `json:"kind"` // The runner name for humans Name param.Field[string] `json:"name"` // The specific implementation type of the runner This field is optional for // backwards compatibility but will be required in the future. When specified, kind // must not be specified (will be deduced from provider) Provider param.Field[RunnerProvider] `json:"provider"` Spec param.Field[RunnerSpecParam] `json:"spec"` }
func (RunnerNewParams) MarshalJSON ¶
func (r RunnerNewParams) MarshalJSON() (data []byte, err error)
type RunnerNewResponse ¶
type RunnerNewResponse struct { Runner Runner `json:"runner,required"` // deprecated, will be removed. Use exchange_token instead. // // Deprecated: deprecated AccessToken string `json:"accessToken"` // exchange_token is a one-time use token that should be exchanged by the runner // for an access token, using the IdentityService.ExchangeToken rpc. The token // expires after 24 hours. ExchangeToken string `json:"exchangeToken"` JSON runnerNewResponseJSON `json:"-"` }
func (*RunnerNewResponse) UnmarshalJSON ¶
func (r *RunnerNewResponse) UnmarshalJSON(data []byte) (err error)
type RunnerNewRunnerTokenParams ¶
type RunnerNewRunnerTokenParams struct {
RunnerID param.Field[string] `json:"runnerId" format:"uuid"`
}
func (RunnerNewRunnerTokenParams) MarshalJSON ¶
func (r RunnerNewRunnerTokenParams) MarshalJSON() (data []byte, err error)
type RunnerNewRunnerTokenResponse ¶
type RunnerNewRunnerTokenResponse struct { // deprecated, will be removed. Use exchange_token instead. // // Deprecated: deprecated AccessToken string `json:"accessToken"` // exchange_token is a one-time use token that should be exchanged by the runner // for an access token, using the IdentityService.ExchangeToken rpc. The token // expires after 24 hours. ExchangeToken string `json:"exchangeToken"` JSON runnerNewRunnerTokenResponseJSON `json:"-"` }
func (*RunnerNewRunnerTokenResponse) UnmarshalJSON ¶
func (r *RunnerNewRunnerTokenResponse) UnmarshalJSON(data []byte) (err error)
type RunnerParseContextURLParams ¶
type RunnerParseContextURLParams struct { ContextURL param.Field[string] `json:"contextUrl" format:"uri"` RunnerID param.Field[string] `json:"runnerId" format:"uuid"` }
func (RunnerParseContextURLParams) MarshalJSON ¶
func (r RunnerParseContextURLParams) MarshalJSON() (data []byte, err error)
type RunnerParseContextURLResponse ¶
type RunnerParseContextURLResponse struct { Git RunnerParseContextURLResponseGit `json:"git"` OriginalContextURL string `json:"originalContextUrl"` JSON runnerParseContextURLResponseJSON `json:"-"` }
func (*RunnerParseContextURLResponse) UnmarshalJSON ¶
func (r *RunnerParseContextURLResponse) UnmarshalJSON(data []byte) (err error)
type RunnerParseContextURLResponseGit ¶
type RunnerParseContextURLResponseGit struct { Branch string `json:"branch"` CloneURL string `json:"cloneUrl"` Commit string `json:"commit"` Host string `json:"host"` Owner string `json:"owner"` Repo string `json:"repo"` UpstreamRemoteURL string `json:"upstreamRemoteUrl"` JSON runnerParseContextURLResponseGitJSON `json:"-"` }
func (*RunnerParseContextURLResponseGit) UnmarshalJSON ¶
func (r *RunnerParseContextURLResponseGit) UnmarshalJSON(data []byte) (err error)
type RunnerPhase ¶
type RunnerPhase string
RunnerPhase represents the phase a runner is in
const ( RunnerPhaseUnspecified RunnerPhase = "RUNNER_PHASE_UNSPECIFIED" RunnerPhaseCreated RunnerPhase = "RUNNER_PHASE_CREATED" RunnerPhaseInactive RunnerPhase = "RUNNER_PHASE_INACTIVE" RunnerPhaseActive RunnerPhase = "RUNNER_PHASE_ACTIVE" RunnerPhaseDeleting RunnerPhase = "RUNNER_PHASE_DELETING" RunnerPhaseDeleted RunnerPhase = "RUNNER_PHASE_DELETED" RunnerPhaseDegraded RunnerPhase = "RUNNER_PHASE_DEGRADED" )
func (RunnerPhase) IsKnown ¶
func (r RunnerPhase) IsKnown() bool
type RunnerPolicy ¶
type RunnerPolicy struct { GroupID string `json:"groupId" format:"uuid"` // role is the role assigned to the group Role RunnerRole `json:"role"` JSON runnerPolicyJSON `json:"-"` }
func (*RunnerPolicy) UnmarshalJSON ¶
func (r *RunnerPolicy) UnmarshalJSON(data []byte) (err error)
type RunnerPolicyDeleteParams ¶
type RunnerPolicyDeleteParams struct { // group_id specifies the group_id identifier GroupID param.Field[string] `json:"groupId" format:"uuid"` // runner_id specifies the project identifier RunnerID param.Field[string] `json:"runnerId" format:"uuid"` }
func (RunnerPolicyDeleteParams) MarshalJSON ¶
func (r RunnerPolicyDeleteParams) MarshalJSON() (data []byte, err error)
type RunnerPolicyDeleteResponse ¶
type RunnerPolicyDeleteResponse = interface{}
type RunnerPolicyListParams ¶
type RunnerPolicyListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` // pagination contains the pagination options for listing project policies Pagination param.Field[RunnerPolicyListParamsPagination] `json:"pagination"` // runner_id specifies the project identifier RunnerID param.Field[string] `json:"runnerId" format:"uuid"` }
func (RunnerPolicyListParams) MarshalJSON ¶
func (r RunnerPolicyListParams) MarshalJSON() (data []byte, err error)
func (RunnerPolicyListParams) URLQuery ¶
func (r RunnerPolicyListParams) URLQuery() (v url.Values)
URLQuery serializes RunnerPolicyListParams's query parameters as `url.Values`.
type RunnerPolicyListParamsPagination ¶
type RunnerPolicyListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing project policies
func (RunnerPolicyListParamsPagination) MarshalJSON ¶
func (r RunnerPolicyListParamsPagination) MarshalJSON() (data []byte, err error)
type RunnerPolicyNewParams ¶
type RunnerPolicyNewParams struct { // group_id specifies the group_id identifier GroupID param.Field[string] `json:"groupId" format:"uuid"` Role param.Field[RunnerRole] `json:"role"` // runner_id specifies the project identifier RunnerID param.Field[string] `json:"runnerId" format:"uuid"` }
func (RunnerPolicyNewParams) MarshalJSON ¶
func (r RunnerPolicyNewParams) MarshalJSON() (data []byte, err error)
type RunnerPolicyNewResponse ¶
type RunnerPolicyNewResponse struct { Policy RunnerPolicy `json:"policy,required"` JSON runnerPolicyNewResponseJSON `json:"-"` }
func (*RunnerPolicyNewResponse) UnmarshalJSON ¶
func (r *RunnerPolicyNewResponse) UnmarshalJSON(data []byte) (err error)
type RunnerPolicyService ¶
type RunnerPolicyService struct {
Options []option.RequestOption
}
RunnerPolicyService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRunnerPolicyService method instead.
func NewRunnerPolicyService ¶
func NewRunnerPolicyService(opts ...option.RequestOption) (r *RunnerPolicyService)
NewRunnerPolicyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RunnerPolicyService) Delete ¶
func (r *RunnerPolicyService) Delete(ctx context.Context, body RunnerPolicyDeleteParams, opts ...option.RequestOption) (res *RunnerPolicyDeleteResponse, err error)
Deletes a runner policy.
Use this method to:
- Remove access controls - Revoke permissions - Clean up policies
### Examples
- Delete policy:
Removes a group's access policy. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60" ```
func (*RunnerPolicyService) List ¶
func (r *RunnerPolicyService) List(ctx context.Context, params RunnerPolicyListParams, opts ...option.RequestOption) (res *pagination.PoliciesPage[RunnerPolicy], err error)
Lists policies for a runner.
Use this method to:
- View access controls - Check policy configurations - Audit permissions
### Examples
- List policies:
Shows all policies for a runner. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" pagination: pageSize: 20 ```
func (*RunnerPolicyService) ListAutoPaging ¶
func (r *RunnerPolicyService) ListAutoPaging(ctx context.Context, params RunnerPolicyListParams, opts ...option.RequestOption) *pagination.PoliciesPageAutoPager[RunnerPolicy]
Lists policies for a runner.
Use this method to:
- View access controls - Check policy configurations - Audit permissions
### Examples
- List policies:
Shows all policies for a runner. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" pagination: pageSize: 20 ```
func (*RunnerPolicyService) New ¶
func (r *RunnerPolicyService) New(ctx context.Context, body RunnerPolicyNewParams, opts ...option.RequestOption) (res *RunnerPolicyNewResponse, err error)
Creates a new policy for a runner.
Use this method to:
- Set up access controls - Define group permissions - Configure role-based access
### Examples
- Create admin policy:
Grants admin access to a group. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60" role: RUNNER_ROLE_ADMIN ```
func (*RunnerPolicyService) Update ¶
func (r *RunnerPolicyService) Update(ctx context.Context, body RunnerPolicyUpdateParams, opts ...option.RequestOption) (res *RunnerPolicyUpdateResponse, err error)
Updates an existing runner policy.
Use this method to:
- Modify access levels - Change group roles - Update permissions
### Examples
- Update policy role:
Changes a group's access level. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60" role: RUNNER_ROLE_USER ```
type RunnerPolicyUpdateParams ¶
type RunnerPolicyUpdateParams struct { // group_id specifies the group_id identifier GroupID param.Field[string] `json:"groupId" format:"uuid"` Role param.Field[RunnerRole] `json:"role"` // runner_id specifies the project identifier RunnerID param.Field[string] `json:"runnerId" format:"uuid"` }
func (RunnerPolicyUpdateParams) MarshalJSON ¶
func (r RunnerPolicyUpdateParams) MarshalJSON() (data []byte, err error)
type RunnerPolicyUpdateResponse ¶
type RunnerPolicyUpdateResponse struct { Policy RunnerPolicy `json:"policy,required"` JSON runnerPolicyUpdateResponseJSON `json:"-"` }
func (*RunnerPolicyUpdateResponse) UnmarshalJSON ¶
func (r *RunnerPolicyUpdateResponse) UnmarshalJSON(data []byte) (err error)
type RunnerProvider ¶
type RunnerProvider string
RunnerProvider identifies the specific implementation type of a runner. Each provider maps to a specific kind of runner (local or remote), as specified below for each provider.
const ( RunnerProviderUnspecified RunnerProvider = "RUNNER_PROVIDER_UNSPECIFIED" RunnerProviderAwsEc2 RunnerProvider = "RUNNER_PROVIDER_AWS_EC2" RunnerProviderLinuxHost RunnerProvider = "RUNNER_PROVIDER_LINUX_HOST" RunnerProviderDesktopMac RunnerProvider = "RUNNER_PROVIDER_DESKTOP_MAC" )
func (RunnerProvider) IsKnown ¶
func (r RunnerProvider) IsKnown() bool
type RunnerReleaseChannel ¶
type RunnerReleaseChannel string
const ( RunnerReleaseChannelUnspecified RunnerReleaseChannel = "RUNNER_RELEASE_CHANNEL_UNSPECIFIED" RunnerReleaseChannelStable RunnerReleaseChannel = "RUNNER_RELEASE_CHANNEL_STABLE" RunnerReleaseChannelLatest RunnerReleaseChannel = "RUNNER_RELEASE_CHANNEL_LATEST" )
func (RunnerReleaseChannel) IsKnown ¶
func (r RunnerReleaseChannel) IsKnown() bool
type RunnerRole ¶
type RunnerRole string
const ( RunnerRoleUnspecified RunnerRole = "RUNNER_ROLE_UNSPECIFIED" RunnerRoleAdmin RunnerRole = "RUNNER_ROLE_ADMIN" RunnerRoleUser RunnerRole = "RUNNER_ROLE_USER" )
func (RunnerRole) IsKnown ¶
func (r RunnerRole) IsKnown() bool
type RunnerService ¶
type RunnerService struct { Options []option.RequestOption Configurations *RunnerConfigurationService Policies *RunnerPolicyService }
RunnerService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRunnerService method instead.
func NewRunnerService ¶
func NewRunnerService(opts ...option.RequestOption) (r *RunnerService)
NewRunnerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RunnerService) CheckAuthenticationForHost ¶
func (r *RunnerService) CheckAuthenticationForHost(ctx context.Context, body RunnerCheckAuthenticationForHostParams, opts ...option.RequestOption) (res *RunnerCheckAuthenticationForHostResponse, err error)
Checks if a user is authenticated for a specific host.
Use this method to:
- Verify authentication status - Get authentication URLs - Check PAT support
### Examples
- Check authentication:
Verifies authentication for a host. ```yaml host: "github.com" ```
func (*RunnerService) Delete ¶
func (r *RunnerService) Delete(ctx context.Context, body RunnerDeleteParams, opts ...option.RequestOption) (res *RunnerDeleteResponse, err error)
Deletes a runner permanently.
Use this method to:
- Remove unused runners - Clean up runner registrations - Delete obsolete runners
### Examples
- Delete runner:
Permanently removes a runner. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*RunnerService) Get ¶
func (r *RunnerService) Get(ctx context.Context, body RunnerGetParams, opts ...option.RequestOption) (res *RunnerGetResponse, err error)
Gets details about a specific runner.
Use this method to:
- Check runner status - View runner configuration - Monitor runner health - Verify runner capabilities
### Examples
- Get runner details:
Retrieves information about a specific runner. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*RunnerService) List ¶
func (r *RunnerService) List(ctx context.Context, params RunnerListParams, opts ...option.RequestOption) (res *pagination.RunnersPage[Runner], err error)
Lists all registered runners with optional filtering.
Use this method to:
- View all available runners - Filter by runner type - Monitor runner status - Check runner availability
### Examples
- List all runners:
Shows all runners with pagination. ```yaml pagination: pageSize: 20 ```
- Filter by provider:
Lists only AWS EC2 runners. ```yaml filter: providers: ["RUNNER_PROVIDER_AWS_EC2"] pagination: pageSize: 20 ```
func (*RunnerService) ListAutoPaging ¶
func (r *RunnerService) ListAutoPaging(ctx context.Context, params RunnerListParams, opts ...option.RequestOption) *pagination.RunnersPageAutoPager[Runner]
Lists all registered runners with optional filtering.
Use this method to:
- View all available runners - Filter by runner type - Monitor runner status - Check runner availability
### Examples
- List all runners:
Shows all runners with pagination. ```yaml pagination: pageSize: 20 ```
- Filter by provider:
Lists only AWS EC2 runners. ```yaml filter: providers: ["RUNNER_PROVIDER_AWS_EC2"] pagination: pageSize: 20 ```
func (*RunnerService) New ¶
func (r *RunnerService) New(ctx context.Context, body RunnerNewParams, opts ...option.RequestOption) (res *RunnerNewResponse, err error)
Creates a new runner registration with the server. Registrations are very short-lived and must be renewed every 30 seconds.
Use this method to:
- Register organization runners - Set up runner configurations - Initialize runner credentials - Configure auto-updates
### Examples
- Create cloud runner:
Creates a new runner in AWS EC2. ```yaml name: "Production Runner" provider: RUNNER_PROVIDER_AWS_EC2 spec: desiredPhase: RUNNER_PHASE_ACTIVE configuration: region: "us-west" releaseChannel: RUNNER_RELEASE_CHANNEL_STABLE autoUpdate: true ```
- Create local runner:
Creates a new local runner on Linux. ```yaml name: "Local Development Runner" provider: RUNNER_PROVIDER_LINUX_HOST spec: desiredPhase: RUNNER_PHASE_ACTIVE configuration: releaseChannel: RUNNER_RELEASE_CHANNEL_LATEST autoUpdate: true ```
func (*RunnerService) NewRunnerToken ¶
func (r *RunnerService) NewRunnerToken(ctx context.Context, body RunnerNewRunnerTokenParams, opts ...option.RequestOption) (res *RunnerNewRunnerTokenResponse, err error)
Creates a new authentication token for a runner.
Use this method to:
- Generate runner credentials - Renew expired tokens - Set up runner authentication
Note: This does not expire previously issued tokens.
### Examples
- Create token:
Creates a new token for runner authentication. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*RunnerService) ParseContextURL ¶
func (r *RunnerService) ParseContextURL(ctx context.Context, body RunnerParseContextURLParams, opts ...option.RequestOption) (res *RunnerParseContextURLResponse, err error)
Parses a context URL and returns the parsed result.
Use this method to:
- Validate context URLs - Check repository access - Verify branch existence
Returns:
- FAILED_PRECONDITION if authentication is required - PERMISSION_DENIED if access is not allowed - INVALID_ARGUMENT if URL is invalid - NOT_FOUND if repository/branch doesn't exist
### Examples
- Parse URL:
Parses and validates a context URL. ```yaml contextUrl: "https://github.com/org/repo/tree/main" ```
func (*RunnerService) Update ¶
func (r *RunnerService) Update(ctx context.Context, body RunnerUpdateParams, opts ...option.RequestOption) (res *RunnerUpdateResponse, err error)
Updates a runner's configuration.
Use this method to:
- Modify runner settings - Update release channels - Change runner status - Configure auto-update settings
### Examples
- Update configuration:
Changes runner settings. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" name: "Updated Runner Name" spec: configuration: releaseChannel: RUNNER_RELEASE_CHANNEL_LATEST autoUpdate: true ```
type RunnerSpec ¶
type RunnerSpec struct { // The runner's configuration Configuration RunnerConfiguration `json:"configuration"` // RunnerPhase represents the phase a runner is in DesiredPhase RunnerPhase `json:"desiredPhase"` JSON runnerSpecJSON `json:"-"` }
func (*RunnerSpec) UnmarshalJSON ¶
func (r *RunnerSpec) UnmarshalJSON(data []byte) (err error)
type RunnerSpecParam ¶
type RunnerSpecParam struct { // The runner's configuration Configuration param.Field[RunnerConfigurationParam] `json:"configuration"` // RunnerPhase represents the phase a runner is in DesiredPhase param.Field[RunnerPhase] `json:"desiredPhase"` }
func (RunnerSpecParam) MarshalJSON ¶
func (r RunnerSpecParam) MarshalJSON() (data []byte, err error)
type RunnerStatus ¶
type RunnerStatus struct { // additional_info contains additional information about the runner, e.g. a // CloudFormation stack URL. AdditionalInfo []shared.FieldValue `json:"additionalInfo"` // capabilities is a list of capabilities the runner supports. Capabilities []RunnerCapability `json:"capabilities"` LogURL string `json:"logUrl"` // The runner's reported message which is shown to users. This message adds more // context to the runner's phase. Message string `json:"message"` // The runner's reported phase Phase RunnerPhase `json:"phase"` // region is the region the runner is running in, if applicable. Region string `json:"region"` SystemDetails string `json:"systemDetails"` // Time when the status was last udpated. UpdatedAt time.Time `json:"updatedAt" format:"date-time"` Version string `json:"version"` JSON runnerStatusJSON `json:"-"` }
RunnerStatus represents the status of a runner
func (*RunnerStatus) UnmarshalJSON ¶
func (r *RunnerStatus) UnmarshalJSON(data []byte) (err error)
type RunnerUpdateParams ¶
type RunnerUpdateParams struct { // The runner's name which is shown to users Name param.Field[string] `json:"name"` // runner_id specifies which runner to be updated. // // +required RunnerID param.Field[string] `json:"runnerId" format:"uuid"` Spec param.Field[RunnerUpdateParamsSpec] `json:"spec"` }
func (RunnerUpdateParams) MarshalJSON ¶
func (r RunnerUpdateParams) MarshalJSON() (data []byte, err error)
type RunnerUpdateParamsSpec ¶
type RunnerUpdateParamsSpec struct { Configuration param.Field[RunnerUpdateParamsSpecConfiguration] `json:"configuration"` // desired_phase can currently only be updated on local-configuration runners, to // toggle whether local runners are allowed for running environments in the // organization. Set to: // // - ACTIVE to enable local runners. // - INACTIVE to disable all local runners. Existing local runners and their // environments will stop, and cannot be started again until the desired_phase is // set to ACTIVE. Use this carefully, as it will affect all users in the // organization who use local runners. DesiredPhase param.Field[RunnerPhase] `json:"desiredPhase"` }
func (RunnerUpdateParamsSpec) MarshalJSON ¶
func (r RunnerUpdateParamsSpec) MarshalJSON() (data []byte, err error)
type RunnerUpdateParamsSpecConfiguration ¶
type RunnerUpdateParamsSpecConfiguration struct { // auto_update indicates whether the runner should automatically update itself. AutoUpdate param.Field[bool] `json:"autoUpdate"` // The release channel the runner is on ReleaseChannel param.Field[RunnerReleaseChannel] `json:"releaseChannel"` }
func (RunnerUpdateParamsSpecConfiguration) MarshalJSON ¶
func (r RunnerUpdateParamsSpecConfiguration) MarshalJSON() (data []byte, err error)
type RunnerUpdateResponse ¶
type RunnerUpdateResponse = interface{}
type RunsOnDockerParam ¶
type RunsOnDockerParam = shared.RunsOnDockerParam
This is an alias to an internal type.
type SSOConfiguration ¶
type SSOConfiguration struct { // id is the unique identifier of the SSO configuration ID string `json:"id,required" format:"uuid"` // issuer_url is the URL of the IdP issuer IssuerURL string `json:"issuerUrl,required"` OrganizationID string `json:"organizationId,required" format:"uuid"` // provider_type defines the type of the SSO configuration ProviderType ProviderType `json:"providerType,required"` // state is the state of the SSO configuration State SSOConfigurationState `json:"state,required"` // claims are key/value pairs that defines a mapping of claims issued by the IdP. Claims map[string]string `json:"claims"` // client_id is the client ID of the OIDC application set on the IdP ClientID string `json:"clientId"` EmailDomain string `json:"emailDomain"` JSON ssoConfigurationJSON `json:"-"` }
func (*SSOConfiguration) UnmarshalJSON ¶
func (r *SSOConfiguration) UnmarshalJSON(data []byte) (err error)
type SSOConfigurationState ¶
type SSOConfigurationState string
const ( SSOConfigurationStateUnspecified SSOConfigurationState = "SSO_CONFIGURATION_STATE_UNSPECIFIED" SSOConfigurationStateInactive SSOConfigurationState = "SSO_CONFIGURATION_STATE_INACTIVE" SSOConfigurationStateActive SSOConfigurationState = "SSO_CONFIGURATION_STATE_ACTIVE" )
func (SSOConfigurationState) IsKnown ¶
func (r SSOConfigurationState) IsKnown() bool
type ScmIntegration ¶
type ScmIntegration struct { // id is the unique identifier of the SCM integration ID string `json:"id"` Host string `json:"host"` OAuth ScmIntegrationOAuthConfig `json:"oauth,nullable"` Pat bool `json:"pat"` RunnerID string `json:"runnerId"` // scm_id references the scm_id in the runner's configuration schema that this // integration is for ScmID string `json:"scmId"` JSON scmIntegrationJSON `json:"-"` }
func (*ScmIntegration) UnmarshalJSON ¶
func (r *ScmIntegration) UnmarshalJSON(data []byte) (err error)
type ScmIntegrationOAuthConfig ¶
type ScmIntegrationOAuthConfig struct { // client_id is the OAuth app's client ID in clear text. ClientID string `json:"clientId"` // encrypted_client_secret is the OAuth app's secret encrypted with the runner's // public key. EncryptedClientSecret string `json:"encryptedClientSecret" format:"byte"` JSON scmIntegrationOAuthConfigJSON `json:"-"` }
func (*ScmIntegrationOAuthConfig) UnmarshalJSON ¶
func (r *ScmIntegrationOAuthConfig) UnmarshalJSON(data []byte) (err error)
type ScmIntegrationValidationResult ¶
type ScmIntegrationValidationResult struct { HostError string `json:"hostError,nullable"` OAuthError string `json:"oauthError,nullable"` PatError string `json:"patError,nullable"` ScmIDError string `json:"scmIdError,nullable"` Valid bool `json:"valid"` JSON scmIntegrationValidationResultJSON `json:"-"` }
func (*ScmIntegrationValidationResult) UnmarshalJSON ¶
func (r *ScmIntegrationValidationResult) UnmarshalJSON(data []byte) (err error)
type Secret ¶
type Secret struct { ID string `json:"id" format:"uuid"` // secret will be mounted as a registry secret ContainerRegistryBasicAuthHost string `json:"containerRegistryBasicAuthHost" format:"uri"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. CreatedAt time.Time `json:"createdAt" format:"date-time"` // creator is the identity of the creator of the secret Creator shared.Subject `json:"creator"` // secret will be created as an Environment Variable with the same name as the // secret EnvironmentVariable bool `json:"environmentVariable"` // absolute path to the file where the secret is mounted FilePath string `json:"filePath"` // Name of the secret for humans. Name string `json:"name"` // The Project ID this Secret belongs to ProjectID string `json:"projectId" format:"uuid"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar // backwards to year one. // // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap // second table is needed for interpretation, using a // [24-hour linear smear](https://developers.google.com/time/smear). // // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By // restricting to that range, we ensure that we can convert to and from // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // // Example 1: Compute Timestamp from POSIX `time()`. // // Timestamp timestamp; // timestamp.set_seconds(time(NULL)); // timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // // struct timeval tv; // gettimeofday(&tv, NULL); // // Timestamp timestamp; // timestamp.set_seconds(tv.tv_sec); // timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // // FILETIME ft; // GetSystemTimeAsFileTime(&ft); // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. // Timestamp timestamp; // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // // long millis = System.currentTimeMillis(); // // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) // .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // // Instant now = Instant.now(); // // Timestamp timestamp = // Timestamp.newBuilder().setSeconds(now.getEpochSecond()) // .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // // timestamp = Timestamp() // timestamp.GetCurrentTime() // // # JSON Mapping // // In JSON format, the Timestamp type is encoded as a string in the // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are // zero-padded to two digits each. The fractional seconds, which can go up to 9 // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON // serializer should always use UTC (as indicated by "Z") when printing the // Timestamp type and a proto3 JSON parser should be able to accept both UTC and // other timezones (as indicated by an offset). // // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on // January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the standard // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted to // this format using // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the // Joda Time's // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>) // to obtain a formatter capable of generating timestamps in this format. UpdatedAt time.Time `json:"updatedAt" format:"date-time"` JSON secretJSON `json:"-"` }
func (*Secret) UnmarshalJSON ¶
type SecretDeleteParams ¶
func (SecretDeleteParams) MarshalJSON ¶
func (r SecretDeleteParams) MarshalJSON() (data []byte, err error)
type SecretDeleteResponse ¶
type SecretDeleteResponse = interface{}
type SecretGetValueParams ¶
func (SecretGetValueParams) MarshalJSON ¶
func (r SecretGetValueParams) MarshalJSON() (data []byte, err error)
type SecretGetValueResponse ¶
type SecretGetValueResponse struct { Value string `json:"value"` JSON secretGetValueResponseJSON `json:"-"` }
func (*SecretGetValueResponse) UnmarshalJSON ¶
func (r *SecretGetValueResponse) UnmarshalJSON(data []byte) (err error)
type SecretListParams ¶
type SecretListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` Filter param.Field[SecretListParamsFilter] `json:"filter"` // pagination contains the pagination options for listing environments Pagination param.Field[SecretListParamsPagination] `json:"pagination"` }
func (SecretListParams) MarshalJSON ¶
func (r SecretListParams) MarshalJSON() (data []byte, err error)
func (SecretListParams) URLQuery ¶
func (r SecretListParams) URLQuery() (v url.Values)
URLQuery serializes SecretListParams's query parameters as `url.Values`.
type SecretListParamsFilter ¶
type SecretListParamsFilter struct { // project_ids filters the response to only Secrets used by these Project IDs ProjectIDs param.Field[[]string] `json:"projectIds" format:"uuid"` }
func (SecretListParamsFilter) MarshalJSON ¶
func (r SecretListParamsFilter) MarshalJSON() (data []byte, err error)
type SecretListParamsPagination ¶
type SecretListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
pagination contains the pagination options for listing environments
func (SecretListParamsPagination) MarshalJSON ¶
func (r SecretListParamsPagination) MarshalJSON() (data []byte, err error)
type SecretNewParams ¶
type SecretNewParams struct { // secret will be mounted as a docker config in the environment VM, mount will have // the docker registry host value must be a valid registry host (e.g. // registry.docker.com, https://registry.docker.com, ghcr.io:5050): // // “` // this.matches('^[a-zA-Z0-9.-/:]+(:[0-9]+)?$') // “` ContainerRegistryBasicAuthHost param.Field[string] `json:"containerRegistryBasicAuthHost"` // secret will be created as an Environment Variable with the same name as the // secret EnvironmentVariable param.Field[bool] `json:"environmentVariable"` // absolute path to the file where the secret is mounted value must be an absolute // path (start with a /): // // “` // this.matches('^/(?:[^/]*/)*.*$') // “` FilePath param.Field[string] `json:"filePath"` Name param.Field[string] `json:"name"` // project_id is the ProjectID this Secret belongs to ProjectID param.Field[string] `json:"projectId" format:"uuid"` // value is the plaintext value of the secret Value param.Field[string] `json:"value"` }
func (SecretNewParams) MarshalJSON ¶
func (r SecretNewParams) MarshalJSON() (data []byte, err error)
type SecretNewResponse ¶
type SecretNewResponse struct { Secret Secret `json:"secret"` JSON secretNewResponseJSON `json:"-"` }
func (*SecretNewResponse) UnmarshalJSON ¶
func (r *SecretNewResponse) UnmarshalJSON(data []byte) (err error)
type SecretService ¶
type SecretService struct {
Options []option.RequestOption
}
SecretService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSecretService method instead.
func NewSecretService ¶
func NewSecretService(opts ...option.RequestOption) (r *SecretService)
NewSecretService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SecretService) Delete ¶
func (r *SecretService) Delete(ctx context.Context, body SecretDeleteParams, opts ...option.RequestOption) (res *SecretDeleteResponse, err error)
Deletes a secret permanently.
Use this method to:
- Remove unused secrets - Clean up old credentials
### Examples
- Delete secret:
Permanently removes a secret. ```yaml secretId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*SecretService) GetValue ¶
func (r *SecretService) GetValue(ctx context.Context, body SecretGetValueParams, opts ...option.RequestOption) (res *SecretGetValueResponse, err error)
Gets the value of a secret. Only available to environments that are authorized to access the secret.
Use this method to:
- Retrieve secret values - Access credentials
### Examples
- Get secret value:
Retrieves the value of a specific secret. ```yaml secretId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*SecretService) List ¶
func (r *SecretService) List(ctx context.Context, params SecretListParams, opts ...option.RequestOption) (res *pagination.SecretsPage[Secret], err error)
Lists secrets with optional filtering.
Use this method to:
- View all project secrets - Filter secrets by project
### Examples
- List project secrets:
Shows all secrets for a project. ```yaml filter: projectIds: ["b0e12f6c-4c67-429d-a4a6-d9838b5da047"] pagination: pageSize: 20 ```
func (*SecretService) ListAutoPaging ¶
func (r *SecretService) ListAutoPaging(ctx context.Context, params SecretListParams, opts ...option.RequestOption) *pagination.SecretsPageAutoPager[Secret]
Lists secrets with optional filtering.
Use this method to:
- View all project secrets - Filter secrets by project
### Examples
- List project secrets:
Shows all secrets for a project. ```yaml filter: projectIds: ["b0e12f6c-4c67-429d-a4a6-d9838b5da047"] pagination: pageSize: 20 ```
func (*SecretService) New ¶
func (r *SecretService) New(ctx context.Context, body SecretNewParams, opts ...option.RequestOption) (res *SecretNewResponse, err error)
Creates a new secret for a project.
Use this method to:
- Store sensitive configuration values - Set up environment variables - Configure registry authentication - Add file-based secrets
### Examples
- Create environment variable:
Creates a secret that will be available as an environment variable. ```yaml name: "DATABASE_URL" projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" value: "postgresql://user:pass@localhost:5432/db" environmentVariable: true ```
- Create file secret:
Creates a secret that will be mounted as a file. ```yaml name: "SSH_KEY" projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" value: "-----BEGIN RSA PRIVATE KEY-----\n..." filePath: "/home/gitpod/.ssh/id_rsa" ```
- Create registry auth:
Creates credentials for private container registry. ```yaml name: "DOCKER_AUTH" projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" value: "username:password" containerRegistryBasicAuthHost: "https://registry.example.com" ```
func (*SecretService) UpdateValue ¶
func (r *SecretService) UpdateValue(ctx context.Context, body SecretUpdateValueParams, opts ...option.RequestOption) (res *SecretUpdateValueResponse, err error)
Updates the value of an existing secret.
Use this method to:
- Rotate secret values - Update credentials
### Examples
- Update secret value:
Changes the value of an existing secret. ```yaml secretId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" value: "new-secret-value" ```
type SecretUpdateValueParams ¶
type SecretUpdateValueParams struct { SecretID param.Field[string] `json:"secretId" format:"uuid"` // value is the plaintext value of the secret Value param.Field[string] `json:"value"` }
func (SecretUpdateValueParams) MarshalJSON ¶
func (r SecretUpdateValueParams) MarshalJSON() (data []byte, err error)
type SecretUpdateValueResponse ¶
type SecretUpdateValueResponse = interface{}
type Service ¶
type Service struct { ID string `json:"id,required" format:"uuid"` EnvironmentID string `json:"environmentId" format:"uuid"` Metadata ServiceMetadata `json:"metadata"` Spec ServiceSpec `json:"spec"` Status ServiceStatus `json:"status"` JSON serviceJSON `json:"-"` }
func (*Service) UnmarshalJSON ¶
type ServiceMetadata ¶
type ServiceMetadata struct { // created_at is the time the service was created. CreatedAt time.Time `json:"createdAt" format:"date-time"` // creator describes the principal who created the service. Creator shared.Subject `json:"creator"` // description is a user-facing description for the service. It can be used to // provide context and documentation for the service. Description string `json:"description"` // name is a user-facing name for the service. Unlike the reference, this field is // not unique, and not referenced by the system. This is a short descriptive name // for the service. Name string `json:"name"` // reference is a user-facing identifier for the service which must be unique on // the environment. It is used to express dependencies between services, and to // identify the service in user interactions (e.g. the CLI). Reference string `json:"reference"` // triggered_by is a list of trigger that start the service. TriggeredBy []shared.AutomationTrigger `json:"triggeredBy"` JSON serviceMetadataJSON `json:"-"` }
func (*ServiceMetadata) UnmarshalJSON ¶
func (r *ServiceMetadata) UnmarshalJSON(data []byte) (err error)
type ServiceMetadataParam ¶
type ServiceMetadataParam struct { // created_at is the time the service was created. CreatedAt param.Field[time.Time] `json:"createdAt" format:"date-time"` // creator describes the principal who created the service. Creator param.Field[shared.SubjectParam] `json:"creator"` // description is a user-facing description for the service. It can be used to // provide context and documentation for the service. Description param.Field[string] `json:"description"` // name is a user-facing name for the service. Unlike the reference, this field is // not unique, and not referenced by the system. This is a short descriptive name // for the service. Name param.Field[string] `json:"name"` // reference is a user-facing identifier for the service which must be unique on // the environment. It is used to express dependencies between services, and to // identify the service in user interactions (e.g. the CLI). Reference param.Field[string] `json:"reference"` // triggered_by is a list of trigger that start the service. TriggeredBy param.Field[[]shared.AutomationTriggerParam] `json:"triggeredBy"` }
func (ServiceMetadataParam) MarshalJSON ¶
func (r ServiceMetadataParam) MarshalJSON() (data []byte, err error)
type ServicePhase ¶
type ServicePhase string
const ( ServicePhaseUnspecified ServicePhase = "SERVICE_PHASE_UNSPECIFIED" ServicePhaseStarting ServicePhase = "SERVICE_PHASE_STARTING" ServicePhaseRunning ServicePhase = "SERVICE_PHASE_RUNNING" ServicePhaseStopping ServicePhase = "SERVICE_PHASE_STOPPING" ServicePhaseStopped ServicePhase = "SERVICE_PHASE_STOPPED" ServicePhaseFailed ServicePhase = "SERVICE_PHASE_FAILED" ServicePhaseDeleted ServicePhase = "SERVICE_PHASE_DELETED" )
func (ServicePhase) IsKnown ¶
func (r ServicePhase) IsKnown() bool
type ServiceSpec ¶
type ServiceSpec struct { // commands contains the commands to start, stop and check the readiness of the // service Commands ServiceSpecCommands `json:"commands"` // desired_phase is the phase the service should be in. Used to start or stop the // service. DesiredPhase ServicePhase `json:"desiredPhase"` // runs_on specifies the environment the service should run on. RunsOn shared.RunsOn `json:"runsOn"` // session should be changed to trigger a restart of the service. If a service // exits it will not be restarted until the session is changed. Session string `json:"session"` // version of the spec. The value of this field has no semantic meaning (e.g. don't // interpret it as as a timestamp), but it can be used to impose a partial order. // If a.spec_version < b.spec_version then a was the spec before b. SpecVersion string `json:"specVersion"` JSON serviceSpecJSON `json:"-"` }
func (*ServiceSpec) UnmarshalJSON ¶
func (r *ServiceSpec) UnmarshalJSON(data []byte) (err error)
type ServiceSpecCommands ¶
type ServiceSpecCommands struct { // ready is an optional command that is run repeatedly until it exits with a zero // exit code. If set, the service will first go into a Starting phase, and then // into a Running phase once the ready command exits with a zero exit code. Ready string `json:"ready"` // start is the command to start and run the service. If start exits, the service // will transition to the following phase: // // - Stopped: if the exit code is 0 // - Failed: if the exit code is not 0 If the stop command is not set, the start // command will receive a SIGTERM signal when the service is requested to stop. // If it does not exit within 2 minutes, it will receive a SIGKILL signal. Start string `json:"start"` // stop is an optional command that runs when the service is requested to stop. If // set, instead of sending a SIGTERM signal to the start command, the stop command // will be run. Once the stop command exits, the start command will receive a // SIGKILL signal. If the stop command exits with a non-zero exit code, the service // will transition to the Failed phase. If the stop command does not exit within 2 // minutes, a SIGKILL signal will be sent to both the start and stop commands. Stop string `json:"stop"` JSON serviceSpecCommandsJSON `json:"-"` }
commands contains the commands to start, stop and check the readiness of the service
func (*ServiceSpecCommands) UnmarshalJSON ¶
func (r *ServiceSpecCommands) UnmarshalJSON(data []byte) (err error)
type ServiceSpecCommandsParam ¶
type ServiceSpecCommandsParam struct { // ready is an optional command that is run repeatedly until it exits with a zero // exit code. If set, the service will first go into a Starting phase, and then // into a Running phase once the ready command exits with a zero exit code. Ready param.Field[string] `json:"ready"` // start is the command to start and run the service. If start exits, the service // will transition to the following phase: // // - Stopped: if the exit code is 0 // - Failed: if the exit code is not 0 If the stop command is not set, the start // command will receive a SIGTERM signal when the service is requested to stop. // If it does not exit within 2 minutes, it will receive a SIGKILL signal. Start param.Field[string] `json:"start"` // stop is an optional command that runs when the service is requested to stop. If // set, instead of sending a SIGTERM signal to the start command, the stop command // will be run. Once the stop command exits, the start command will receive a // SIGKILL signal. If the stop command exits with a non-zero exit code, the service // will transition to the Failed phase. If the stop command does not exit within 2 // minutes, a SIGKILL signal will be sent to both the start and stop commands. Stop param.Field[string] `json:"stop"` }
commands contains the commands to start, stop and check the readiness of the service
func (ServiceSpecCommandsParam) MarshalJSON ¶
func (r ServiceSpecCommandsParam) MarshalJSON() (data []byte, err error)
type ServiceSpecParam ¶
type ServiceSpecParam struct { // commands contains the commands to start, stop and check the readiness of the // service Commands param.Field[ServiceSpecCommandsParam] `json:"commands"` // desired_phase is the phase the service should be in. Used to start or stop the // service. DesiredPhase param.Field[ServicePhase] `json:"desiredPhase"` // runs_on specifies the environment the service should run on. RunsOn param.Field[shared.RunsOnParam] `json:"runsOn"` // session should be changed to trigger a restart of the service. If a service // exits it will not be restarted until the session is changed. Session param.Field[string] `json:"session"` // version of the spec. The value of this field has no semantic meaning (e.g. don't // interpret it as as a timestamp), but it can be used to impose a partial order. // If a.spec_version < b.spec_version then a was the spec before b. SpecVersion param.Field[string] `json:"specVersion"` }
func (ServiceSpecParam) MarshalJSON ¶
func (r ServiceSpecParam) MarshalJSON() (data []byte, err error)
type ServiceStatus ¶
type ServiceStatus struct { // failure_message summarises why the service failed to operate. If this is // non-empty the service has failed to operate and will likely transition to a // failed state. FailureMessage string `json:"failureMessage"` // log_url contains the URL at which the service logs can be accessed. LogURL string `json:"logUrl"` // phase is the current phase of the service. Phase ServicePhase `json:"phase"` // session is the current session of the service. Session string `json:"session"` // version of the status update. Service instances themselves are unversioned, but // their status has different versions. The value of this field has no semantic // meaning (e.g. don't interpret it as as a timestamp), but it can be used to // impose a partial order. If a.status_version < b.status_version then a was the // status before b. StatusVersion string `json:"statusVersion"` JSON serviceStatusJSON `json:"-"` }
func (*ServiceStatus) UnmarshalJSON ¶
func (r *ServiceStatus) UnmarshalJSON(data []byte) (err error)
type TaskExecution ¶
type TaskExecution = shared.TaskExecution
This is an alias to an internal type.
type TaskExecutionMetadata ¶
type TaskExecutionMetadata = shared.TaskExecutionMetadata
This is an alias to an internal type.
type TaskExecutionPhase ¶
type TaskExecutionPhase = shared.TaskExecutionPhase
This is an alias to an internal type.
type TaskExecutionSpec ¶
type TaskExecutionSpec = shared.TaskExecutionSpec
This is an alias to an internal type.
type TaskExecutionSpecPlan ¶
type TaskExecutionSpecPlan = shared.TaskExecutionSpecPlan
This is an alias to an internal type.
type TaskExecutionSpecPlanStep ¶
type TaskExecutionSpecPlanStep = shared.TaskExecutionSpecPlanStep
This is an alias to an internal type.
type TaskExecutionSpecPlanStepsTask ¶
type TaskExecutionSpecPlanStepsTask = shared.TaskExecutionSpecPlanStepsTask
This is an alias to an internal type.
type TaskExecutionStatus ¶
type TaskExecutionStatus = shared.TaskExecutionStatus
This is an alias to an internal type.
type TaskExecutionStatusStep ¶
type TaskExecutionStatusStep = shared.TaskExecutionStatusStep
This is an alias to an internal type.
type TaskMetadataParam ¶
type TaskMetadataParam = shared.TaskMetadataParam
This is an alias to an internal type.
type TaskSpecParam ¶
type TaskSpecParam = shared.TaskSpecParam
This is an alias to an internal type.
type User ¶
type User struct { // id is a UUID of the user ID string `json:"id,required" format:"uuid"` // avatar_url is a link to the user avatar AvatarURL string `json:"avatarUrl"` // created_at is the creation time CreatedAt time.Time `json:"createdAt" format:"date-time"` // name is the full name of the user Name string `json:"name"` // organization_id is the id of the organization this account is owned by. // // +optional if not set, this account is owned by the installation. OrganizationID string `json:"organizationId" format:"uuid"` // status is the status the user is in Status shared.UserStatus `json:"status"` JSON userJSON `json:"-"` }
func (*User) UnmarshalJSON ¶
type UserGetAuthenticatedUserParams ¶
func (UserGetAuthenticatedUserParams) MarshalJSON ¶
func (r UserGetAuthenticatedUserParams) MarshalJSON() (data []byte, err error)
type UserGetAuthenticatedUserResponse ¶
type UserGetAuthenticatedUserResponse struct { User User `json:"user,required"` JSON userGetAuthenticatedUserResponseJSON `json:"-"` }
func (*UserGetAuthenticatedUserResponse) UnmarshalJSON ¶
func (r *UserGetAuthenticatedUserResponse) UnmarshalJSON(data []byte) (err error)
type UserPatDeleteParams ¶
type UserPatDeleteParams struct {
PersonalAccessTokenID param.Field[string] `json:"personalAccessTokenId" format:"uuid"`
}
func (UserPatDeleteParams) MarshalJSON ¶
func (r UserPatDeleteParams) MarshalJSON() (data []byte, err error)
type UserPatDeleteResponse ¶
type UserPatDeleteResponse = interface{}
type UserPatGetParams ¶
type UserPatGetParams struct {
PersonalAccessTokenID param.Field[string] `json:"personalAccessTokenId" format:"uuid"`
}
func (UserPatGetParams) MarshalJSON ¶
func (r UserPatGetParams) MarshalJSON() (data []byte, err error)
type UserPatGetResponse ¶
type UserPatGetResponse struct { Pat PersonalAccessToken `json:"pat,required"` JSON userPatGetResponseJSON `json:"-"` }
func (*UserPatGetResponse) UnmarshalJSON ¶
func (r *UserPatGetResponse) UnmarshalJSON(data []byte) (err error)
type UserPatListParams ¶
type UserPatListParams struct { Token param.Field[string] `query:"token"` PageSize param.Field[int64] `query:"pageSize"` Filter param.Field[UserPatListParamsFilter] `json:"filter"` Pagination param.Field[UserPatListParamsPagination] `json:"pagination"` }
func (UserPatListParams) MarshalJSON ¶
func (r UserPatListParams) MarshalJSON() (data []byte, err error)
func (UserPatListParams) URLQuery ¶
func (r UserPatListParams) URLQuery() (v url.Values)
URLQuery serializes UserPatListParams's query parameters as `url.Values`.
type UserPatListParamsFilter ¶
type UserPatListParamsFilter struct { // creator_ids filters the response to only Environments created by specified // members UserIDs param.Field[[]string] `json:"userIds" format:"uuid"` }
func (UserPatListParamsFilter) MarshalJSON ¶
func (r UserPatListParamsFilter) MarshalJSON() (data []byte, err error)
type UserPatListParamsPagination ¶
type UserPatListParamsPagination struct { // Token for the next set of results that was returned as next_token of a // PaginationResponse Token param.Field[string] `json:"token"` // Page size is the maximum number of results to retrieve per page. Defaults to 25. // Maximum 100. PageSize param.Field[int64] `json:"pageSize"` }
func (UserPatListParamsPagination) MarshalJSON ¶
func (r UserPatListParamsPagination) MarshalJSON() (data []byte, err error)
type UserPatService ¶
type UserPatService struct {
Options []option.RequestOption
}
UserPatService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserPatService method instead.
func NewUserPatService ¶
func NewUserPatService(opts ...option.RequestOption) (r *UserPatService)
NewUserPatService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*UserPatService) Delete ¶
func (r *UserPatService) Delete(ctx context.Context, body UserPatDeleteParams, opts ...option.RequestOption) (res *UserPatDeleteResponse, err error)
Deletes a personal access token.
Use this method to:
- Revoke token access - Remove unused tokens - Rotate credentials
### Examples
- Delete token:
Permanently revokes a token. ```yaml personalAccessTokenId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*UserPatService) Get ¶
func (r *UserPatService) Get(ctx context.Context, body UserPatGetParams, opts ...option.RequestOption) (res *UserPatGetResponse, err error)
Gets details about a specific personal access token.
Use this method to:
- View token metadata - Check token expiration - Monitor token usage
### Examples
- Get token details:
Retrieves information about a specific token. ```yaml personalAccessTokenId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
func (*UserPatService) List ¶
func (r *UserPatService) List(ctx context.Context, params UserPatListParams, opts ...option.RequestOption) (res *pagination.PersonalAccessTokensPage[PersonalAccessToken], err error)
Lists personal access tokens with optional filtering.
Use this method to:
- View all active tokens - Audit token usage - Manage token lifecycle
### Examples
- List user tokens:
Shows all tokens for specific users. ```yaml filter: userIds: ["f53d2330-3795-4c5d-a1f3-453121af9c60"] pagination: pageSize: 20 ```
func (*UserPatService) ListAutoPaging ¶
func (r *UserPatService) ListAutoPaging(ctx context.Context, params UserPatListParams, opts ...option.RequestOption) *pagination.PersonalAccessTokensPageAutoPager[PersonalAccessToken]
Lists personal access tokens with optional filtering.
Use this method to:
- View all active tokens - Audit token usage - Manage token lifecycle
### Examples
- List user tokens:
Shows all tokens for specific users. ```yaml filter: userIds: ["f53d2330-3795-4c5d-a1f3-453121af9c60"] pagination: pageSize: 20 ```
type UserService ¶
type UserService struct { Options []option.RequestOption Pats *UserPatService }
UserService contains methods and other services that help with interacting with the gitpod API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserService method instead.
func NewUserService ¶
func NewUserService(opts ...option.RequestOption) (r *UserService)
NewUserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*UserService) GetAuthenticatedUser ¶
func (r *UserService) GetAuthenticatedUser(ctx context.Context, body UserGetAuthenticatedUserParams, opts ...option.RequestOption) (res *UserGetAuthenticatedUserResponse, err error)
Gets information about the currently authenticated user.
Use this method to:
- Get user profile information - Check authentication status - Retrieve user settings - Verify account details
### Examples
- Get current user:
Retrieves details about the authenticated user. ```yaml {} ```
func (*UserService) SetSuspended ¶
func (r *UserService) SetSuspended(ctx context.Context, body UserSetSuspendedParams, opts ...option.RequestOption) (res *UserSetSuspendedResponse, err error)
Sets whether a user account is suspended.
Use this method to:
- Suspend problematic users - Reactivate suspended accounts - Manage user access
### Examples
- Suspend user:
Suspends a user account. ```yaml userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" suspended: true ```
- Reactivate user:
Removes suspension from a user account. ```yaml userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" suspended: false ```
type UserSetSuspendedParams ¶
type UserSetSuspendedParams struct { Suspended param.Field[bool] `json:"suspended"` UserID param.Field[string] `json:"userId" format:"uuid"` }
func (UserSetSuspendedParams) MarshalJSON ¶
func (r UserSetSuspendedParams) MarshalJSON() (data []byte, err error)
type UserSetSuspendedResponse ¶
type UserSetSuspendedResponse = interface{}
Source Files
¶
- account.go
- aliases.go
- client.go
- editor.go
- environment.go
- environmentautomation.go
- environmentautomationservice.go
- environmentautomationtask.go
- environmentautomationtaskexecution.go
- environmentclass.go
- event.go
- field.go
- group.go
- identity.go
- organization.go
- organizationdomainverification.go
- organizationinvite.go
- organizationssoconfiguration.go
- project.go
- projectpolicy.go
- runner.go
- runnerconfiguration.go
- runnerconfigurationenvironmentclass.go
- runnerconfigurationhostauthenticationtoken.go
- runnerconfigurationschema.go
- runnerconfigurationscmintegration.go
- runnerpolicy.go
- secret.go
- user.go
- userpat.go