Documentation
¶
Index ¶
- Constants
- func Bool(value bool) param.Field[bool]
- func DefaultClientOptions() []option.RequestOption
- 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 AccountListJoinableOrganizationsParams
- type AccountListJoinableOrganizationsParamsPagination
- type AccountListLoginProvidersParams
- type AccountListLoginProvidersParamsFilter
- type AccountListLoginProvidersParamsPagination
- type AccountListSSOLoginsParams
- type AccountListSSOLoginsParamsPagination
- type AccountListSSOLoginsResponse
- 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) ListJoinableOrganizations(ctx context.Context, params AccountListJoinableOrganizationsParams, ...) (res *pagination.JoinableOrganizationsPage[JoinableOrganization], err error)
- func (r *AccountService) ListJoinableOrganizationsAutoPaging(ctx context.Context, params AccountListJoinableOrganizationsParams, ...) *pagination.JoinableOrganizationsPageAutoPager[JoinableOrganization]
- 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]
- func (r *AccountService) ListSSOLogins(ctx context.Context, params AccountListSSOLoginsParams, ...) (res *pagination.LoginsPage[AccountListSSOLoginsResponse], err error)
- func (r *AccountService) ListSSOLoginsAutoPaging(ctx context.Context, params AccountListSSOLoginsParams, ...) *pagination.LoginsPageAutoPager[AccountListSSOLoginsResponse]
- type AdmissionLevel
- type AgentCodeContext
- type AgentCodeContextContextURL
- type AgentCodeContextContextURLParam
- type AgentCodeContextParam
- type AgentCodeContextPullRequest
- type AgentCodeContextPullRequestParam
- type AgentCodeContextPullRequestRepository
- type AgentCodeContextPullRequestRepositoryParam
- type AgentDeleteExecutionParams
- type AgentDeleteExecutionResponse
- type AgentDeletePromptParams
- type AgentDeletePromptResponse
- type AgentExecution
- type AgentExecutionMetadata
- type AgentExecutionMetadataRole
- type AgentExecutionSpec
- type AgentExecutionSpecDesiredPhase
- type AgentExecutionSpecLimits
- type AgentExecutionStatus
- type AgentExecutionStatusCurrentOperation
- type AgentExecutionStatusCurrentOperationLlm
- type AgentExecutionStatusCurrentOperationToolUse
- type AgentExecutionStatusFailureReason
- type AgentExecutionStatusOutput
- type AgentExecutionStatusPhase
- type AgentExecutionStatusSupportedModel
- type AgentExecutionStatusUsedEnvironment
- type AgentGetExecutionParams
- type AgentGetExecutionResponse
- type AgentGetPromptParams
- type AgentGetPromptResponse
- type AgentListExecutionsParams
- type AgentListExecutionsParamsFilter
- type AgentListExecutionsParamsFilterRole
- type AgentListExecutionsParamsFilterStatusPhase
- type AgentListExecutionsParamsPagination
- type AgentListPromptsParams
- type AgentListPromptsParamsFilter
- type AgentListPromptsParamsPagination
- type AgentMode
- type AgentNewExecutionConversationTokenParams
- type AgentNewExecutionConversationTokenResponse
- type AgentNewPromptParams
- type AgentNewPromptResponse
- type AgentPolicy
- type AgentSendToExecutionParams
- type AgentSendToExecutionResponse
- type AgentService
- func (r *AgentService) DeleteExecution(ctx context.Context, body AgentDeleteExecutionParams, ...) (res *AgentDeleteExecutionResponse, err error)
- func (r *AgentService) DeletePrompt(ctx context.Context, body AgentDeletePromptParams, ...) (res *AgentDeletePromptResponse, err error)
- func (r *AgentService) GetExecution(ctx context.Context, body AgentGetExecutionParams, ...) (res *AgentGetExecutionResponse, err error)
- func (r *AgentService) GetPrompt(ctx context.Context, body AgentGetPromptParams, opts ...option.RequestOption) (res *AgentGetPromptResponse, err error)
- func (r *AgentService) ListExecutions(ctx context.Context, params AgentListExecutionsParams, ...) (res *pagination.AgentExecutionsPage[AgentExecution], err error)
- func (r *AgentService) ListExecutionsAutoPaging(ctx context.Context, params AgentListExecutionsParams, ...) *pagination.AgentExecutionsPageAutoPager[AgentExecution]
- func (r *AgentService) ListPrompts(ctx context.Context, params AgentListPromptsParams, ...) (res *pagination.PromptsPage[Prompt], err error)
- func (r *AgentService) ListPromptsAutoPaging(ctx context.Context, params AgentListPromptsParams, ...) *pagination.PromptsPageAutoPager[Prompt]
- func (r *AgentService) NewExecutionConversationToken(ctx context.Context, body AgentNewExecutionConversationTokenParams, ...) (res *AgentNewExecutionConversationTokenResponse, err error)
- func (r *AgentService) NewPrompt(ctx context.Context, body AgentNewPromptParams, opts ...option.RequestOption) (res *AgentNewPromptResponse, err error)
- func (r *AgentService) SendToExecution(ctx context.Context, body AgentSendToExecutionParams, ...) (res *AgentSendToExecutionResponse, err error)
- func (r *AgentService) StartExecution(ctx context.Context, body AgentStartExecutionParams, ...) (res *AgentStartExecutionResponse, err error)
- func (r *AgentService) StopExecution(ctx context.Context, body AgentStopExecutionParams, ...) (res *AgentStopExecutionResponse, err error)
- func (r *AgentService) UpdatePrompt(ctx context.Context, body AgentUpdatePromptParams, ...) (res *AgentUpdatePromptResponse, err error)
- type AgentStartExecutionParams
- type AgentStartExecutionResponse
- type AgentStopExecutionParams
- type AgentStopExecutionResponse
- type AgentUpdatePromptParams
- type AgentUpdatePromptParamsMetadata
- type AgentUpdatePromptParamsSpec
- type AgentUpdatePromptResponse
- type AutomationTrigger
- type AutomationTriggerParam
- type AutomationsFileParam
- type AutomationsFileServiceParam
- type AutomationsFileServicesCommandsParam
- type AutomationsFileServicesRole
- type AutomationsFileServicesTriggeredBy
- type AutomationsFileTaskParam
- type AutomationsFileTasksTriggeredBy
- type BreadcrumbParam
- 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 CrowdStrikeConfig
- type CustomDomain
- type CustomDomainProvider
- type DomainVerification
- type DomainVerificationState
- type DotfilesConfiguration
- type Editor
- type EditorGetParams
- type EditorGetResponse
- type EditorListParams
- type EditorListParamsFilter
- 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 EditorVersion
- 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 EnvironmentListParamsFilterArchivalStatus
- type EnvironmentListParamsPagination
- type EnvironmentMarkActiveParams
- type EnvironmentMarkActiveResponse
- type EnvironmentMetadata
- type EnvironmentNewEnvironmentTokenParams
- type EnvironmentNewEnvironmentTokenResponse
- type EnvironmentNewFromProjectParams
- type EnvironmentNewFromProjectResponse
- type EnvironmentNewLogsTokenParams
- type EnvironmentNewLogsTokenResponse
- type EnvironmentNewParams
- type EnvironmentNewResponse
- type EnvironmentPhase
- type EnvironmentRole
- 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) NewEnvironmentToken(ctx context.Context, body EnvironmentNewEnvironmentTokenParams, ...) (res *EnvironmentNewEnvironmentTokenResponse, 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) Unarchive(ctx context.Context, body EnvironmentUnarchiveParams, ...) (res *EnvironmentUnarchiveResponse, 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 EnvironmentSpecDevcontainerLifecycleStage
- type EnvironmentSpecDevcontainerParam
- type EnvironmentSpecMachine
- type EnvironmentSpecMachineParam
- type EnvironmentSpecParam
- type EnvironmentSpecPort
- type EnvironmentSpecPortParam
- type EnvironmentSpecPortsProtocol
- 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 EnvironmentUnarchiveParams
- type EnvironmentUnarchiveResponse
- type EnvironmentUpdateParams
- type EnvironmentUpdateParamsMetadata
- type EnvironmentUpdateParamsSpec
- type EnvironmentUpdateParamsSpecAutomationsFile
- type EnvironmentUpdateParamsSpecContent
- type EnvironmentUpdateParamsSpecDevcontainer
- type EnvironmentUpdateParamsSpecPort
- type EnvironmentUpdateParamsSpecPortsProtocol
- type EnvironmentUpdateParamsSpecSSHPublicKey
- type EnvironmentUpdateParamsSpecTimeout
- type EnvironmentUpdateResponse
- type EnvironmentUsageRecord
- type EnvironmentVariableItem
- type EnvironmentVariableItemParam
- type EnvironmentVariableSource
- type EnvironmentVariableSourceParam
- type Error
- type ErrorCode
- type ErrorEventParam
- type ErrorLevel
- type ErrorReportErrorsParams
- type ErrorReportErrorsResponse
- type ErrorService
- 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 ExceptionInfoParam
- type ExceptionMechanismParam
- type FieldValidationError
- type FieldValue
- type FieldValueParam
- type Gateway
- type GatewayInfo
- type GatewayListParams
- type GatewayListParamsPagination
- type GatewayService
- func (r *GatewayService) List(ctx context.Context, params GatewayListParams, opts ...option.RequestOption) (res *pagination.GatewaysPage[shared.Gateway], err error)
- func (r *GatewayService) ListAutoPaging(ctx context.Context, params GatewayListParams, opts ...option.RequestOption) *pagination.GatewaysPageAutoPager[shared.Gateway]
- type Group
- type GroupDeleteParams
- type GroupDeleteResponse
- type GroupGetParams
- type GroupGetResponse
- type GroupListParams
- type GroupListParamsPagination
- type GroupMembership
- type GroupMembershipDeleteParams
- type GroupMembershipDeleteResponse
- type GroupMembershipListParams
- type GroupMembershipListParamsPagination
- type GroupMembershipNewParams
- type GroupMembershipNewResponse
- type GroupMembershipService
- func (r *GroupMembershipService) Delete(ctx context.Context, body GroupMembershipDeleteParams, ...) (res *GroupMembershipDeleteResponse, err error)
- func (r *GroupMembershipService) List(ctx context.Context, params GroupMembershipListParams, ...) (res *pagination.MembersPage[GroupMembership], err error)
- func (r *GroupMembershipService) ListAutoPaging(ctx context.Context, params GroupMembershipListParams, ...) *pagination.MembersPageAutoPager[GroupMembership]
- func (r *GroupMembershipService) New(ctx context.Context, body GroupMembershipNewParams, ...) (res *GroupMembershipNewResponse, err error)
- type GroupNewParams
- type GroupNewResponse
- type GroupRoleAssignmentDeleteParams
- type GroupRoleAssignmentDeleteResponse
- type GroupRoleAssignmentListParams
- type GroupRoleAssignmentListParamsFilter
- type GroupRoleAssignmentListParamsPagination
- type GroupRoleAssignmentNewParams
- type GroupRoleAssignmentNewResponse
- type GroupRoleAssignmentService
- func (r *GroupRoleAssignmentService) Delete(ctx context.Context, body GroupRoleAssignmentDeleteParams, ...) (res *GroupRoleAssignmentDeleteResponse, err error)
- func (r *GroupRoleAssignmentService) List(ctx context.Context, params GroupRoleAssignmentListParams, ...) (res *pagination.AssignmentsPage[RoleAssignment], err error)
- func (r *GroupRoleAssignmentService) ListAutoPaging(ctx context.Context, params GroupRoleAssignmentListParams, ...) *pagination.AssignmentsPageAutoPager[RoleAssignment]
- func (r *GroupRoleAssignmentService) New(ctx context.Context, body GroupRoleAssignmentNewParams, ...) (res *GroupRoleAssignmentNewResponse, err error)
- type GroupService
- func (r *GroupService) Delete(ctx context.Context, body GroupDeleteParams, opts ...option.RequestOption) (res *GroupDeleteResponse, err error)
- func (r *GroupService) Get(ctx context.Context, body GroupGetParams, opts ...option.RequestOption) (res *GroupGetResponse, err error)
- 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]
- func (r *GroupService) New(ctx context.Context, body GroupNewParams, opts ...option.RequestOption) (res *GroupNewResponse, err error)
- func (r *GroupService) Update(ctx context.Context, body GroupUpdateParams, opts ...option.RequestOption) (res *GroupUpdateResponse, err error)
- type GroupUpdateParams
- type GroupUpdateResponse
- type HostAuthenticationToken
- type HostAuthenticationTokenSource
- type IDTokenVersion
- 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 LogLevel
- type LoginProvider
- type MetricsConfiguration
- type MetricsConfigurationParam
- type Organization
- type OrganizationCustomDomainDeleteParams
- type OrganizationCustomDomainDeleteResponse
- type OrganizationCustomDomainGetParams
- type OrganizationCustomDomainGetResponse
- type OrganizationCustomDomainNewParams
- type OrganizationCustomDomainNewResponse
- type OrganizationCustomDomainService
- func (r *OrganizationCustomDomainService) Delete(ctx context.Context, body OrganizationCustomDomainDeleteParams, ...) (res *OrganizationCustomDomainDeleteResponse, err error)
- func (r *OrganizationCustomDomainService) Get(ctx context.Context, body OrganizationCustomDomainGetParams, ...) (res *OrganizationCustomDomainGetResponse, err error)
- func (r *OrganizationCustomDomainService) New(ctx context.Context, body OrganizationCustomDomainNewParams, ...) (res *OrganizationCustomDomainNewResponse, err error)
- func (r *OrganizationCustomDomainService) Update(ctx context.Context, body OrganizationCustomDomainUpdateParams, ...) (res *OrganizationCustomDomainUpdateResponse, err error)
- type OrganizationCustomDomainUpdateParams
- type OrganizationCustomDomainUpdateResponse
- 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 OrganizationListMembersParamsFilter
- type OrganizationListMembersParamsPagination
- type OrganizationMember
- type OrganizationNewParams
- type OrganizationNewResponse
- type OrganizationPolicies
- type OrganizationPoliciesEditorVersionRestriction
- type OrganizationPolicyGetParams
- type OrganizationPolicyGetResponse
- type OrganizationPolicyService
- func (r *OrganizationPolicyService) Get(ctx context.Context, body OrganizationPolicyGetParams, ...) (res *OrganizationPolicyGetResponse, err error)
- func (r *OrganizationPolicyService) Update(ctx context.Context, body OrganizationPolicyUpdateParams, ...) (res *OrganizationPolicyUpdateResponse, err error)
- type OrganizationPolicyUpdateParams
- type OrganizationPolicyUpdateParamsAgentPolicy
- type OrganizationPolicyUpdateParamsEditorVersionRestrictions
- type OrganizationPolicyUpdateParamsSecurityAgentPolicy
- type OrganizationPolicyUpdateParamsSecurityAgentPolicyCrowdstrike
- type OrganizationPolicyUpdateResponse
- 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) 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 OrganizationTier
- type OrganizationUpdateParams
- type OrganizationUpdateResponse
- type PersonalAccessToken
- type Prebuild
- type PrebuildCancelParams
- type PrebuildCancelResponse
- type PrebuildDeleteParams
- type PrebuildDeleteResponse
- type PrebuildGetParams
- type PrebuildGetResponse
- type PrebuildListParams
- type PrebuildListParamsFilter
- type PrebuildListParamsPagination
- type PrebuildMetadata
- type PrebuildNewLogsTokenParams
- type PrebuildNewLogsTokenResponse
- type PrebuildNewParams
- type PrebuildNewResponse
- type PrebuildPhase
- type PrebuildService
- func (r *PrebuildService) Cancel(ctx context.Context, body PrebuildCancelParams, opts ...option.RequestOption) (res *PrebuildCancelResponse, err error)
- func (r *PrebuildService) Delete(ctx context.Context, body PrebuildDeleteParams, opts ...option.RequestOption) (res *PrebuildDeleteResponse, err error)
- func (r *PrebuildService) Get(ctx context.Context, body PrebuildGetParams, opts ...option.RequestOption) (res *PrebuildGetResponse, err error)
- func (r *PrebuildService) List(ctx context.Context, params PrebuildListParams, opts ...option.RequestOption) (res *pagination.PrebuildsPage[Prebuild], err error)
- func (r *PrebuildService) ListAutoPaging(ctx context.Context, params PrebuildListParams, opts ...option.RequestOption) *pagination.PrebuildsPageAutoPager[Prebuild]
- func (r *PrebuildService) New(ctx context.Context, body PrebuildNewParams, opts ...option.RequestOption) (res *PrebuildNewResponse, err error)
- func (r *PrebuildService) NewLogsToken(ctx context.Context, body PrebuildNewLogsTokenParams, ...) (res *PrebuildNewLogsTokenResponse, err error)
- type PrebuildSpec
- type PrebuildSpecParam
- type PrebuildStatus
- type PrebuildTrigger
- type Principal
- type Project
- type ProjectDeleteParams
- type ProjectDeleteResponse
- type ProjectEnvironmentClaseListParams
- type ProjectEnvironmentClaseListParamsPagination
- type ProjectEnvironmentClaseService
- func (r *ProjectEnvironmentClaseService) List(ctx context.Context, params ProjectEnvironmentClaseListParams, ...) (res *pagination.ProjectEnvironmentClassesPage[shared.ProjectEnvironmentClass], ...)
- func (r *ProjectEnvironmentClaseService) ListAutoPaging(ctx context.Context, params ProjectEnvironmentClaseListParams, ...) ...
- func (r *ProjectEnvironmentClaseService) Update(ctx context.Context, body ProjectEnvironmentClaseUpdateParams, ...) (res *ProjectEnvironmentClaseUpdateResponse, err error)
- type ProjectEnvironmentClaseUpdateParams
- type ProjectEnvironmentClaseUpdateResponse
- type ProjectEnvironmentClass
- type ProjectEnvironmentClassParam
- type ProjectGetParams
- type ProjectGetResponse
- type ProjectListParams
- type ProjectListParamsFilter
- type ProjectListParamsPagination
- type ProjectMetadata
- type ProjectNewFromEnvironmentParams
- type ProjectNewFromEnvironmentResponse
- type ProjectNewParams
- type ProjectNewResponse
- type ProjectPhase
- 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 ProjectPrebuildConfiguration
- type ProjectPrebuildConfigurationParam
- type ProjectPrebuildConfigurationTrigger
- type ProjectPrebuildConfigurationTriggerDailySchedule
- type ProjectPrebuildConfigurationTriggerDailyScheduleParam
- type ProjectPrebuildConfigurationTriggerParam
- 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 Prompt
- type PromptMetadata
- type PromptSpec
- type ProviderType
- type RequestInfoParam
- type ResourceOperation
- type ResourceRole
- type ResourceType
- type RoleAssignment
- 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 RunnerConfigurationSchemaEnvironmentClassesEnumDefaultValue
- type RunnerConfigurationSchemaEnvironmentClassesEnumPossibleValue
- type RunnerConfigurationSchemaEnvironmentClassesInt
- type RunnerConfigurationSchemaEnvironmentClassesString
- type RunnerConfigurationSchemaGetParams
- type RunnerConfigurationSchemaGetResponse
- type RunnerConfigurationSchemaRunnerConfig
- type RunnerConfigurationSchemaRunnerConfigBool
- type RunnerConfigurationSchemaRunnerConfigDisplay
- type RunnerConfigurationSchemaRunnerConfigEnum
- type RunnerConfigurationSchemaRunnerConfigEnumDefaultValue
- type RunnerConfigurationSchemaRunnerConfigEnumPossibleValue
- 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 RunnerNewLogsTokenParams
- type RunnerNewLogsTokenResponse
- type RunnerNewParams
- type RunnerNewResponse
- type RunnerNewRunnerTokenParams
- type RunnerNewRunnerTokenResponse
- type RunnerParseContextURLParams
- type RunnerParseContextURLResponse
- type RunnerParseContextURLResponseGit
- type RunnerParseContextURLResponseIssue
- type RunnerParseContextURLResponsePrdeprecated
- type RunnerParseContextURLResponsePullRequest
- type RunnerParseContextURLResponsePullRequestRepository
- 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 RunnerSearchRepositoriesParams
- type RunnerSearchRepositoriesParamsPagination
- type RunnerSearchRepositoriesResponse
- type RunnerSearchRepositoriesResponsePagination
- type RunnerSearchRepositoriesResponseRepository
- 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) NewLogsToken(ctx context.Context, body RunnerNewLogsTokenParams, ...) (res *RunnerNewLogsTokenResponse, 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) SearchRepositories(ctx context.Context, body RunnerSearchRepositoriesParams, ...) (res *RunnerSearchRepositoriesResponse, 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 RunnerUpdateParamsSpecConfigurationMetrics
- type RunnerUpdateResponse
- type RunnerVariant
- type RunsOn
- type RunsOnDocker
- type RunsOnDockerParam
- type RunsOnParam
- type SSOConfiguration
- type SSOConfigurationState
- type ScmIntegration
- type ScmIntegrationOAuthConfig
- type ScmIntegrationValidationResult
- type SearchMode
- type Secret
- type SecretDeleteParams
- type SecretDeleteResponse
- type SecretGetValueParams
- type SecretGetValueResponse
- type SecretListParams
- type SecretListParamsFilter
- type SecretListParamsPagination
- type SecretNewParams
- type SecretNewResponse
- type SecretRef
- type SecretRefParam
- type SecretScope
- type SecretScopeParam
- 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 SecurityAgentPolicy
- type Service
- type ServiceMetadata
- type ServiceMetadataParam
- type ServicePhase
- type ServiceRole
- type ServiceSpec
- type ServiceSpecCommands
- type ServiceSpecCommandsParam
- type ServiceSpecParam
- type ServiceStatus
- type StackFrameParam
- 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 UsageListEnvironmentRuntimeRecordsParams
- type UsageListEnvironmentRuntimeRecordsParamsFilter
- type UsageListEnvironmentRuntimeRecordsParamsFilterDateRange
- type UsageListEnvironmentRuntimeRecordsParamsPagination
- type UsageService
- func (r *UsageService) ListEnvironmentRuntimeRecords(ctx context.Context, params UsageListEnvironmentRuntimeRecordsParams, ...) (res *pagination.RecordsPage[EnvironmentUsageRecord], err error)
- func (r *UsageService) ListEnvironmentRuntimeRecordsAutoPaging(ctx context.Context, params UsageListEnvironmentRuntimeRecordsParams, ...) *pagination.RecordsPageAutoPager[EnvironmentUsageRecord]
- type User
- type UserDeleteUserParams
- type UserDeleteUserResponse
- type UserDotfileGetParams
- type UserDotfileGetResponse
- type UserDotfileService
- func (r *UserDotfileService) Get(ctx context.Context, body UserDotfileGetParams, opts ...option.RequestOption) (res *UserDotfileGetResponse, err error)
- func (r *UserDotfileService) Set(ctx context.Context, body UserDotfileSetParams, opts ...option.RequestOption) (res *UserDotfileSetResponse, err error)
- type UserDotfileSetParams
- type UserDotfileSetResponse
- type UserGetAuthenticatedUserParams
- type UserGetAuthenticatedUserResponse
- type UserGetUserParams
- type UserGetUserResponse
- type UserInputBlockParam
- type UserInputBlockTextParam
- 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) DeleteUser(ctx context.Context, body UserDeleteUserParams, opts ...option.RequestOption) (res *UserDeleteUserResponse, err error)
- func (r *UserService) GetAuthenticatedUser(ctx context.Context, body UserGetAuthenticatedUserParams, ...) (res *UserGetAuthenticatedUserResponse, err error)
- func (r *UserService) GetUser(ctx context.Context, body UserGetUserParams, opts ...option.RequestOption) (res *UserGetUserResponse, 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 PrincipalAgentExecution = shared.PrincipalAgentExecution
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 PrincipalRunnerManager = shared.PrincipalRunnerManager
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 ResourceTypeAccount = shared.ResourceTypeAccount
This is an alias to an internal value.
const ResourceTypeAgent = shared.ResourceTypeAgent
This is an alias to an internal value.
const ResourceTypeAgentExecution = shared.ResourceTypeAgentExecution
This is an alias to an internal value.
const ResourceTypeBilling = shared.ResourceTypeBilling
This is an alias to an internal value.
const ResourceTypeCoupon = shared.ResourceTypeCoupon
This is an alias to an internal value.
const ResourceTypeCouponRedemption = shared.ResourceTypeCouponRedemption
This is an alias to an internal value.
const ResourceTypeCustomDomain = shared.ResourceTypeCustomDomain
This is an alias to an internal value.
const ResourceTypeDomainVerification = shared.ResourceTypeDomainVerification
This is an alias to an internal value.
const ResourceTypeEnvironment = shared.ResourceTypeEnvironment
This is an alias to an internal value.
const ResourceTypeEnvironmentClass = shared.ResourceTypeEnvironmentClass
This is an alias to an internal value.
const ResourceTypeEnvironmentSession = shared.ResourceTypeEnvironmentSession
This is an alias to an internal value.
const ResourceTypeGroup = shared.ResourceTypeGroup
This is an alias to an internal value.
const ResourceTypeGroupMembershipChanged = shared.ResourceTypeGroupMembershipChanged
This is an alias to an internal value.
const ResourceTypeHostAuthenticationToken = shared.ResourceTypeHostAuthenticationToken
This is an alias to an internal value.
const ResourceTypeIntegration = shared.ResourceTypeIntegration
This is an alias to an internal value.
const ResourceTypeOrganization = shared.ResourceTypeOrganization
This is an alias to an internal value.
const ResourceTypeOrganizationLlmIntegration = shared.ResourceTypeOrganizationLlmIntegration
This is an alias to an internal value.
const ResourceTypeOrganizationPolicy = shared.ResourceTypeOrganizationPolicy
This is an alias to an internal value.
const ResourceTypeOrganizationSecret = shared.ResourceTypeOrganizationSecret
This is an alias to an internal value.
const ResourceTypePersonalAccessToken = shared.ResourceTypePersonalAccessToken
This is an alias to an internal value.
const ResourceTypePrebuild = shared.ResourceTypePrebuild
This is an alias to an internal value.
const ResourceTypeProject = shared.ResourceTypeProject
This is an alias to an internal value.
const ResourceTypeProjectEnvironmentClass = shared.ResourceTypeProjectEnvironmentClass
This is an alias to an internal value.
const ResourceTypePrompt = shared.ResourceTypePrompt
This is an alias to an internal value.
const ResourceTypeRoleAssignmentChanged = shared.ResourceTypeRoleAssignmentChanged
This is an alias to an internal value.
const ResourceTypeRunner = shared.ResourceTypeRunner
This is an alias to an internal value.
const ResourceTypeRunnerLlmIntegration = shared.ResourceTypeRunnerLlmIntegration
This is an alias to an internal value.
const ResourceTypeRunnerScmIntegration = shared.ResourceTypeRunnerScmIntegration
This is an alias to an internal value.
const ResourceTypeSSOConfig = shared.ResourceTypeSSOConfig
This is an alias to an internal value.
const ResourceTypeSecret = shared.ResourceTypeSecret
This is an alias to an internal value.
const ResourceTypeService = shared.ResourceTypeService
This is an alias to an internal value.
const ResourceTypeServiceAccount = shared.ResourceTypeServiceAccount
This is an alias to an internal value.
const ResourceTypeSnapshot = shared.ResourceTypeSnapshot
This is an alias to an internal value.
const ResourceTypeTask = shared.ResourceTypeTask
This is an alias to an internal value.
const ResourceTypeTaskExecution = shared.ResourceTypeTaskExecution
This is an alias to an internal value.
const ResourceTypeUnspecified = shared.ResourceTypeUnspecified
This is an alias to an internal value.
const ResourceTypeUser = shared.ResourceTypeUser
This is an alias to an internal value.
const ResourceTypeUserPreference = shared.ResourceTypeUserPreference
This is an alias to an internal value.
const ResourceTypeUserSecret = shared.ResourceTypeUserSecret
This is an alias to an internal value.
const ResourceTypeWorkflow = shared.ResourceTypeWorkflow
This is an alias to an internal value.
const ResourceTypeWorkflowExecution = shared.ResourceTypeWorkflowExecution
This is an alias to an internal value.
const ResourceTypeWorkflowExecutionAction = shared.ResourceTypeWorkflowExecutionAction
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 DefaultClientOptions ¶ added in v0.5.0
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (GITPOD_API_KEY, GITPOD_BASE_URL). This should be used to initialize new clients.
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 is deprecated. Use ListJoinableOrganizations instead.
//
// Deprecated: deprecated
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"`
// reason is an optional field for the reason for account deletion
Reason param.Field[string] `json:"reason"`
}
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 AccountListJoinableOrganizationsParams ¶ added in v0.5.0
type AccountListJoinableOrganizationsParams struct {
Token param.Field[string] `query:"token"`
PageSize param.Field[int64] `query:"pageSize"`
// pagination contains the pagination options for listing joinable organizations
Pagination param.Field[AccountListJoinableOrganizationsParamsPagination] `json:"pagination"`
}
func (AccountListJoinableOrganizationsParams) MarshalJSON ¶ added in v0.5.0
func (r AccountListJoinableOrganizationsParams) MarshalJSON() (data []byte, err error)
func (AccountListJoinableOrganizationsParams) URLQuery ¶ added in v0.5.0
func (r AccountListJoinableOrganizationsParams) URLQuery() (v url.Values)
URLQuery serializes AccountListJoinableOrganizationsParams's query parameters as `url.Values`.
type AccountListJoinableOrganizationsParamsPagination ¶ added in v0.7.0
type AccountListJoinableOrganizationsParamsPagination 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 joinable organizations
func (AccountListJoinableOrganizationsParamsPagination) MarshalJSON ¶ added in v0.7.0
func (r AccountListJoinableOrganizationsParamsPagination) MarshalJSON() (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 {
// email is the email address to filter SSO providers by
Email param.Field[string] `json:"email"`
// 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 AccountListSSOLoginsParams ¶ added in v0.7.0
type AccountListSSOLoginsParams struct {
// email is the email the user wants to login with
Email param.Field[string] `json:"email,required" format:"email"`
Token param.Field[string] `query:"token"`
PageSize param.Field[int64] `query:"pageSize"`
// pagination contains the pagination options for listing SSO logins
Pagination param.Field[AccountListSSOLoginsParamsPagination] `json:"pagination"`
// return_to is the URL the user will be redirected to after login
ReturnTo param.Field[string] `json:"returnTo" format:"uri"`
}
func (AccountListSSOLoginsParams) MarshalJSON ¶ added in v0.7.0
func (r AccountListSSOLoginsParams) MarshalJSON() (data []byte, err error)
func (AccountListSSOLoginsParams) URLQuery ¶ added in v0.7.0
func (r AccountListSSOLoginsParams) URLQuery() (v url.Values)
URLQuery serializes AccountListSSOLoginsParams's query parameters as `url.Values`.
type AccountListSSOLoginsParamsPagination ¶ added in v0.7.0
type AccountListSSOLoginsParamsPagination 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 SSO logins
func (AccountListSSOLoginsParamsPagination) MarshalJSON ¶ added in v0.7.0
func (r AccountListSSOLoginsParamsPagination) MarshalJSON() (data []byte, err error)
type AccountListSSOLoginsResponse ¶ added in v0.7.0
type AccountListSSOLoginsResponse struct {
// provider is the provider used by this login method, e.g. "github", "google",
// "custom"
DisplayName string `json:"displayName,required"`
// login_url is the URL to redirect the user to for SSO login
LoginURL string `json:"loginUrl,required"`
JSON accountListSSOLoginsResponseJSON `json:"-"`
}
func (*AccountListSSOLoginsResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *AccountListSSOLoginsResponse) UnmarshalJSON(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) ListJoinableOrganizations ¶ added in v0.5.0
func (r *AccountService) ListJoinableOrganizations(ctx context.Context, params AccountListJoinableOrganizationsParams, opts ...option.RequestOption) (res *pagination.JoinableOrganizationsPage[JoinableOrganization], err error)
Lists organizations that the currently authenticated account can join.
Use this method to:
- Discover organizations associated with the account's email domain. - Allow users to join existing organizations. - Display potential organizations during onboarding.
### Examples
- List joinable organizations:
Retrieves a list of organizations the account can join.
```yaml
{}
```
func (*AccountService) ListJoinableOrganizationsAutoPaging ¶ added in v0.7.0
func (r *AccountService) ListJoinableOrganizationsAutoPaging(ctx context.Context, params AccountListJoinableOrganizationsParams, opts ...option.RequestOption) *pagination.JoinableOrganizationsPageAutoPager[JoinableOrganization]
Lists organizations that the currently authenticated account can join.
Use this method to:
- Discover organizations associated with the account's email domain. - Allow users to join existing organizations. - Display potential organizations during onboarding.
### Examples
- List joinable organizations:
Retrieves a list of organizations the account can join.
```yaml
{}
```
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 ```
func (*AccountService) ListSSOLogins ¶ added in v0.7.0
func (r *AccountService) ListSSOLogins(ctx context.Context, params AccountListSSOLoginsParams, opts ...option.RequestOption) (res *pagination.LoginsPage[AccountListSSOLoginsResponse], err error)
ListSSOLogins
func (*AccountService) ListSSOLoginsAutoPaging ¶ added in v0.7.0
func (r *AccountService) ListSSOLoginsAutoPaging(ctx context.Context, params AccountListSSOLoginsParams, opts ...option.RequestOption) *pagination.LoginsPageAutoPager[AccountListSSOLoginsResponse]
ListSSOLogins
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 AgentCodeContext ¶ added in v0.7.0
type AgentCodeContext struct {
ContextURL AgentCodeContextContextURL `json:"contextUrl"`
EnvironmentID string `json:"environmentId" format:"uuid"`
ProjectID string `json:"projectId" format:"uuid"`
// Pull request context - optional metadata about the PR being worked on This is
// populated when the agent execution is triggered by a PR workflow or when
// explicitly provided through the browser extension
PullRequest AgentCodeContextPullRequest `json:"pullRequest,nullable"`
JSON agentCodeContextJSON `json:"-"`
}
func (*AgentCodeContext) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentCodeContext) UnmarshalJSON(data []byte) (err error)
type AgentCodeContextContextURL ¶ added in v0.7.0
type AgentCodeContextContextURL struct {
EnvironmentClassID string `json:"environmentClassId" format:"uuid"`
URL string `json:"url" format:"uri"`
JSON agentCodeContextContextURLJSON `json:"-"`
}
func (*AgentCodeContextContextURL) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentCodeContextContextURL) UnmarshalJSON(data []byte) (err error)
type AgentCodeContextContextURLParam ¶ added in v0.7.0
type AgentCodeContextContextURLParam struct {
EnvironmentClassID param.Field[string] `json:"environmentClassId" format:"uuid"`
URL param.Field[string] `json:"url" format:"uri"`
}
func (AgentCodeContextContextURLParam) MarshalJSON ¶ added in v0.7.0
func (r AgentCodeContextContextURLParam) MarshalJSON() (data []byte, err error)
type AgentCodeContextParam ¶ added in v0.7.0
type AgentCodeContextParam struct {
ContextURL param.Field[AgentCodeContextContextURLParam] `json:"contextUrl"`
EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"`
ProjectID param.Field[string] `json:"projectId" format:"uuid"`
// Pull request context - optional metadata about the PR being worked on This is
// populated when the agent execution is triggered by a PR workflow or when
// explicitly provided through the browser extension
PullRequest param.Field[AgentCodeContextPullRequestParam] `json:"pullRequest"`
}
func (AgentCodeContextParam) MarshalJSON ¶ added in v0.7.0
func (r AgentCodeContextParam) MarshalJSON() (data []byte, err error)
type AgentCodeContextPullRequest ¶ added in v0.7.0
type AgentCodeContextPullRequest struct {
// Unique identifier from the source system (e.g., "123" for GitHub PR #123)
ID string `json:"id"`
// Author name as provided by the SCM system
Author string `json:"author"`
// Source branch name (the branch being merged from)
FromBranch string `json:"fromBranch"`
// Repository information
Repository AgentCodeContextPullRequestRepository `json:"repository"`
// Pull request title
Title string `json:"title"`
// Target branch name (the branch being merged into)
ToBranch string `json:"toBranch"`
// Pull request URL (e.g., "https://github.com/owner/repo/pull/123")
URL string `json:"url"`
JSON agentCodeContextPullRequestJSON `json:"-"`
}
Pull request context - optional metadata about the PR being worked on This is populated when the agent execution is triggered by a PR workflow or when explicitly provided through the browser extension
func (*AgentCodeContextPullRequest) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentCodeContextPullRequest) UnmarshalJSON(data []byte) (err error)
type AgentCodeContextPullRequestParam ¶ added in v0.7.0
type AgentCodeContextPullRequestParam struct {
// Unique identifier from the source system (e.g., "123" for GitHub PR #123)
ID param.Field[string] `json:"id"`
// Author name as provided by the SCM system
Author param.Field[string] `json:"author"`
// Source branch name (the branch being merged from)
FromBranch param.Field[string] `json:"fromBranch"`
// Repository information
Repository param.Field[AgentCodeContextPullRequestRepositoryParam] `json:"repository"`
// Pull request title
Title param.Field[string] `json:"title"`
// Target branch name (the branch being merged into)
ToBranch param.Field[string] `json:"toBranch"`
// Pull request URL (e.g., "https://github.com/owner/repo/pull/123")
URL param.Field[string] `json:"url"`
}
Pull request context - optional metadata about the PR being worked on This is populated when the agent execution is triggered by a PR workflow or when explicitly provided through the browser extension
func (AgentCodeContextPullRequestParam) MarshalJSON ¶ added in v0.7.0
func (r AgentCodeContextPullRequestParam) MarshalJSON() (data []byte, err error)
type AgentCodeContextPullRequestRepository ¶ added in v0.7.0
type AgentCodeContextPullRequestRepository struct {
CloneURL string `json:"cloneUrl"`
Host string `json:"host"`
Name string `json:"name"`
Owner string `json:"owner"`
JSON agentCodeContextPullRequestRepositoryJSON `json:"-"`
}
Repository information
func (*AgentCodeContextPullRequestRepository) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentCodeContextPullRequestRepository) UnmarshalJSON(data []byte) (err error)
type AgentCodeContextPullRequestRepositoryParam ¶ added in v0.7.0
type AgentCodeContextPullRequestRepositoryParam struct {
CloneURL param.Field[string] `json:"cloneUrl"`
Host param.Field[string] `json:"host"`
Name param.Field[string] `json:"name"`
Owner param.Field[string] `json:"owner"`
}
Repository information
func (AgentCodeContextPullRequestRepositoryParam) MarshalJSON ¶ added in v0.7.0
func (r AgentCodeContextPullRequestRepositoryParam) MarshalJSON() (data []byte, err error)
type AgentDeleteExecutionParams ¶ added in v0.7.0
type AgentDeleteExecutionParams struct {
AgentExecutionID param.Field[string] `json:"agentExecutionId" format:"uuid"`
}
func (AgentDeleteExecutionParams) MarshalJSON ¶ added in v0.7.0
func (r AgentDeleteExecutionParams) MarshalJSON() (data []byte, err error)
type AgentDeleteExecutionResponse ¶ added in v0.7.0
type AgentDeleteExecutionResponse = interface{}
type AgentDeletePromptParams ¶ added in v0.7.0
type AgentDeletePromptParams struct {
PromptID param.Field[string] `json:"promptId" format:"uuid"`
}
func (AgentDeletePromptParams) MarshalJSON ¶ added in v0.7.0
func (r AgentDeletePromptParams) MarshalJSON() (data []byte, err error)
type AgentDeletePromptResponse ¶ added in v0.7.0
type AgentDeletePromptResponse = interface{}
type AgentExecution ¶ added in v0.7.0
type AgentExecution struct {
// ID is a unique identifier of this agent run. No other agent run with the same
// name must be managed by this agent manager
ID string `json:"id"`
// Metadata is data associated with this agent that's required for other parts of
// Gitpod to function
Metadata AgentExecutionMetadata `json:"metadata"`
// Spec is the configuration of the agent that's required for the runner to start
// the agent
Spec AgentExecutionSpec `json:"spec"`
// Status is the current status of the agent
Status AgentExecutionStatus `json:"status"`
JSON agentExecutionJSON `json:"-"`
}
func (*AgentExecution) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentExecution) UnmarshalJSON(data []byte) (err error)
type AgentExecutionMetadata ¶ added in v0.7.0
type AgentExecutionMetadata 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 shared.Subject `json:"creator"`
Description string `json:"description"`
Name string `json:"name"`
// role is the role of the agent execution
Role AgentExecutionMetadataRole `json:"role"`
// 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"`
// workflow_action_id is set when this agent execution was created as part of a
// workflow. Used to correlate agent executions with their parent workflow
// execution action.
WorkflowActionID string `json:"workflowActionId,nullable" format:"uuid"`
JSON agentExecutionMetadataJSON `json:"-"`
}
Metadata is data associated with this agent that's required for other parts of Gitpod to function
func (*AgentExecutionMetadata) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentExecutionMetadata) UnmarshalJSON(data []byte) (err error)
type AgentExecutionMetadataRole ¶ added in v0.7.0
type AgentExecutionMetadataRole string
role is the role of the agent execution
const ( AgentExecutionMetadataRoleAgentExecutionRoleUnspecified AgentExecutionMetadataRole = "AGENT_EXECUTION_ROLE_UNSPECIFIED" AgentExecutionMetadataRoleAgentExecutionRoleDefault AgentExecutionMetadataRole = "AGENT_EXECUTION_ROLE_DEFAULT" AgentExecutionMetadataRoleAgentExecutionRoleWorkflow AgentExecutionMetadataRole = "AGENT_EXECUTION_ROLE_WORKFLOW" )
func (AgentExecutionMetadataRole) IsKnown ¶ added in v0.7.0
func (r AgentExecutionMetadataRole) IsKnown() bool
type AgentExecutionSpec ¶ added in v0.7.0
type AgentExecutionSpec struct {
AgentID string `json:"agentId" format:"uuid"`
CodeContext AgentCodeContext `json:"codeContext"`
// desired_phase is the desired phase of the agent run
DesiredPhase AgentExecutionSpecDesiredPhase `json:"desiredPhase"`
Limits AgentExecutionSpecLimits `json:"limits"`
// mode is the operational mode for this agent execution
Mode AgentMode `json:"mode"`
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 agentExecutionSpecJSON `json:"-"`
}
Spec is the configuration of the agent that's required for the runner to start the agent
func (*AgentExecutionSpec) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentExecutionSpec) UnmarshalJSON(data []byte) (err error)
type AgentExecutionSpecDesiredPhase ¶ added in v0.7.0
type AgentExecutionSpecDesiredPhase string
desired_phase is the desired phase of the agent run
const ( AgentExecutionSpecDesiredPhasePhaseUnspecified AgentExecutionSpecDesiredPhase = "PHASE_UNSPECIFIED" AgentExecutionSpecDesiredPhasePhasePending AgentExecutionSpecDesiredPhase = "PHASE_PENDING" AgentExecutionSpecDesiredPhasePhaseRunning AgentExecutionSpecDesiredPhase = "PHASE_RUNNING" AgentExecutionSpecDesiredPhasePhaseWaitingForInput AgentExecutionSpecDesiredPhase = "PHASE_WAITING_FOR_INPUT" AgentExecutionSpecDesiredPhasePhaseStopped AgentExecutionSpecDesiredPhase = "PHASE_STOPPED" )
func (AgentExecutionSpecDesiredPhase) IsKnown ¶ added in v0.7.0
func (r AgentExecutionSpecDesiredPhase) IsKnown() bool
type AgentExecutionSpecLimits ¶ added in v0.7.0
type AgentExecutionSpecLimits struct {
MaxInputTokens string `json:"maxInputTokens"`
MaxIterations string `json:"maxIterations"`
MaxOutputTokens string `json:"maxOutputTokens"`
JSON agentExecutionSpecLimitsJSON `json:"-"`
}
func (*AgentExecutionSpecLimits) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentExecutionSpecLimits) UnmarshalJSON(data []byte) (err error)
type AgentExecutionStatus ¶ added in v0.7.0
type AgentExecutionStatus struct {
CachedCreationTokensUsed string `json:"cachedCreationTokensUsed"`
CachedInputTokensUsed string `json:"cachedInputTokensUsed"`
ContextWindowLength string `json:"contextWindowLength"`
// conversation_url is the URL to the conversation (all messages exchanged between
// the agent and the user) of the agent run.
ConversationURL string `json:"conversationUrl"`
// current_activity is the current activity description of the agent execution.
CurrentActivity string `json:"currentActivity"`
// current_operation is the current operation of the agent execution.
CurrentOperation AgentExecutionStatusCurrentOperation `json:"currentOperation"`
// failure_message contains the reason the agent run failed to operate.
FailureMessage string `json:"failureMessage"`
// failure_reason contains a structured reason code for the failure.
FailureReason AgentExecutionStatusFailureReason `json:"failureReason"`
InputTokensUsed string `json:"inputTokensUsed"`
Iterations string `json:"iterations"`
// judgement is the judgement of the agent run produced by the judgement prompt.
Judgement string `json:"judgement"`
// outputs is a map of key-value pairs that can be set by the agent during
// execution. Similar to task execution outputs, but with typed values for
// structured data.
Outputs map[string]AgentExecutionStatusOutput `json:"outputs"`
OutputTokensUsed string `json:"outputTokensUsed"`
Phase AgentExecutionStatusPhase `json:"phase"`
Session string `json:"session"`
// version of the status. 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"`
// supported_model is the LLM model being used by the agent execution.
SupportedModel AgentExecutionStatusSupportedModel `json:"supportedModel"`
// transcript_url is the URL to the LLM transcript (all messages exchanged between
// the agent and the LLM) of the agent run.
TranscriptURL string `json:"transcriptUrl"`
// used_environments is the list of environments that were used by the agent
// execution.
UsedEnvironments []AgentExecutionStatusUsedEnvironment `json:"usedEnvironments"`
// warning_message contains warnings, e.g. when the LLM is overloaded.
WarningMessage string `json:"warningMessage"`
JSON agentExecutionStatusJSON `json:"-"`
}
Status is the current status of the agent
func (*AgentExecutionStatus) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentExecutionStatus) UnmarshalJSON(data []byte) (err error)
type AgentExecutionStatusCurrentOperation ¶ added in v0.7.0
type AgentExecutionStatusCurrentOperation struct {
Llm AgentExecutionStatusCurrentOperationLlm `json:"llm"`
// retries is the number of times the agent run has retried one or more steps
Retries string `json:"retries"`
Session string `json:"session"`
ToolUse AgentExecutionStatusCurrentOperationToolUse `json:"toolUse"`
JSON agentExecutionStatusCurrentOperationJSON `json:"-"`
}
current_operation is the current operation of the agent execution.
func (*AgentExecutionStatusCurrentOperation) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentExecutionStatusCurrentOperation) UnmarshalJSON(data []byte) (err error)
type AgentExecutionStatusCurrentOperationLlm ¶ added in v0.7.0
type AgentExecutionStatusCurrentOperationLlm struct {
Complete bool `json:"complete"`
JSON agentExecutionStatusCurrentOperationLlmJSON `json:"-"`
}
func (*AgentExecutionStatusCurrentOperationLlm) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentExecutionStatusCurrentOperationLlm) UnmarshalJSON(data []byte) (err error)
type AgentExecutionStatusCurrentOperationToolUse ¶ added in v0.7.0
type AgentExecutionStatusCurrentOperationToolUse struct {
Complete bool `json:"complete"`
ToolName string `json:"toolName"`
JSON agentExecutionStatusCurrentOperationToolUseJSON `json:"-"`
}
func (*AgentExecutionStatusCurrentOperationToolUse) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentExecutionStatusCurrentOperationToolUse) UnmarshalJSON(data []byte) (err error)
type AgentExecutionStatusFailureReason ¶ added in v0.7.0
type AgentExecutionStatusFailureReason string
failure_reason contains a structured reason code for the failure.
const ( AgentExecutionStatusFailureReasonAgentExecutionFailureReasonUnspecified AgentExecutionStatusFailureReason = "AGENT_EXECUTION_FAILURE_REASON_UNSPECIFIED" AgentExecutionStatusFailureReasonAgentExecutionFailureReasonEnvironment AgentExecutionStatusFailureReason = "AGENT_EXECUTION_FAILURE_REASON_ENVIRONMENT" AgentExecutionStatusFailureReasonAgentExecutionFailureReasonService AgentExecutionStatusFailureReason = "AGENT_EXECUTION_FAILURE_REASON_SERVICE" AgentExecutionStatusFailureReasonAgentExecutionFailureReasonLlmIntegration AgentExecutionStatusFailureReason = "AGENT_EXECUTION_FAILURE_REASON_LLM_INTEGRATION" AgentExecutionStatusFailureReasonAgentExecutionFailureReasonInternal AgentExecutionStatusFailureReason = "AGENT_EXECUTION_FAILURE_REASON_INTERNAL" AgentExecutionStatusFailureReasonAgentExecutionFailureReasonAgentExecution AgentExecutionStatusFailureReason = "AGENT_EXECUTION_FAILURE_REASON_AGENT_EXECUTION" )
func (AgentExecutionStatusFailureReason) IsKnown ¶ added in v0.7.0
func (r AgentExecutionStatusFailureReason) IsKnown() bool
type AgentExecutionStatusOutput ¶ added in v0.7.0
type AgentExecutionStatusOutput struct {
BoolValue bool `json:"boolValue"`
FloatValue float64 `json:"floatValue"`
IntValue string `json:"intValue"`
StringValue string `json:"stringValue"`
JSON agentExecutionStatusOutputJSON `json:"-"`
}
func (*AgentExecutionStatusOutput) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentExecutionStatusOutput) UnmarshalJSON(data []byte) (err error)
type AgentExecutionStatusPhase ¶ added in v0.7.0
type AgentExecutionStatusPhase string
const ( AgentExecutionStatusPhasePhaseUnspecified AgentExecutionStatusPhase = "PHASE_UNSPECIFIED" AgentExecutionStatusPhasePhasePending AgentExecutionStatusPhase = "PHASE_PENDING" AgentExecutionStatusPhasePhaseRunning AgentExecutionStatusPhase = "PHASE_RUNNING" AgentExecutionStatusPhasePhaseWaitingForInput AgentExecutionStatusPhase = "PHASE_WAITING_FOR_INPUT" AgentExecutionStatusPhasePhaseStopped AgentExecutionStatusPhase = "PHASE_STOPPED" )
func (AgentExecutionStatusPhase) IsKnown ¶ added in v0.7.0
func (r AgentExecutionStatusPhase) IsKnown() bool
type AgentExecutionStatusSupportedModel ¶ added in v0.7.0
type AgentExecutionStatusSupportedModel string
supported_model is the LLM model being used by the agent execution.
const ( AgentExecutionStatusSupportedModelSupportedModelUnspecified AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_UNSPECIFIED" AgentExecutionStatusSupportedModelSupportedModelSonnet3_5 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_SONNET_3_5" AgentExecutionStatusSupportedModelSupportedModelSonnet3_7 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_SONNET_3_7" AgentExecutionStatusSupportedModelSupportedModelSonnet3_7Extended AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_SONNET_3_7_EXTENDED" AgentExecutionStatusSupportedModelSupportedModelSonnet4 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_SONNET_4" AgentExecutionStatusSupportedModelSupportedModelSonnet4Extended AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_SONNET_4_EXTENDED" AgentExecutionStatusSupportedModelSupportedModelSonnet4_5 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_SONNET_4_5" AgentExecutionStatusSupportedModelSupportedModelSonnet4_5Extended AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_SONNET_4_5_EXTENDED" AgentExecutionStatusSupportedModelSupportedModelOpus4 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPUS_4" AgentExecutionStatusSupportedModelSupportedModelOpus4Extended AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPUS_4_EXTENDED" AgentExecutionStatusSupportedModelSupportedModelOpus4_5 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPUS_4_5" AgentExecutionStatusSupportedModelSupportedModelOpus4_5Extended AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPUS_4_5_EXTENDED" AgentExecutionStatusSupportedModelSupportedModelOpenAI4O AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPENAI_4O" AgentExecutionStatusSupportedModelSupportedModelOpenAI4OMini AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPENAI_4O_MINI" AgentExecutionStatusSupportedModelSupportedModelOpenAIO1 AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPENAI_O1" AgentExecutionStatusSupportedModelSupportedModelOpenAIO1Mini AgentExecutionStatusSupportedModel = "SUPPORTED_MODEL_OPENAI_O1_MINI" )
func (AgentExecutionStatusSupportedModel) IsKnown ¶ added in v0.7.0
func (r AgentExecutionStatusSupportedModel) IsKnown() bool
type AgentExecutionStatusUsedEnvironment ¶ added in v0.7.0
type AgentExecutionStatusUsedEnvironment struct {
CreatedByAgent bool `json:"createdByAgent"`
EnvironmentID string `json:"environmentId" format:"uuid"`
JSON agentExecutionStatusUsedEnvironmentJSON `json:"-"`
}
func (*AgentExecutionStatusUsedEnvironment) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentExecutionStatusUsedEnvironment) UnmarshalJSON(data []byte) (err error)
type AgentGetExecutionParams ¶ added in v0.7.0
type AgentGetExecutionParams struct {
AgentExecutionID param.Field[string] `json:"agentExecutionId" format:"uuid"`
}
func (AgentGetExecutionParams) MarshalJSON ¶ added in v0.7.0
func (r AgentGetExecutionParams) MarshalJSON() (data []byte, err error)
type AgentGetExecutionResponse ¶ added in v0.7.0
type AgentGetExecutionResponse struct {
AgentExecution AgentExecution `json:"agentExecution"`
JSON agentGetExecutionResponseJSON `json:"-"`
}
func (*AgentGetExecutionResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentGetExecutionResponse) UnmarshalJSON(data []byte) (err error)
type AgentGetPromptParams ¶ added in v0.7.0
func (AgentGetPromptParams) MarshalJSON ¶ added in v0.7.0
func (r AgentGetPromptParams) MarshalJSON() (data []byte, err error)
type AgentGetPromptResponse ¶ added in v0.7.0
type AgentGetPromptResponse struct {
Prompt Prompt `json:"prompt"`
JSON agentGetPromptResponseJSON `json:"-"`
}
func (*AgentGetPromptResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentGetPromptResponse) UnmarshalJSON(data []byte) (err error)
type AgentListExecutionsParams ¶ added in v0.7.0
type AgentListExecutionsParams struct {
Token param.Field[string] `query:"token"`
PageSize param.Field[int64] `query:"pageSize"`
Filter param.Field[AgentListExecutionsParamsFilter] `json:"filter"`
Pagination param.Field[AgentListExecutionsParamsPagination] `json:"pagination"`
}
func (AgentListExecutionsParams) MarshalJSON ¶ added in v0.7.0
func (r AgentListExecutionsParams) MarshalJSON() (data []byte, err error)
func (AgentListExecutionsParams) URLQuery ¶ added in v0.7.0
func (r AgentListExecutionsParams) URLQuery() (v url.Values)
URLQuery serializes AgentListExecutionsParams's query parameters as `url.Values`.
type AgentListExecutionsParamsFilter ¶ added in v0.7.0
type AgentListExecutionsParamsFilter struct {
AgentIDs param.Field[[]string] `json:"agentIds"`
CreatorIDs param.Field[[]string] `json:"creatorIds"`
EnvironmentIDs param.Field[[]string] `json:"environmentIds"`
ProjectIDs param.Field[[]string] `json:"projectIds" format:"uuid"`
Roles param.Field[[]AgentListExecutionsParamsFilterRole] `json:"roles"`
StatusPhases param.Field[[]AgentListExecutionsParamsFilterStatusPhase] `json:"statusPhases"`
}
func (AgentListExecutionsParamsFilter) MarshalJSON ¶ added in v0.7.0
func (r AgentListExecutionsParamsFilter) MarshalJSON() (data []byte, err error)
type AgentListExecutionsParamsFilterRole ¶ added in v0.7.0
type AgentListExecutionsParamsFilterRole string
AgentExecutionRole represents the role of an agent execution
const ( AgentListExecutionsParamsFilterRoleAgentExecutionRoleUnspecified AgentListExecutionsParamsFilterRole = "AGENT_EXECUTION_ROLE_UNSPECIFIED" AgentListExecutionsParamsFilterRoleAgentExecutionRoleDefault AgentListExecutionsParamsFilterRole = "AGENT_EXECUTION_ROLE_DEFAULT" AgentListExecutionsParamsFilterRoleAgentExecutionRoleWorkflow AgentListExecutionsParamsFilterRole = "AGENT_EXECUTION_ROLE_WORKFLOW" )
func (AgentListExecutionsParamsFilterRole) IsKnown ¶ added in v0.7.0
func (r AgentListExecutionsParamsFilterRole) IsKnown() bool
type AgentListExecutionsParamsFilterStatusPhase ¶ added in v0.7.0
type AgentListExecutionsParamsFilterStatusPhase string
const ( AgentListExecutionsParamsFilterStatusPhasePhaseUnspecified AgentListExecutionsParamsFilterStatusPhase = "PHASE_UNSPECIFIED" AgentListExecutionsParamsFilterStatusPhasePhasePending AgentListExecutionsParamsFilterStatusPhase = "PHASE_PENDING" AgentListExecutionsParamsFilterStatusPhasePhaseRunning AgentListExecutionsParamsFilterStatusPhase = "PHASE_RUNNING" AgentListExecutionsParamsFilterStatusPhasePhaseWaitingForInput AgentListExecutionsParamsFilterStatusPhase = "PHASE_WAITING_FOR_INPUT" AgentListExecutionsParamsFilterStatusPhasePhaseStopped AgentListExecutionsParamsFilterStatusPhase = "PHASE_STOPPED" )
func (AgentListExecutionsParamsFilterStatusPhase) IsKnown ¶ added in v0.7.0
func (r AgentListExecutionsParamsFilterStatusPhase) IsKnown() bool
type AgentListExecutionsParamsPagination ¶ added in v0.7.0
type AgentListExecutionsParamsPagination 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 (AgentListExecutionsParamsPagination) MarshalJSON ¶ added in v0.7.0
func (r AgentListExecutionsParamsPagination) MarshalJSON() (data []byte, err error)
type AgentListPromptsParams ¶ added in v0.7.0
type AgentListPromptsParams struct {
Token param.Field[string] `query:"token"`
PageSize param.Field[int64] `query:"pageSize"`
Filter param.Field[AgentListPromptsParamsFilter] `json:"filter"`
Pagination param.Field[AgentListPromptsParamsPagination] `json:"pagination"`
}
func (AgentListPromptsParams) MarshalJSON ¶ added in v0.7.0
func (r AgentListPromptsParams) MarshalJSON() (data []byte, err error)
func (AgentListPromptsParams) URLQuery ¶ added in v0.7.0
func (r AgentListPromptsParams) URLQuery() (v url.Values)
URLQuery serializes AgentListPromptsParams's query parameters as `url.Values`.
type AgentListPromptsParamsFilter ¶ added in v0.7.0
type AgentListPromptsParamsFilter struct {
Command param.Field[string] `json:"command"`
CommandPrefix param.Field[string] `json:"commandPrefix"`
IsCommand param.Field[bool] `json:"isCommand"`
IsTemplate param.Field[bool] `json:"isTemplate"`
}
func (AgentListPromptsParamsFilter) MarshalJSON ¶ added in v0.7.0
func (r AgentListPromptsParamsFilter) MarshalJSON() (data []byte, err error)
type AgentListPromptsParamsPagination ¶ added in v0.7.0
type AgentListPromptsParamsPagination 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 (AgentListPromptsParamsPagination) MarshalJSON ¶ added in v0.7.0
func (r AgentListPromptsParamsPagination) MarshalJSON() (data []byte, err error)
type AgentMode ¶ added in v0.7.0
type AgentMode string
AgentMode defines the operational mode of an agent
type AgentNewExecutionConversationTokenParams ¶ added in v0.7.0
type AgentNewExecutionConversationTokenParams struct {
AgentExecutionID param.Field[string] `json:"agentExecutionId" format:"uuid"`
}
func (AgentNewExecutionConversationTokenParams) MarshalJSON ¶ added in v0.7.0
func (r AgentNewExecutionConversationTokenParams) MarshalJSON() (data []byte, err error)
type AgentNewExecutionConversationTokenResponse ¶ added in v0.7.0
type AgentNewExecutionConversationTokenResponse struct {
Token string `json:"token"`
JSON agentNewExecutionConversationTokenResponseJSON `json:"-"`
}
func (*AgentNewExecutionConversationTokenResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentNewExecutionConversationTokenResponse) UnmarshalJSON(data []byte) (err error)
type AgentNewPromptParams ¶ added in v0.7.0
type AgentNewPromptParams struct {
Command param.Field[string] `json:"command"`
Description param.Field[string] `json:"description"`
IsCommand param.Field[bool] `json:"isCommand"`
IsTemplate param.Field[bool] `json:"isTemplate"`
Name param.Field[string] `json:"name"`
Prompt param.Field[string] `json:"prompt"`
}
func (AgentNewPromptParams) MarshalJSON ¶ added in v0.7.0
func (r AgentNewPromptParams) MarshalJSON() (data []byte, err error)
type AgentNewPromptResponse ¶ added in v0.7.0
type AgentNewPromptResponse struct {
Prompt Prompt `json:"prompt"`
JSON agentNewPromptResponseJSON `json:"-"`
}
func (*AgentNewPromptResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentNewPromptResponse) UnmarshalJSON(data []byte) (err error)
type AgentPolicy ¶ added in v0.7.0
type AgentPolicy struct {
// command_deny_list contains a list of commands that agents are not allowed to
// execute
CommandDenyList []string `json:"commandDenyList,required"`
// mcp_disabled controls whether MCP (Model Context Protocol) is disabled for
// agents
McpDisabled bool `json:"mcpDisabled,required"`
// scm_tools_disabled controls whether SCM (Source Control Management) tools are
// disabled for agents
ScmToolsDisabled bool `json:"scmToolsDisabled,required"`
JSON agentPolicyJSON `json:"-"`
}
AgentPolicy contains agent-specific policy settings for an organization
func (*AgentPolicy) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentPolicy) UnmarshalJSON(data []byte) (err error)
type AgentSendToExecutionParams ¶ added in v0.7.0
type AgentSendToExecutionParams struct {
AgentExecutionID param.Field[string] `json:"agentExecutionId" format:"uuid"`
UserInput param.Field[UserInputBlockParam] `json:"userInput"`
}
func (AgentSendToExecutionParams) MarshalJSON ¶ added in v0.7.0
func (r AgentSendToExecutionParams) MarshalJSON() (data []byte, err error)
type AgentSendToExecutionResponse ¶ added in v0.7.0
type AgentSendToExecutionResponse = interface{}
type AgentService ¶ added in v0.7.0
type AgentService struct {
Options []option.RequestOption
}
AgentService 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 NewAgentService method instead.
func NewAgentService ¶ added in v0.7.0
func NewAgentService(opts ...option.RequestOption) (r *AgentService)
NewAgentService 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 (*AgentService) DeleteExecution ¶ added in v0.7.0
func (r *AgentService) DeleteExecution(ctx context.Context, body AgentDeleteExecutionParams, opts ...option.RequestOption) (res *AgentDeleteExecutionResponse, err error)
Deletes an agent run.
Use this method to:
- Clean up agent runs that are no longer needed
### Examples
- Delete an agent run by ID:
```yaml agentExecutionId: "6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35" ```
func (*AgentService) DeletePrompt ¶ added in v0.7.0
func (r *AgentService) DeletePrompt(ctx context.Context, body AgentDeletePromptParams, opts ...option.RequestOption) (res *AgentDeletePromptResponse, err error)
Deletes a prompt.
Use this method to:
- Remove unused prompts
func (*AgentService) GetExecution ¶ added in v0.7.0
func (r *AgentService) GetExecution(ctx context.Context, body AgentGetExecutionParams, opts ...option.RequestOption) (res *AgentGetExecutionResponse, err error)
Gets details about a specific agent run, including its metadata, specification, and status (phase, error messages, and usage statistics).
Use this method to:
- Monitor the run's progress - Retrieve the agent's conversation URL - Check if an agent run is actively producing output
### Examples
- Get agent run details by ID:
```yaml agentExecutionId: "6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35" ```
func (*AgentService) GetPrompt ¶ added in v0.7.0
func (r *AgentService) GetPrompt(ctx context.Context, body AgentGetPromptParams, opts ...option.RequestOption) (res *AgentGetPromptResponse, err error)
Gets details about a specific prompt including name, description, and prompt content.
Use this method to:
- Retrieve prompt details for editing - Get prompt content for execution
### Examples
- Get prompt details:
```yaml promptId: "07e03a28-65a5-4d98-b532-8ea67b188048" ```
func (*AgentService) ListExecutions ¶ added in v0.7.0
func (r *AgentService) ListExecutions(ctx context.Context, params AgentListExecutionsParams, opts ...option.RequestOption) (res *pagination.AgentExecutionsPage[AgentExecution], err error)
Lists all agent runs matching the specified filter.
Use this method to track multiple agent runs and their associated resources. Results are ordered by their creation time with the newest first.
### Examples
- List agent runs by agent ID:
```yaml filter: agentIds: ["b8a64cfa-43e2-4b9d-9fb3-07edc63f5971"] pagination: pageSize: 10 ```
func (*AgentService) ListExecutionsAutoPaging ¶ added in v0.7.0
func (r *AgentService) ListExecutionsAutoPaging(ctx context.Context, params AgentListExecutionsParams, opts ...option.RequestOption) *pagination.AgentExecutionsPageAutoPager[AgentExecution]
Lists all agent runs matching the specified filter.
Use this method to track multiple agent runs and their associated resources. Results are ordered by their creation time with the newest first.
### Examples
- List agent runs by agent ID:
```yaml filter: agentIds: ["b8a64cfa-43e2-4b9d-9fb3-07edc63f5971"] pagination: pageSize: 10 ```
func (*AgentService) ListPrompts ¶ added in v0.7.0
func (r *AgentService) ListPrompts(ctx context.Context, params AgentListPromptsParams, opts ...option.RequestOption) (res *pagination.PromptsPage[Prompt], err error)
Lists all prompts matching the specified criteria.
Use this method to find and browse prompts across your organization. Results are ordered by their creation time with the newest first.
### Examples
- List all prompts:
Retrieves all prompts with pagination. ```yaml pagination: pageSize: 10 ```
func (*AgentService) ListPromptsAutoPaging ¶ added in v0.7.0
func (r *AgentService) ListPromptsAutoPaging(ctx context.Context, params AgentListPromptsParams, opts ...option.RequestOption) *pagination.PromptsPageAutoPager[Prompt]
Lists all prompts matching the specified criteria.
Use this method to find and browse prompts across your organization. Results are ordered by their creation time with the newest first.
### Examples
- List all prompts:
Retrieves all prompts with pagination. ```yaml pagination: pageSize: 10 ```
func (*AgentService) NewExecutionConversationToken ¶ added in v0.7.0
func (r *AgentService) NewExecutionConversationToken(ctx context.Context, body AgentNewExecutionConversationTokenParams, opts ...option.RequestOption) (res *AgentNewExecutionConversationTokenResponse, err error)
Creates a token for conversation access with a specific agent run.
This method generates a temporary token that can be used to securely connect to an ongoing agent conversation, for example in a web UI.
### Examples
- Create a token to join an agent run conversation in a front-end application:
```yaml agentExecutionId: "6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35" ```
func (*AgentService) NewPrompt ¶ added in v0.7.0
func (r *AgentService) NewPrompt(ctx context.Context, body AgentNewPromptParams, opts ...option.RequestOption) (res *AgentNewPromptResponse, err error)
Creates a new prompt.
Use this method to:
- Define new prompts for templates or commands - Set up organization-wide prompt libraries
func (*AgentService) SendToExecution ¶ added in v0.7.0
func (r *AgentService) SendToExecution(ctx context.Context, body AgentSendToExecutionParams, opts ...option.RequestOption) (res *AgentSendToExecutionResponse, err error)
Sends user input to an active agent run.
This method is used to provide interactive or conversation-based input to an agent. The agent can respond with output blocks containing text, file changes, or tool usage requests.
### Examples
- Send a text message to an agent:
```yaml
agentExecutionId: "6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35"
userInput:
text:
content: "Generate a report based on the latest logs."
```
func (*AgentService) StartExecution ¶ added in v0.7.0
func (r *AgentService) StartExecution(ctx context.Context, body AgentStartExecutionParams, opts ...option.RequestOption) (res *AgentStartExecutionResponse, err error)
Starts (or triggers) an agent run using a provided agent.
Use this method to:
- Launch an agent based on a known agent
### Examples
- Start an agent with a project ID:
```yaml agentId: "b8a64cfa-43e2-4b9d-9fb3-07edc63f5971" codeContext: projectId: "2d22e4eb-31da-467f-882c-27e21550992f" ```
func (*AgentService) StopExecution ¶ added in v0.7.0
func (r *AgentService) StopExecution(ctx context.Context, body AgentStopExecutionParams, opts ...option.RequestOption) (res *AgentStopExecutionResponse, err error)
Stops an active agent execution.
Use this method to:
- Stop an agent that is currently running - Prevent further processing or resource usage
### Examples
- Stop an agent execution by ID:
```yaml agentExecutionId: "6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35" ```
func (*AgentService) UpdatePrompt ¶ added in v0.7.0
func (r *AgentService) UpdatePrompt(ctx context.Context, body AgentUpdatePromptParams, opts ...option.RequestOption) (res *AgentUpdatePromptResponse, err error)
Updates an existing prompt.
Use this method to:
- Modify prompt content or metadata - Change prompt type (template/command)
type AgentStartExecutionParams ¶ added in v0.7.0
type AgentStartExecutionParams struct {
AgentID param.Field[string] `json:"agentId" format:"uuid"`
CodeContext param.Field[AgentCodeContextParam] `json:"codeContext"`
// mode specifies the operational mode for this agent execution If not specified,
// defaults to AGENT_MODE_EXECUTION
Mode param.Field[AgentMode] `json:"mode"`
Name param.Field[string] `json:"name"`
// workflow_action_id is an optional reference to the workflow execution action
// that created this agent execution. Used for tracking and event correlation.
WorkflowActionID param.Field[string] `json:"workflowActionId" format:"uuid"`
}
func (AgentStartExecutionParams) MarshalJSON ¶ added in v0.7.0
func (r AgentStartExecutionParams) MarshalJSON() (data []byte, err error)
type AgentStartExecutionResponse ¶ added in v0.7.0
type AgentStartExecutionResponse struct {
AgentExecutionID string `json:"agentExecutionId" format:"uuid"`
JSON agentStartExecutionResponseJSON `json:"-"`
}
func (*AgentStartExecutionResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentStartExecutionResponse) UnmarshalJSON(data []byte) (err error)
type AgentStopExecutionParams ¶ added in v0.7.0
type AgentStopExecutionParams struct {
AgentExecutionID param.Field[string] `json:"agentExecutionId" format:"uuid"`
}
func (AgentStopExecutionParams) MarshalJSON ¶ added in v0.7.0
func (r AgentStopExecutionParams) MarshalJSON() (data []byte, err error)
type AgentStopExecutionResponse ¶ added in v0.7.0
type AgentStopExecutionResponse = interface{}
type AgentUpdatePromptParams ¶ added in v0.7.0
type AgentUpdatePromptParams struct {
// Metadata updates
Metadata param.Field[AgentUpdatePromptParamsMetadata] `json:"metadata"`
// The ID of the prompt to update
PromptID param.Field[string] `json:"promptId" format:"uuid"`
// Spec updates
Spec param.Field[AgentUpdatePromptParamsSpec] `json:"spec"`
}
func (AgentUpdatePromptParams) MarshalJSON ¶ added in v0.7.0
func (r AgentUpdatePromptParams) MarshalJSON() (data []byte, err error)
type AgentUpdatePromptParamsMetadata ¶ added in v0.7.0
type AgentUpdatePromptParamsMetadata struct {
// A description of what the prompt does
Description param.Field[string] `json:"description"`
// The name of the prompt
Name param.Field[string] `json:"name"`
}
Metadata updates
func (AgentUpdatePromptParamsMetadata) MarshalJSON ¶ added in v0.7.0
func (r AgentUpdatePromptParamsMetadata) MarshalJSON() (data []byte, err error)
type AgentUpdatePromptParamsSpec ¶ added in v0.7.0
type AgentUpdatePromptParamsSpec struct {
// The command string (unique within organization)
Command param.Field[string] `json:"command"`
// Whether this prompt is a command
IsCommand param.Field[bool] `json:"isCommand"`
// Whether this prompt is a template
IsTemplate param.Field[bool] `json:"isTemplate"`
// The prompt content
Prompt param.Field[string] `json:"prompt"`
}
Spec updates
func (AgentUpdatePromptParamsSpec) MarshalJSON ¶ added in v0.7.0
func (r AgentUpdatePromptParamsSpec) MarshalJSON() (data []byte, err error)
type AgentUpdatePromptResponse ¶ added in v0.7.0
type AgentUpdatePromptResponse struct {
Prompt Prompt `json:"prompt"`
JSON agentUpdatePromptResponseJSON `json:"-"`
}
func (*AgentUpdatePromptResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *AgentUpdatePromptResponse) UnmarshalJSON(data []byte) (err error)
type AutomationTrigger ¶
type AutomationTrigger = shared.AutomationTrigger
An AutomationTrigger represents a trigger for an automation action. The `manual` field shows a start button in the UI for manually triggering the automation. The `post_machine_start` field indicates that the automation should be triggered after the machine has started, before the devcontainer is ready. This is used for machine-level services like security agents that need to start early. The `post_environment_start` field indicates that the automation should be triggered after the environment has started (devcontainer ready). The `post_devcontainer_start` field indicates that the automation should be triggered after the dev container has started. The `prebuild` field starts the automation during a prebuild of an environment. This phase does not have user secrets available. Note: The prebuild trigger can only be used with tasks, not services.
This is an alias to an internal type.
type AutomationTriggerParam ¶
type AutomationTriggerParam = shared.AutomationTriggerParam
An AutomationTrigger represents a trigger for an automation action. The `manual` field shows a start button in the UI for manually triggering the automation. The `post_machine_start` field indicates that the automation should be triggered after the machine has started, before the devcontainer is ready. This is used for machine-level services like security agents that need to start early. The `post_environment_start` field indicates that the automation should be triggered after the environment has started (devcontainer ready). The `post_devcontainer_start` field indicates that the automation should be triggered after the dev container has started. The `prebuild` field starts the automation during a prebuild of an environment. This phase does not have user secrets available. Note: The prebuild trigger can only be used with tasks, not services.
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"`
Role param.Field[AutomationsFileServicesRole] `json:"role"`
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 AutomationsFileServicesRole ¶ added in v0.7.0
type AutomationsFileServicesRole string
const ( AutomationsFileServicesRoleEmpty AutomationsFileServicesRole = "" AutomationsFileServicesRoleDefault AutomationsFileServicesRole = "default" AutomationsFileServicesRoleEditor AutomationsFileServicesRole = "editor" AutomationsFileServicesRoleAIAgent AutomationsFileServicesRole = "ai-agent" )
func (AutomationsFileServicesRole) IsKnown ¶ added in v0.7.0
func (r AutomationsFileServicesRole) IsKnown() bool
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" AutomationsFileTasksTriggeredByPrebuild AutomationsFileTasksTriggeredBy = "prebuild" )
func (AutomationsFileTasksTriggeredBy) IsKnown ¶
func (r AutomationsFileTasksTriggeredBy) IsKnown() bool
type BreadcrumbParam ¶ added in v0.7.0
type BreadcrumbParam struct {
// Breadcrumb category
Category param.Field[string] `json:"category"`
// Additional breadcrumb data
Data param.Field[map[string]string] `json:"data"`
// Breadcrumb level
Level param.Field[ErrorLevel] `json:"level"`
// Breadcrumb message
Message param.Field[string] `json:"message"`
// When the breadcrumb occurred
Timestamp param.Field[time.Time] `json:"timestamp" format:"date-time"`
// Breadcrumb type (e.g., "navigation", "http", "user", "error")
Type param.Field[string] `json:"type"`
}
Breadcrumb information (Sentry-compatible)
func (BreadcrumbParam) MarshalJSON ¶ added in v0.7.0
func (r BreadcrumbParam) MarshalJSON() (data []byte, err error)
type Client ¶
type Client struct {
Options []option.RequestOption
Accounts *AccountService
Agents *AgentService
Editors *EditorService
Environments *EnvironmentService
Errors *ErrorService
Events *EventService
Gateways *GatewayService
Groups *GroupService
Identity *IdentityService
Organizations *OrganizationService
Prebuilds *PrebuildService
Projects *ProjectService
Runners *RunnerService
Secrets *SecretService
Usage *UsageService
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, GITPOD_BASE_URL). 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 CrowdStrikeConfig ¶ added in v0.7.0
type CrowdStrikeConfig struct {
// additional*options contains additional FALCONCTL_OPT*\* options as key-value
// pairs. Keys should NOT include the FALCONCTL*OPT* prefix.
AdditionalOptions map[string]string `json:"additionalOptions"`
// cid_secret_id references an organization secret containing the Customer ID
// (CID).
CidSecretID string `json:"cidSecretId" format:"uuid"`
// enabled controls whether CrowdStrike Falcon is deployed to environments
Enabled bool `json:"enabled"`
// image is the CrowdStrike Falcon sensor container image reference
Image string `json:"image"`
// tags are optional tags to apply to the Falcon sensor (comma-separated)
Tags string `json:"tags"`
JSON crowdStrikeConfigJSON `json:"-"`
}
CrowdStrikeConfig configures CrowdStrike Falcon sensor deployment
func (*CrowdStrikeConfig) UnmarshalJSON ¶ added in v0.7.0
func (r *CrowdStrikeConfig) UnmarshalJSON(data []byte) (err error)
type CustomDomain ¶ added in v0.7.0
type CustomDomain struct {
// id is the unique identifier of the custom domain
ID string `json:"id,required" format:"uuid"`
// created_at is when the custom domain was created
CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
// domain_name is the custom domain name
DomainName string `json:"domainName,required"`
// organization_id is the ID of the organization this custom domain belongs to
OrganizationID string `json:"organizationId,required" format:"uuid"`
// updated_at is when the custom domain was last updated
UpdatedAt time.Time `json:"updatedAt,required" format:"date-time"`
// aws_account_id is the AWS account ID (deprecated: use cloud_account_id)
//
// Deprecated: deprecated
AwsAccountID string `json:"awsAccountId"`
// cloud_account_id is the unified cloud account identifier (AWS Account ID or GCP
// Project ID)
CloudAccountID string `json:"cloudAccountId"`
// provider is the cloud provider for this custom domain
Provider CustomDomainProvider `json:"provider"`
JSON customDomainJSON `json:"-"`
}
CustomDomain represents a custom domain configuration for an organization
func (*CustomDomain) UnmarshalJSON ¶ added in v0.7.0
func (r *CustomDomain) UnmarshalJSON(data []byte) (err error)
type CustomDomainProvider ¶ added in v0.7.0
type CustomDomainProvider string
CustomDomainProvider represents the cloud provider for custom domain configuration
const ( CustomDomainProviderUnspecified CustomDomainProvider = "CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED" CustomDomainProviderAws CustomDomainProvider = "CUSTOM_DOMAIN_PROVIDER_AWS" CustomDomainProviderGcp CustomDomainProvider = "CUSTOM_DOMAIN_PROVIDER_GCP" )
func (CustomDomainProvider) IsKnown ¶ added in v0.7.0
func (r CustomDomainProvider) IsKnown() bool
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 DotfilesConfiguration ¶ added in v0.5.0
type DotfilesConfiguration struct {
// The URL of a dotfiles repository.
Repository string `json:"repository" format:"uri"`
JSON dotfilesConfigurationJSON `json:"-"`
}
func (*DotfilesConfiguration) UnmarshalJSON ¶ added in v0.5.0
func (r *DotfilesConfiguration) UnmarshalJSON(data []byte) (err error)
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"`
// versions contains the list of available versions for this editor
Versions []EditorVersion `json:"versions"`
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"`
// filter contains the filter options for listing editors
Filter param.Field[EditorListParamsFilter] `json:"filter"`
// 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 EditorListParamsFilter ¶ added in v0.5.0
type EditorListParamsFilter struct {
// allowed_by_policy filters the response to only editors that are allowed by the
// policies enforced in the organization
AllowedByPolicy param.Field[bool] `json:"allowedByPolicy"`
}
filter contains the filter options for listing editors
func (EditorListParamsFilter) MarshalJSON ¶ added in v0.5.0
func (r EditorListParamsFilter) MarshalJSON() (data []byte, err error)
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"`
// version is the editor version to use If not provided, the latest version will be
// installed
//
// Examples for JetBrains: 2025.2
Version param.Field[string] `json:"version"`
}
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, optionally filtered to those allowed in an organization.
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 ```
- List editors available to the organization:
Shows all available editors that are allowed by the policies enforced in the organization with pagination. ```yaml pagination: pageSize: 20 filter: allowedByPolicy: true ```
func (*EditorService) ListAutoPaging ¶
func (r *EditorService) ListAutoPaging(ctx context.Context, params EditorListParams, opts ...option.RequestOption) *pagination.EditorsPageAutoPager[Editor]
Lists all available code editors, optionally filtered to those allowed in an organization.
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 ```
- List editors available to the organization:
Shows all available editors that are allowed by the policies enforced in the organization with pagination. ```yaml pagination: pageSize: 20 filter: allowedByPolicy: true ```
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 EditorVersion ¶ added in v0.7.0
type EditorVersion struct {
// version is the version string of the editor Examples for JetBrains: 2025.2
Version string `json:"version,required"`
JSON editorVersionJSON `json:"-"`
}
func (*EditorVersion) UnmarshalJSON ¶ added in v0.7.0
func (r *EditorVersion) UnmarshalJSON(data []byte) (err error)
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"`
// roles filters the response to only services with these roles
Roles param.Field[[]ServiceRole] `json:"roles"`
// 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"`
Role param.Field[ServiceRole] `json:"role"`
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"`
Env param.Field[[]shared.EnvironmentVariableItemParam] `json:"env"`
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"`
// setting an output field to empty string will unset it.
Output param.Field[map[string]string] `json:"output"`
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"`
Env param.Field[[]shared.EnvironmentVariableItemParam] `json:"env"`
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" EnvironmentInitializerSpecsGitTargetModeCloneTargetModeRemoteTag EnvironmentInitializerSpecsGitTargetMode = "CLONE_TARGET_MODE_REMOTE_TAG" )
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 {
// archival_status filters the response based on environment archive status
ArchivalStatus param.Field[EnvironmentListParamsFilterArchivalStatus] `json:"archivalStatus"`
// created_before filters environments created before this timestamp
CreatedBefore param.Field[time.Time] `json:"createdBefore" format:"date-time"`
// 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"`
// roles filters the response to only Environments with the specified roles
Roles param.Field[[]EnvironmentRole] `json:"roles"`
// 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 EnvironmentListParamsFilterArchivalStatus ¶ added in v0.5.0
type EnvironmentListParamsFilterArchivalStatus string
archival_status filters the response based on environment archive status
const ( EnvironmentListParamsFilterArchivalStatusArchivalStatusUnspecified EnvironmentListParamsFilterArchivalStatus = "ARCHIVAL_STATUS_UNSPECIFIED" EnvironmentListParamsFilterArchivalStatusArchivalStatusActive EnvironmentListParamsFilterArchivalStatus = "ARCHIVAL_STATUS_ACTIVE" EnvironmentListParamsFilterArchivalStatusArchivalStatusArchived EnvironmentListParamsFilterArchivalStatus = "ARCHIVAL_STATUS_ARCHIVED" EnvironmentListParamsFilterArchivalStatusArchivalStatusAll EnvironmentListParamsFilterArchivalStatus = "ARCHIVAL_STATUS_ALL" )
func (EnvironmentListParamsFilterArchivalStatus) IsKnown ¶ added in v0.5.0
func (r EnvironmentListParamsFilterArchivalStatus) IsKnown() bool
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 archived. If not set, the environment is not
// archived.
ArchivedAt time.Time `json:"archivedAt" format:"date-time"`
// 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"`
// prebuild_id is the ID of the prebuild this environment was created from. Only
// set if the environment was created from a prebuild.
PrebuildID string `json:"prebuildId,nullable" format:"uuid"`
// If the Environment was started from a project, the project_id will reference the
// project.
ProjectID string `json:"projectId"`
// role is the role of the environment
Role EnvironmentRole `json:"role"`
// 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 EnvironmentNewEnvironmentTokenParams ¶ added in v0.5.0
type EnvironmentNewEnvironmentTokenParams struct {
// environment_id specifies the environment for which the access token should be
// created.
EnvironmentID param.Field[string] `json:"environmentId,required" format:"uuid"`
}
func (EnvironmentNewEnvironmentTokenParams) MarshalJSON ¶ added in v0.5.0
func (r EnvironmentNewEnvironmentTokenParams) MarshalJSON() (data []byte, err error)
type EnvironmentNewEnvironmentTokenResponse ¶ added in v0.5.0
type EnvironmentNewEnvironmentTokenResponse struct {
// access_token is the token that can be used for environment authentication
AccessToken string `json:"accessToken,required"`
JSON environmentNewEnvironmentTokenResponseJSON `json:"-"`
}
func (*EnvironmentNewEnvironmentTokenResponse) UnmarshalJSON ¶ added in v0.5.0
func (r *EnvironmentNewEnvironmentTokenResponse) 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 EnvironmentRole ¶ added in v0.7.0
type EnvironmentRole string
EnvironmentRole represents the role of an environment
const ( EnvironmentRoleUnspecified EnvironmentRole = "ENVIRONMENT_ROLE_UNSPECIFIED" EnvironmentRoleDefault EnvironmentRole = "ENVIRONMENT_ROLE_DEFAULT" EnvironmentRolePrebuild EnvironmentRole = "ENVIRONMENT_ROLE_PREBUILD" EnvironmentRoleWorkflow EnvironmentRole = "ENVIRONMENT_ROLE_WORKFLOW" )
func (EnvironmentRole) IsKnown ¶ added in v0.7.0
func (r EnvironmentRole) 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) NewEnvironmentToken ¶ added in v0.5.0
func (r *EnvironmentService) NewEnvironmentToken(ctx context.Context, body EnvironmentNewEnvironmentTokenParams, opts ...option.RequestOption) (res *EnvironmentNewEnvironmentTokenResponse, err error)
Creates an access token for the environment.
Generated tokens are valid for one hour and provide environment-specific access permissions. The token is scoped to a specific environment.
### Examples
- Generate environment token:
Creates a temporary access token for accessing an environment. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" ```
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) Unarchive ¶ added in v0.5.0
func (r *EnvironmentService) Unarchive(ctx context.Context, body EnvironmentUnarchiveParams, opts ...option.RequestOption) (res *EnvironmentUnarchiveResponse, err error)
Unarchives an environment.
### Examples
- Unarchive an environment:
```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 your network
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"`
// workflow_action_id is an optional reference to the workflow execution action
// that created this environment. Used for tracking and event correlation.
WorkflowActionID string `json:"workflowActionId,nullable" format:"uuid"`
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"`
// trigger_filter specifies which automation triggers should execute. When set,
// only automations matching these triggers will run. If empty/unset, all triggers
// are evaluated normally.
TriggerFilter []shared.AutomationTrigger `json:"triggerFilter"`
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"`
// trigger_filter specifies which automation triggers should execute. When set,
// only automations matching these triggers will run. If empty/unset, all triggers
// are evaluated normally.
TriggerFilter param.Field[[]shared.AutomationTriggerParam] `json:"triggerFilter"`
}
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 {
// default_devcontainer_image is the default image that is used to start the
// devcontainer if no devcontainer config file is found
DefaultDevcontainerImage string `json:"defaultDevcontainerImage"`
// 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"`
// lifecycle_stage controls which devcontainer lifecycle commands are executed.
// Defaults to FULL if not specified.
LifecycleStage EnvironmentSpecDevcontainerLifecycleStage `json:"lifecycleStage"`
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 EnvironmentSpecDevcontainerLifecycleStage ¶ added in v0.7.0
type EnvironmentSpecDevcontainerLifecycleStage string
lifecycle_stage controls which devcontainer lifecycle commands are executed. Defaults to FULL if not specified.
const ( EnvironmentSpecDevcontainerLifecycleStageLifecycleStageUnspecified EnvironmentSpecDevcontainerLifecycleStage = "LIFECYCLE_STAGE_UNSPECIFIED" EnvironmentSpecDevcontainerLifecycleStageLifecycleStageFull EnvironmentSpecDevcontainerLifecycleStage = "LIFECYCLE_STAGE_FULL" EnvironmentSpecDevcontainerLifecycleStageLifecycleStagePrebuild EnvironmentSpecDevcontainerLifecycleStage = "LIFECYCLE_STAGE_PREBUILD" )
func (EnvironmentSpecDevcontainerLifecycleStage) IsKnown ¶ added in v0.7.0
func (r EnvironmentSpecDevcontainerLifecycleStage) IsKnown() bool
type EnvironmentSpecDevcontainerParam ¶
type EnvironmentSpecDevcontainerParam struct {
// default_devcontainer_image is the default image that is used to start the
// devcontainer if no devcontainer config file is found
DefaultDevcontainerImage param.Field[string] `json:"defaultDevcontainerImage"`
// 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"`
// lifecycle_stage controls which devcontainer lifecycle commands are executed.
// Defaults to FULL if not specified.
LifecycleStage param.Field[EnvironmentSpecDevcontainerLifecycleStage] `json:"lifecycleStage"`
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 your network
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"`
// workflow_action_id is an optional reference to the workflow execution action
// that created this environment. Used for tracking and event correlation.
WorkflowActionID param.Field[string] `json:"workflowActionId" format:"uuid"`
}
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"`
// protocol for communication (Gateway proxy → user environment service). this
// setting only affects the protocol used between Gateway and user environment
// services.
Protocol EnvironmentSpecPortsProtocol `json:"protocol"`
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"`
// protocol for communication (Gateway proxy → user environment service). this
// setting only affects the protocol used between Gateway and user environment
// services.
Protocol param.Field[EnvironmentSpecPortsProtocol] `json:"protocol"`
}
func (EnvironmentSpecPortParam) MarshalJSON ¶
func (r EnvironmentSpecPortParam) MarshalJSON() (data []byte, err error)
type EnvironmentSpecPortsProtocol ¶ added in v0.7.0
type EnvironmentSpecPortsProtocol string
protocol for communication (Gateway proxy → user environment service). this setting only affects the protocol used between Gateway and user environment services.
const ( EnvironmentSpecPortsProtocolProtocolUnspecified EnvironmentSpecPortsProtocol = "PROTOCOL_UNSPECIFIED" EnvironmentSpecPortsProtocolProtocolHTTP EnvironmentSpecPortsProtocol = "PROTOCOL_HTTP" EnvironmentSpecPortsProtocolProtocolHTTPS EnvironmentSpecPortsProtocol = "PROTOCOL_HTTPS" )
func (EnvironmentSpecPortsProtocol) IsKnown ¶ added in v0.7.0
func (r EnvironmentSpecPortsProtocol) IsKnown() bool
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 {
// id is the unique identifier of the secret.
ID string `json:"id"`
// api_only indicates the secret is only available via API/CLI. These secrets are
// resolved but NOT automatically injected into services or devcontainers.
APIOnly bool `json:"apiOnly"`
// 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 {
// id is the unique identifier of the secret.
ID param.Field[string] `json:"id"`
// api_only indicates the secret is only available via API/CLI. These secrets are
// resolved but NOT automatically injected into services or devcontainers.
APIOnly param.Field[bool] `json:"apiOnly"`
// 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"`
// warning_message contains warnings, e.g. when no triggers are defined in the
// automations file.
WarningMessage string `json:"warningMessage"`
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"`
// ops is the URL at which the environment ops service can be accessed.
Ops string `json:"ops"`
Ports []EnvironmentStatusEnvironmentURLsPort `json:"ports"`
// SSH is the URL at which the environment can be accessed via SSH.
SSH EnvironmentStatusEnvironmentURLsSSH `json:"ssh"`
// support_bundle is the URL at which the environment support bundle can be
// accessed.
SupportBundle string `json:"supportBundle"`
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 {
AmiID string `json:"amiId"`
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 {
// id is the unique identifier of the secret.
ID string `json:"id"`
// 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 EnvironmentUnarchiveParams ¶ added in v0.5.0
type EnvironmentUnarchiveParams struct {
// environment_id specifies the environment to unarchive.
//
// +required
EnvironmentID param.Field[string] `json:"environmentId" format:"uuid"`
}
func (EnvironmentUnarchiveParams) MarshalJSON ¶ added in v0.5.0
func (r EnvironmentUnarchiveParams) MarshalJSON() (data []byte, err error)
type EnvironmentUnarchiveResponse ¶ added in v0.5.0
type EnvironmentUnarchiveResponse = 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[EnvironmentUpdateParamsMetadata] `json:"metadata"`
Spec param.Field[EnvironmentUpdateParamsSpec] `json:"spec"`
}
func (EnvironmentUpdateParams) MarshalJSON ¶
func (r EnvironmentUpdateParams) MarshalJSON() (data []byte, err error)
type EnvironmentUpdateParamsMetadata ¶ added in v0.5.0
type EnvironmentUpdateParamsMetadata struct {
// name is the user-defined display name of the environment
Name param.Field[string] `json:"name"`
}
func (EnvironmentUpdateParamsMetadata) MarshalJSON ¶ added in v0.5.0
func (r EnvironmentUpdateParamsMetadata) 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"`
// protocol for communication (Gateway proxy → user environment service). this
// setting only affects the protocol used between Gateway and user environment
// services.
Protocol param.Field[EnvironmentUpdateParamsSpecPortsProtocol] `json:"protocol"`
}
func (EnvironmentUpdateParamsSpecPort) MarshalJSON ¶
func (r EnvironmentUpdateParamsSpecPort) MarshalJSON() (data []byte, err error)
type EnvironmentUpdateParamsSpecPortsProtocol ¶ added in v0.7.0
type EnvironmentUpdateParamsSpecPortsProtocol string
protocol for communication (Gateway proxy → user environment service). this setting only affects the protocol used between Gateway and user environment services.
const ( EnvironmentUpdateParamsSpecPortsProtocolProtocolUnspecified EnvironmentUpdateParamsSpecPortsProtocol = "PROTOCOL_UNSPECIFIED" EnvironmentUpdateParamsSpecPortsProtocolProtocolHTTP EnvironmentUpdateParamsSpecPortsProtocol = "PROTOCOL_HTTP" EnvironmentUpdateParamsSpecPortsProtocolProtocolHTTPS EnvironmentUpdateParamsSpecPortsProtocol = "PROTOCOL_HTTPS" )
func (EnvironmentUpdateParamsSpecPortsProtocol) IsKnown ¶ added in v0.7.0
func (r EnvironmentUpdateParamsSpecPortsProtocol) IsKnown() bool
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 EnvironmentUsageRecord ¶ added in v0.5.0
type EnvironmentUsageRecord struct {
// Environment usage record ID.
ID string `json:"id"`
// Time when the environment was created.
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Environment class ID associated with the record.
EnvironmentClassID string `json:"environmentClassId"`
// Environment ID associated with the record.
EnvironmentID string `json:"environmentId"`
// Project ID associated with the environment (if available).
ProjectID string `json:"projectId"`
// Runner ID associated with the environment.
RunnerID string `json:"runnerId"`
// Time when the environment was stopped.
StoppedAt time.Time `json:"stoppedAt" format:"date-time"`
// User ID is the ID of the user who created the environment associated with the
// record.
UserID string `json:"userId"`
JSON environmentUsageRecordJSON `json:"-"`
}
EnvironmentUsageRecord represents a record of an environment from start to stop.
func (*EnvironmentUsageRecord) UnmarshalJSON ¶ added in v0.5.0
func (r *EnvironmentUsageRecord) UnmarshalJSON(data []byte) (err error)
type EnvironmentVariableItem ¶ added in v0.7.0
type EnvironmentVariableItem = shared.EnvironmentVariableItem
EnvironmentVariableItem represents an environment variable that can be set either from a literal value or from a secret reference.
This is an alias to an internal type.
type EnvironmentVariableItemParam ¶ added in v0.7.0
type EnvironmentVariableItemParam = shared.EnvironmentVariableItemParam
EnvironmentVariableItem represents an environment variable that can be set either from a literal value or from a secret reference.
This is an alias to an internal type.
type EnvironmentVariableSource ¶ added in v0.7.0
type EnvironmentVariableSource = shared.EnvironmentVariableSource
EnvironmentVariableSource specifies a source for an environment variable value.
This is an alias to an internal type.
type EnvironmentVariableSourceParam ¶ added in v0.7.0
type EnvironmentVariableSourceParam = shared.EnvironmentVariableSourceParam
EnvironmentVariableSource specifies a source for an environment variable value.
This is an alias to an internal type.
type ErrorEventParam ¶ added in v0.7.0
type ErrorEventParam struct {
// Breadcrumbs leading up to the error
Breadcrumbs param.Field[[]BreadcrumbParam] `json:"breadcrumbs"`
// Environment (e.g., "production", "staging", "development")
Environment param.Field[string] `json:"environment"`
// Unique event identifier (required by Sentry)
EventID param.Field[string] `json:"eventId"`
// Exception information (primary error data)
Exceptions param.Field[[]ExceptionInfoParam] `json:"exceptions"`
// Additional arbitrary metadata
Extra param.Field[map[string]string] `json:"extra"`
// Custom fingerprint for grouping
Fingerprint param.Field[[]string] `json:"fingerprint"`
// Identity ID of the user (UUID)
IdentityID param.Field[string] `json:"identityId"`
// Error severity level
Level param.Field[ErrorLevel] `json:"level"`
// Logger name
Logger param.Field[string] `json:"logger"`
// Modules/dependencies information
Modules param.Field[map[string]string] `json:"modules"`
// Platform identifier (required by Sentry)
Platform param.Field[string] `json:"platform"`
// Release version
Release param.Field[string] `json:"release"`
// Request information
Request param.Field[RequestInfoParam] `json:"request"`
// SDK information
SDK param.Field[map[string]string] `json:"sdk"`
// Server/host name
ServerName param.Field[string] `json:"serverName"`
// Tags for filtering and grouping
Tags param.Field[map[string]string] `json:"tags"`
// When the event occurred (required by Sentry)
Timestamp param.Field[time.Time] `json:"timestamp" format:"date-time"`
// Transaction name (e.g., route name, function name)
Transaction param.Field[string] `json:"transaction"`
}
ErrorEvent contains comprehensive error information (Sentry-compatible)
func (ErrorEventParam) MarshalJSON ¶ added in v0.7.0
func (r ErrorEventParam) MarshalJSON() (data []byte, err error)
type ErrorLevel ¶ added in v0.7.0
type ErrorLevel string
Error severity levels (aligned with Sentry levels)
const ( ErrorLevelUnspecified ErrorLevel = "ERROR_LEVEL_UNSPECIFIED" ErrorLevelDebug ErrorLevel = "ERROR_LEVEL_DEBUG" ErrorLevelInfo ErrorLevel = "ERROR_LEVEL_INFO" ErrorLevelWarning ErrorLevel = "ERROR_LEVEL_WARNING" ErrorLevelError ErrorLevel = "ERROR_LEVEL_ERROR" ErrorLevelFatal ErrorLevel = "ERROR_LEVEL_FATAL" )
func (ErrorLevel) IsKnown ¶ added in v0.7.0
func (r ErrorLevel) IsKnown() bool
type ErrorReportErrorsParams ¶ added in v0.7.0
type ErrorReportErrorsParams struct {
// Error events to be reported (batch) - now using Sentry-compatible structure
Events param.Field[[]ErrorEventParam] `json:"events"`
}
func (ErrorReportErrorsParams) MarshalJSON ¶ added in v0.7.0
func (r ErrorReportErrorsParams) MarshalJSON() (data []byte, err error)
type ErrorReportErrorsResponse ¶ added in v0.7.0
type ErrorReportErrorsResponse = interface{}
type ErrorService ¶ added in v0.7.0
type ErrorService struct {
Options []option.RequestOption
}
ErrorService 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 NewErrorService method instead.
func NewErrorService ¶ added in v0.7.0
func NewErrorService(opts ...option.RequestOption) (r *ErrorService)
NewErrorService 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 (*ErrorService) ReportErrors ¶ added in v0.7.0
func (r *ErrorService) ReportErrors(ctx context.Context, body ErrorReportErrorsParams, opts ...option.RequestOption) (res *ErrorReportErrorsResponse, err error)
ReportErrors allows clients to report batches of errors that will be sent to error reporting systems. The structure is fully compatible with Sentry's event payload format.
Use this method to:
- Report client-side errors and exceptions - Track application crashes and panics - Send error context and metadata for debugging
### Examples
- Report a JavaScript error with Sentry-compatible structure: The service accepts events with comprehensive error information including stack traces, identity context, breadcrumbs, and metadata that align with Sentry's event payload format.
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[[]shared.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 shared.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 shared.ResourceType `json:"resourceType"`
JSON eventWatchResponseJSON `json:"-"`
}
func (*EventWatchResponse) UnmarshalJSON ¶
func (r *EventWatchResponse) UnmarshalJSON(data []byte) (err error)
type ExceptionInfoParam ¶ added in v0.7.0
type ExceptionInfoParam struct {
// Exception mechanism
Mechanism param.Field[ExceptionMechanismParam] `json:"mechanism"`
// Module or package where the exception type is defined
Module param.Field[string] `json:"module"`
// Stack trace frames
Stacktrace param.Field[[]StackFrameParam] `json:"stacktrace"`
// Thread ID if applicable
ThreadID param.Field[string] `json:"threadId"`
// Exception type/class name
Type param.Field[string] `json:"type"`
// Exception message/value
Value param.Field[string] `json:"value"`
}
Exception information (Sentry-compatible)
func (ExceptionInfoParam) MarshalJSON ¶ added in v0.7.0
func (r ExceptionInfoParam) MarshalJSON() (data []byte, err error)
type ExceptionMechanismParam ¶ added in v0.7.0
type ExceptionMechanismParam struct {
// Additional mechanism-specific data
Data param.Field[map[string]string] `json:"data"`
// Human-readable description of the mechanism
Description param.Field[string] `json:"description"`
// Whether the exception was handled by user code
Handled param.Field[bool] `json:"handled"`
// Whether this is a synthetic exception (created by SDK)
Synthetic param.Field[bool] `json:"synthetic"`
// Type of mechanism (e.g., "generic", "promise", "onerror")
Type param.Field[string] `json:"type"`
}
Exception mechanism information (Sentry-compatible)
func (ExceptionMechanismParam) MarshalJSON ¶ added in v0.7.0
func (r ExceptionMechanismParam) MarshalJSON() (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 Gateway ¶ added in v0.5.0
Gateway represents a system gateway that provides access to services
This is an alias to an internal type.
type GatewayInfo ¶ added in v0.5.0
type GatewayInfo struct {
// Gateway represents a system gateway that provides access to services
Gateway shared.Gateway `json:"gateway"`
// latency is the round-trip time of the runner to the gateway in milliseconds.
Latency string `json:"latency" format:"regex"`
JSON gatewayInfoJSON `json:"-"`
}
func (*GatewayInfo) UnmarshalJSON ¶ added in v0.5.0
func (r *GatewayInfo) UnmarshalJSON(data []byte) (err error)
type GatewayListParams ¶ added in v0.5.0
type GatewayListParams struct {
Token param.Field[string] `query:"token"`
PageSize param.Field[int64] `query:"pageSize"`
// pagination contains the pagination options for listing gateways
Pagination param.Field[GatewayListParamsPagination] `json:"pagination"`
}
func (GatewayListParams) MarshalJSON ¶ added in v0.5.0
func (r GatewayListParams) MarshalJSON() (data []byte, err error)
func (GatewayListParams) URLQuery ¶ added in v0.5.0
func (r GatewayListParams) URLQuery() (v url.Values)
URLQuery serializes GatewayListParams's query parameters as `url.Values`.
type GatewayListParamsPagination ¶ added in v0.5.0
type GatewayListParamsPagination 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 gateways
func (GatewayListParamsPagination) MarshalJSON ¶ added in v0.5.0
func (r GatewayListParamsPagination) MarshalJSON() (data []byte, err error)
type GatewayService ¶ added in v0.5.0
type GatewayService struct {
Options []option.RequestOption
}
GatewayService 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 NewGatewayService method instead.
func NewGatewayService ¶ added in v0.5.0
func NewGatewayService(opts ...option.RequestOption) (r *GatewayService)
NewGatewayService 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 (*GatewayService) List ¶ added in v0.5.0
func (r *GatewayService) List(ctx context.Context, params GatewayListParams, opts ...option.RequestOption) (res *pagination.GatewaysPage[shared.Gateway], err error)
ListGateways
func (*GatewayService) ListAutoPaging ¶ added in v0.5.0
func (r *GatewayService) ListAutoPaging(ctx context.Context, params GatewayListParams, opts ...option.RequestOption) *pagination.GatewaysPageAutoPager[shared.Gateway]
ListGateways
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"`
Description string `json:"description"`
// member_count is the total number of members in this group
MemberCount int64 `json:"memberCount"`
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 GroupDeleteParams ¶ added in v0.7.0
func (GroupDeleteParams) MarshalJSON ¶ added in v0.7.0
func (r GroupDeleteParams) MarshalJSON() (data []byte, err error)
type GroupDeleteResponse ¶ added in v0.7.0
type GroupDeleteResponse = interface{}
type GroupGetParams ¶ added in v0.7.0
func (GroupGetParams) MarshalJSON ¶ added in v0.7.0
func (r GroupGetParams) MarshalJSON() (data []byte, err error)
type GroupGetResponse ¶ added in v0.7.0
type GroupGetResponse struct {
Group Group `json:"group"`
JSON groupGetResponseJSON `json:"-"`
}
func (*GroupGetResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *GroupGetResponse) UnmarshalJSON(data []byte) (err error)
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 GroupMembership ¶ added in v0.7.0
type GroupMembership struct {
// Unique identifier for the group membership
ID string `json:"id" format:"uuid"`
// Subject's avatar URL
AvatarURL string `json:"avatarUrl"`
// Group identifier
GroupID string `json:"groupId" format:"uuid"`
// Subject's display name
Name string `json:"name"`
// Subject (user, runner, environment, service account, etc.)
Subject shared.Subject `json:"subject"`
JSON groupMembershipJSON `json:"-"`
}
GroupMembership represents a subject's membership in a group
func (*GroupMembership) UnmarshalJSON ¶ added in v0.7.0
func (r *GroupMembership) UnmarshalJSON(data []byte) (err error)
type GroupMembershipDeleteParams ¶ added in v0.7.0
type GroupMembershipDeleteParams struct {
// The membership to delete
MembershipID param.Field[string] `json:"membershipId" format:"uuid"`
}
func (GroupMembershipDeleteParams) MarshalJSON ¶ added in v0.7.0
func (r GroupMembershipDeleteParams) MarshalJSON() (data []byte, err error)
type GroupMembershipDeleteResponse ¶ added in v0.7.0
type GroupMembershipDeleteResponse = interface{}
type GroupMembershipListParams ¶ added in v0.7.0
type GroupMembershipListParams struct {
Token param.Field[string] `query:"token"`
PageSize param.Field[int64] `query:"pageSize"`
GroupID param.Field[string] `json:"groupId" format:"uuid"`
// pagination contains the pagination options for listing memberships
Pagination param.Field[GroupMembershipListParamsPagination] `json:"pagination"`
}
func (GroupMembershipListParams) MarshalJSON ¶ added in v0.7.0
func (r GroupMembershipListParams) MarshalJSON() (data []byte, err error)
func (GroupMembershipListParams) URLQuery ¶ added in v0.7.0
func (r GroupMembershipListParams) URLQuery() (v url.Values)
URLQuery serializes GroupMembershipListParams's query parameters as `url.Values`.
type GroupMembershipListParamsPagination ¶ added in v0.7.0
type GroupMembershipListParamsPagination 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 memberships
func (GroupMembershipListParamsPagination) MarshalJSON ¶ added in v0.7.0
func (r GroupMembershipListParamsPagination) MarshalJSON() (data []byte, err error)
type GroupMembershipNewParams ¶ added in v0.7.0
type GroupMembershipNewParams struct {
GroupID param.Field[string] `json:"groupId" format:"uuid"`
// Subject to add to the group
Subject param.Field[shared.SubjectParam] `json:"subject"`
}
func (GroupMembershipNewParams) MarshalJSON ¶ added in v0.7.0
func (r GroupMembershipNewParams) MarshalJSON() (data []byte, err error)
type GroupMembershipNewResponse ¶ added in v0.7.0
type GroupMembershipNewResponse struct {
// GroupMembership represents a subject's membership in a group
Member GroupMembership `json:"member"`
JSON groupMembershipNewResponseJSON `json:"-"`
}
func (*GroupMembershipNewResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *GroupMembershipNewResponse) UnmarshalJSON(data []byte) (err error)
type GroupMembershipService ¶ added in v0.7.0
type GroupMembershipService struct {
Options []option.RequestOption
}
GroupMembershipService 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 NewGroupMembershipService method instead.
func NewGroupMembershipService ¶ added in v0.7.0
func NewGroupMembershipService(opts ...option.RequestOption) (r *GroupMembershipService)
NewGroupMembershipService 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 (*GroupMembershipService) Delete ¶ added in v0.7.0
func (r *GroupMembershipService) Delete(ctx context.Context, body GroupMembershipDeleteParams, opts ...option.RequestOption) (res *GroupMembershipDeleteResponse, err error)
Deletes a membership for a user in a group.
Use this method to:
- Remove users from groups - Revoke group-based permissions
### Examples
- Remove a user from a group:
Deletes a membership by its ID. ```yaml membershipId: "a1b2c3d4-5678-90ab-cdef-1234567890ab" ```
### Authorization
Requires `org:admin` permission on the organization or `group:admin` permission on the specific group.
func (*GroupMembershipService) List ¶ added in v0.7.0
func (r *GroupMembershipService) List(ctx context.Context, params GroupMembershipListParams, opts ...option.RequestOption) (res *pagination.MembersPage[GroupMembership], err error)
Lists all memberships of a group.
Use this method to:
- View all members of a group - Audit group membership
### Examples
- List group members:
Shows all members of a specific group. ```yaml groupId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" pagination: pageSize: 20 ```
### Authorization
All organization members can view group membership (transparency model).
func (*GroupMembershipService) ListAutoPaging ¶ added in v0.7.0
func (r *GroupMembershipService) ListAutoPaging(ctx context.Context, params GroupMembershipListParams, opts ...option.RequestOption) *pagination.MembersPageAutoPager[GroupMembership]
Lists all memberships of a group.
Use this method to:
- View all members of a group - Audit group membership
### Examples
- List group members:
Shows all members of a specific group. ```yaml groupId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" pagination: pageSize: 20 ```
### Authorization
All organization members can view group membership (transparency model).
func (*GroupMembershipService) New ¶ added in v0.7.0
func (r *GroupMembershipService) New(ctx context.Context, body GroupMembershipNewParams, opts ...option.RequestOption) (res *GroupMembershipNewResponse, err error)
Creates a membership for a user in a group.
Use this method to:
- Add users to groups - Grant group-based permissions to users
### Examples
- Add a user to a group:
Creates a membership for a user in a group. ```yaml groupId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" subject: id: "f53d2330-3795-4c5d-a1f3-453121af9c60" principal: PRINCIPAL_USER ```
### Authorization
Requires `org:admin` permission on the organization or `group:admin` permission on the specific group.
type GroupNewParams ¶ added in v0.7.0
type GroupNewParams struct {
Description param.Field[string] `json:"description"`
Name param.Field[string] `json:"name"`
OrganizationID param.Field[string] `json:"organizationId" format:"uuid"`
}
func (GroupNewParams) MarshalJSON ¶ added in v0.7.0
func (r GroupNewParams) MarshalJSON() (data []byte, err error)
type GroupNewResponse ¶ added in v0.7.0
type GroupNewResponse struct {
Group Group `json:"group"`
JSON groupNewResponseJSON `json:"-"`
}
func (*GroupNewResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *GroupNewResponse) UnmarshalJSON(data []byte) (err error)
type GroupRoleAssignmentDeleteParams ¶ added in v0.7.0
type GroupRoleAssignmentDeleteParams struct {
AssignmentID param.Field[string] `json:"assignmentId" format:"uuid"`
}
func (GroupRoleAssignmentDeleteParams) MarshalJSON ¶ added in v0.7.0
func (r GroupRoleAssignmentDeleteParams) MarshalJSON() (data []byte, err error)
type GroupRoleAssignmentDeleteResponse ¶ added in v0.7.0
type GroupRoleAssignmentDeleteResponse = interface{}
type GroupRoleAssignmentListParams ¶ added in v0.7.0
type GroupRoleAssignmentListParams struct {
Token param.Field[string] `query:"token"`
PageSize param.Field[int64] `query:"pageSize"`
// Filter parameters
Filter param.Field[GroupRoleAssignmentListParamsFilter] `json:"filter"`
// Pagination parameters
Pagination param.Field[GroupRoleAssignmentListParamsPagination] `json:"pagination"`
}
func (GroupRoleAssignmentListParams) MarshalJSON ¶ added in v0.7.0
func (r GroupRoleAssignmentListParams) MarshalJSON() (data []byte, err error)
func (GroupRoleAssignmentListParams) URLQuery ¶ added in v0.7.0
func (r GroupRoleAssignmentListParams) URLQuery() (v url.Values)
URLQuery serializes GroupRoleAssignmentListParams's query parameters as `url.Values`.
type GroupRoleAssignmentListParamsFilter ¶ added in v0.7.0
type GroupRoleAssignmentListParamsFilter struct {
// group_id filters the response to only role assignments for this specific group
// Empty string is allowed and means no filtering by group
GroupID param.Field[string] `json:"groupId"`
// resource_roles filters the response to only role assignments with these specific
// roles
ResourceRoles param.Field[[]ResourceRole] `json:"resourceRoles"`
// resource_types filters the response to only role assignments for these resource
// types
ResourceTypes param.Field[[]shared.ResourceType] `json:"resourceTypes"`
// user_id filters the response to only role assignments for groups that this user
// is a member of Empty string is allowed and means no filtering by user
UserID param.Field[string] `json:"userId"`
}
Filter parameters
func (GroupRoleAssignmentListParamsFilter) MarshalJSON ¶ added in v0.7.0
func (r GroupRoleAssignmentListParamsFilter) MarshalJSON() (data []byte, err error)
type GroupRoleAssignmentListParamsPagination ¶ added in v0.7.0
type GroupRoleAssignmentListParamsPagination 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 parameters
func (GroupRoleAssignmentListParamsPagination) MarshalJSON ¶ added in v0.7.0
func (r GroupRoleAssignmentListParamsPagination) MarshalJSON() (data []byte, err error)
type GroupRoleAssignmentNewParams ¶ added in v0.7.0
type GroupRoleAssignmentNewParams struct {
GroupID param.Field[string] `json:"groupId" format:"uuid"`
ResourceID param.Field[string] `json:"resourceId" format:"uuid"`
// ResourceRole represents roles that can be assigned to groups on resources These
// map directly to the roles defined in backend/db/rule/rbac/role/role.go
ResourceRole param.Field[ResourceRole] `json:"resourceRole"`
ResourceType param.Field[shared.ResourceType] `json:"resourceType"`
}
func (GroupRoleAssignmentNewParams) MarshalJSON ¶ added in v0.7.0
func (r GroupRoleAssignmentNewParams) MarshalJSON() (data []byte, err error)
type GroupRoleAssignmentNewResponse ¶ added in v0.7.0
type GroupRoleAssignmentNewResponse struct {
// RoleAssignment represents a role assigned to a group on a specific resource
Assignment RoleAssignment `json:"assignment"`
JSON groupRoleAssignmentNewResponseJSON `json:"-"`
}
func (*GroupRoleAssignmentNewResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *GroupRoleAssignmentNewResponse) UnmarshalJSON(data []byte) (err error)
type GroupRoleAssignmentService ¶ added in v0.7.0
type GroupRoleAssignmentService struct {
Options []option.RequestOption
}
GroupRoleAssignmentService 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 NewGroupRoleAssignmentService method instead.
func NewGroupRoleAssignmentService ¶ added in v0.7.0
func NewGroupRoleAssignmentService(opts ...option.RequestOption) (r *GroupRoleAssignmentService)
NewGroupRoleAssignmentService 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 (*GroupRoleAssignmentService) Delete ¶ added in v0.7.0
func (r *GroupRoleAssignmentService) Delete(ctx context.Context, body GroupRoleAssignmentDeleteParams, opts ...option.RequestOption) (res *GroupRoleAssignmentDeleteResponse, err error)
Deletes a role assignment.
Use this method to:
- Remove group access to resources - Revoke role-based permissions
### Examples
- Delete a role assignment:
Removes a role assignment by its ID. ```yaml assignmentId: "a1b2c3d4-5678-90ab-cdef-1234567890ab" ```
### Authorization
Requires admin role on the specific resource.
func (*GroupRoleAssignmentService) List ¶ added in v0.7.0
func (r *GroupRoleAssignmentService) List(ctx context.Context, params GroupRoleAssignmentListParams, opts ...option.RequestOption) (res *pagination.AssignmentsPage[RoleAssignment], err error)
Lists role assignments for a group or resource.
Use this method to:
- View all role assignments for a group - Audit resource access - Check which groups have access to resources
### Examples
- List role assignments for a group:
Shows all role assignments for a specific group. ```yaml filter: groupId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" pagination: pageSize: 20 ```
- List role assignments by resource type:
Shows all role assignments for runners.
```yaml
filter:
resourceTypes:
- RESOURCE_TYPE_RUNNER
pagination:
pageSize: 20
```
### Authorization
All organization members can view role assignments (transparency model).
func (*GroupRoleAssignmentService) ListAutoPaging ¶ added in v0.7.0
func (r *GroupRoleAssignmentService) ListAutoPaging(ctx context.Context, params GroupRoleAssignmentListParams, opts ...option.RequestOption) *pagination.AssignmentsPageAutoPager[RoleAssignment]
Lists role assignments for a group or resource.
Use this method to:
- View all role assignments for a group - Audit resource access - Check which groups have access to resources
### Examples
- List role assignments for a group:
Shows all role assignments for a specific group. ```yaml filter: groupId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" pagination: pageSize: 20 ```
- List role assignments by resource type:
Shows all role assignments for runners.
```yaml
filter:
resourceTypes:
- RESOURCE_TYPE_RUNNER
pagination:
pageSize: 20
```
### Authorization
All organization members can view role assignments (transparency model).
func (*GroupRoleAssignmentService) New ¶ added in v0.7.0
func (r *GroupRoleAssignmentService) New(ctx context.Context, body GroupRoleAssignmentNewParams, opts ...option.RequestOption) (res *GroupRoleAssignmentNewResponse, err error)
Creates a role assignment for a group on a resource.
Use this method to:
- Assign specific roles to groups on runners, projects, or environments - Grant group-based access to resources
### Examples
- Assign admin role on a runner:
Grants the group admin access to a runner. ```yaml groupId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" resourceType: RESOURCE_TYPE_RUNNER resourceId: "f53d2330-3795-4c5d-a1f3-453121af9c60" resourceRole: RESOURCE_ROLE_RUNNER_ADMIN ```
- Assign user role on a project:
Grants the group user access to a project. ```yaml groupId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" resourceType: RESOURCE_TYPE_PROJECT resourceId: "a1b2c3d4-5678-90ab-cdef-1234567890ab" resourceRole: RESOURCE_ROLE_PROJECT_USER ```
### Authorization
Requires admin role on the specific resource.
type GroupService ¶
type GroupService struct {
Options []option.RequestOption
Memberships *GroupMembershipService
RoleAssignments *GroupRoleAssignmentService
}
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) Delete ¶ added in v0.7.0
func (r *GroupService) Delete(ctx context.Context, body GroupDeleteParams, opts ...option.RequestOption) (res *GroupDeleteResponse, err error)
Deletes a group and removes all its resource assignments.
When a group is deleted, all resource assignments revert to org-level scope.
Use this method to:
- Remove unused groups - Clean up after team reorganization
### Examples
- Delete a group:
Permanently removes a group. ```yaml groupId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
### Authorization
Requires `org:admin` role on the organization.
func (*GroupService) Get ¶ added in v0.7.0
func (r *GroupService) Get(ctx context.Context, body GroupGetParams, opts ...option.RequestOption) (res *GroupGetResponse, err error)
Gets information about a specific group.
Use this method to:
- Retrieve group details and metadata - Check group configuration - View member count
### Examples
- Get group details:
Retrieves information about a specific group. ```yaml groupId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
### Authorization
All organization members can view group information (transparency model).
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 in an organization - 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" ```
### Authorization
All organization members can list groups (transparency model).
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 in an organization - 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" ```
### Authorization
All organization members can list groups (transparency model).
func (*GroupService) New ¶ added in v0.7.0
func (r *GroupService) New(ctx context.Context, body GroupNewParams, opts ...option.RequestOption) (res *GroupNewResponse, err error)
Creates a new group within an organization.
Use this method to:
- Create teams for access control - Organize users by department or function - Set up role-based access groups
### Examples
- Create a basic group:
Creates a group with name and description. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" name: "Backend Team" description: "Backend engineering team" ```
### Authorization
Requires `org:admin` role on the organization.
func (*GroupService) Update ¶ added in v0.7.0
func (r *GroupService) Update(ctx context.Context, body GroupUpdateParams, opts ...option.RequestOption) (res *GroupUpdateResponse, err error)
Updates group information.
Use this method to:
- Rename a group - Update group description
### Examples
- Update group name:
Changes the name of an existing group. ```yaml groupId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" name: "Platform Team" description: "Platform engineering team" ```
### Authorization
Requires `org:admin` permission on the organization or `group:admin` permission on the specific group.
type GroupUpdateParams ¶ added in v0.7.0
type GroupUpdateParams struct {
Description param.Field[string] `json:"description"`
GroupID param.Field[string] `json:"groupId" format:"uuid"`
Name param.Field[string] `json:"name"`
}
func (GroupUpdateParams) MarshalJSON ¶ added in v0.7.0
func (r GroupUpdateParams) MarshalJSON() (data []byte, err error)
type GroupUpdateResponse ¶ added in v0.7.0
type GroupUpdateResponse struct {
Group Group `json:"group"`
JSON groupUpdateResponseJSON `json:"-"`
}
func (*GroupUpdateResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *GroupUpdateResponse) UnmarshalJSON(data []byte) (err error)
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"`
// links to integration instance
IntegrationID string `json:"integrationId"`
RunnerID string `json:"runnerId"`
// token permissions
Scopes []string `json:"scopes"`
// auth_type
Source HostAuthenticationTokenSource `json:"source"`
// Subject identifies the principal (user or service account) for the token Note:
// actual token and refresh_token values are retrieved via
// GetHostAuthenticationTokenValue API
Subject shared.Subject `json:"subject"`
// Deprecated: Use principal_id and principal_type instead principal (user)
//
// Deprecated: deprecated
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 IDTokenVersion ¶ added in v0.5.0
type IDTokenVersion string
const ( IDTokenVersionUnspecified IDTokenVersion = "ID_TOKEN_VERSION_UNSPECIFIED" IDTokenVersionV1 IDTokenVersion = "ID_TOKEN_VERSION_V1" IDTokenVersionV2 IDTokenVersion = "ID_TOKEN_VERSION_V2" )
func (IDTokenVersion) IsKnown ¶ added in v0.5.0
func (r IDTokenVersion) 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 ¶
type IdentityGetIDTokenParams struct {
Audience param.Field[[]string] `json:"audience"`
// version is the version of the ID token.
Version param.Field[IDTokenVersion] `json:"version"`
}
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 MetricsConfiguration ¶ added in v0.5.0
type MetricsConfiguration struct {
// enabled indicates whether the runner should collect metrics
Enabled bool `json:"enabled"`
// password is the password to use for the metrics collector
Password string `json:"password"`
// url is the URL of the metrics collector
URL string `json:"url"`
// username is the username to use for the metrics collector
Username string `json:"username"`
JSON metricsConfigurationJSON `json:"-"`
}
func (*MetricsConfiguration) UnmarshalJSON ¶ added in v0.5.0
func (r *MetricsConfiguration) UnmarshalJSON(data []byte) (err error)
type MetricsConfigurationParam ¶ added in v0.5.0
type MetricsConfigurationParam struct {
// enabled indicates whether the runner should collect metrics
Enabled param.Field[bool] `json:"enabled"`
// password is the password to use for the metrics collector
Password param.Field[string] `json:"password"`
// url is the URL of the metrics collector
URL param.Field[string] `json:"url"`
// username is the username to use for the metrics collector
Username param.Field[string] `json:"username"`
}
func (MetricsConfigurationParam) MarshalJSON ¶ added in v0.5.0
func (r MetricsConfigurationParam) MarshalJSON() (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"`
// The tier of the organization - free, enterprise or core
Tier OrganizationTier `json:"tier,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 OrganizationCustomDomainDeleteParams ¶ added in v0.7.0
type OrganizationCustomDomainDeleteParams struct {
// organization_id is the ID of the organization to delete custom domain for
OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
}
func (OrganizationCustomDomainDeleteParams) MarshalJSON ¶ added in v0.7.0
func (r OrganizationCustomDomainDeleteParams) MarshalJSON() (data []byte, err error)
type OrganizationCustomDomainDeleteResponse ¶ added in v0.7.0
type OrganizationCustomDomainDeleteResponse = interface{}
type OrganizationCustomDomainGetParams ¶ added in v0.7.0
type OrganizationCustomDomainGetParams struct {
// organization_id is the ID of the organization to retrieve custom domain for
OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
}
func (OrganizationCustomDomainGetParams) MarshalJSON ¶ added in v0.7.0
func (r OrganizationCustomDomainGetParams) MarshalJSON() (data []byte, err error)
type OrganizationCustomDomainGetResponse ¶ added in v0.7.0
type OrganizationCustomDomainGetResponse struct {
// CustomDomain represents a custom domain configuration for an organization
CustomDomain CustomDomain `json:"customDomain,required"`
JSON organizationCustomDomainGetResponseJSON `json:"-"`
}
func (*OrganizationCustomDomainGetResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *OrganizationCustomDomainGetResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationCustomDomainNewParams ¶ added in v0.7.0
type OrganizationCustomDomainNewParams struct {
// domain_name is the custom domain name
DomainName param.Field[string] `json:"domainName,required"`
// organization_id is the ID of the organization to create the custom domain for
OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
// aws_account_id is the AWS account ID (deprecated: use cloud_account_id)
AwsAccountID param.Field[string] `json:"awsAccountId"`
// cloud_account_id is the unified cloud account identifier (AWS Account ID or GCP
// Project ID)
CloudAccountID param.Field[string] `json:"cloudAccountId"`
// provider is the cloud provider for this custom domain
Provider param.Field[CustomDomainProvider] `json:"provider"`
}
func (OrganizationCustomDomainNewParams) MarshalJSON ¶ added in v0.7.0
func (r OrganizationCustomDomainNewParams) MarshalJSON() (data []byte, err error)
type OrganizationCustomDomainNewResponse ¶ added in v0.7.0
type OrganizationCustomDomainNewResponse struct {
// custom_domain is the created custom domain
CustomDomain CustomDomain `json:"customDomain,required"`
JSON organizationCustomDomainNewResponseJSON `json:"-"`
}
CreateCustomDomainResponse is the response message for creating a custom domain
func (*OrganizationCustomDomainNewResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *OrganizationCustomDomainNewResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationCustomDomainService ¶ added in v0.7.0
type OrganizationCustomDomainService struct {
Options []option.RequestOption
}
OrganizationCustomDomainService 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 NewOrganizationCustomDomainService method instead.
func NewOrganizationCustomDomainService ¶ added in v0.7.0
func NewOrganizationCustomDomainService(opts ...option.RequestOption) (r *OrganizationCustomDomainService)
NewOrganizationCustomDomainService 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 (*OrganizationCustomDomainService) Delete ¶ added in v0.7.0
func (r *OrganizationCustomDomainService) Delete(ctx context.Context, body OrganizationCustomDomainDeleteParams, opts ...option.RequestOption) (res *OrganizationCustomDomainDeleteResponse, err error)
Removes a custom domain configuration from an organization.
Use this method to:
- Disable custom domain functionality - Remove outdated configurations - Clean up unused domains
### Examples
- Delete custom domain configuration:
Removes a specific custom domain configuration. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ```
func (*OrganizationCustomDomainService) Get ¶ added in v0.7.0
func (r *OrganizationCustomDomainService) Get(ctx context.Context, body OrganizationCustomDomainGetParams, opts ...option.RequestOption) (res *OrganizationCustomDomainGetResponse, err error)
Retrieves a specific custom domain configuration.
Use this method to view custom domain details ¶
### Examples
- Get custom domain configuration:
Retrieves details of a specific custom domain. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ```
func (*OrganizationCustomDomainService) New ¶ added in v0.7.0
func (r *OrganizationCustomDomainService) New(ctx context.Context, body OrganizationCustomDomainNewParams, opts ...option.RequestOption) (res *OrganizationCustomDomainNewResponse, err error)
Creates a custom domain configuration for an organization.
Use this method to configure custom domains for organization workspaces ¶
### Examples
- Configure AWS custom domain:
Sets up a custom domain with AWS provider. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" domainName: "workspaces.acme-corp.com" provider: CUSTOM_DOMAIN_PROVIDER_AWS awsAccountId: "123456789012" ```
func (*OrganizationCustomDomainService) Update ¶ added in v0.7.0
func (r *OrganizationCustomDomainService) Update(ctx context.Context, body OrganizationCustomDomainUpdateParams, opts ...option.RequestOption) (res *OrganizationCustomDomainUpdateResponse, err error)
Updates custom domain configuration settings.
Use this method to:
- Update cloud provider settings - Change AWS account ID - Modify domain configuration
### Examples
- Update AWS account ID:
Changes the AWS account ID for the custom domain. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" domainName: "workspaces.acme-corp.com" awsAccountId: "987654321098" ```
type OrganizationCustomDomainUpdateParams ¶ added in v0.7.0
type OrganizationCustomDomainUpdateParams struct {
// domain_name is the custom domain name
DomainName param.Field[string] `json:"domainName,required"`
// organization_id is the ID of the organization to update custom domain for
OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
// aws_account_id is the AWS account ID (deprecated: use cloud_account_id)
AwsAccountID param.Field[string] `json:"awsAccountId"`
// cloud_account_id is the unified cloud account identifier (AWS Account ID or GCP
// Project ID)
CloudAccountID param.Field[string] `json:"cloudAccountId"`
// provider is the cloud provider for this custom domain
Provider param.Field[CustomDomainProvider] `json:"provider"`
}
func (OrganizationCustomDomainUpdateParams) MarshalJSON ¶ added in v0.7.0
func (r OrganizationCustomDomainUpdateParams) MarshalJSON() (data []byte, err error)
type OrganizationCustomDomainUpdateResponse ¶ added in v0.7.0
type OrganizationCustomDomainUpdateResponse struct {
// custom_domain is the updated custom domain
CustomDomain CustomDomain `json:"customDomain,required"`
JSON organizationCustomDomainUpdateResponseJSON `json:"-"`
}
UpdateCustomDomainResponse is the response message for updating a custom domain
func (*OrganizationCustomDomainUpdateResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *OrganizationCustomDomainUpdateResponse) 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"`
Filter param.Field[OrganizationListMembersParamsFilter] `json:"filter"`
// 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 OrganizationListMembersParamsFilter ¶ added in v0.7.0
type OrganizationListMembersParamsFilter struct {
// search performs case-insensitive search across member name and email
Search param.Field[string] `json:"search"`
}
func (OrganizationListMembersParamsFilter) MarshalJSON ¶ added in v0.7.0
func (r OrganizationListMembersParamsFilter) MarshalJSON() (data []byte, err error)
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 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 OrganizationPolicies ¶ added in v0.5.0
type OrganizationPolicies struct {
// agent_policy contains agent-specific policy settings
AgentPolicy AgentPolicy `json:"agentPolicy,required"`
// allowed_editor_ids is the list of editor IDs that are allowed to be used in the
// organization
AllowedEditorIDs []string `json:"allowedEditorIds,required"`
// allow_local_runners controls whether local runners are allowed to be used in the
// organization
AllowLocalRunners bool `json:"allowLocalRunners,required"`
// default_editor_id is the default editor ID to be used when a user doesn't
// specify one
DefaultEditorID string `json:"defaultEditorId,required"`
// default_environment_image is the default container image when none is defined in
// repo
DefaultEnvironmentImage string `json:"defaultEnvironmentImage,required"`
// maximum_environments_per_user limits total environments (running or stopped) per
// user
MaximumEnvironmentsPerUser string `json:"maximumEnvironmentsPerUser,required"`
// maximum_running_environments_per_user limits simultaneously running environments
// per user
MaximumRunningEnvironmentsPerUser string `json:"maximumRunningEnvironmentsPerUser,required"`
// members_create_projects controls whether members can create projects
MembersCreateProjects bool `json:"membersCreateProjects,required"`
// members_require_projects controls whether environments can only be created from
// projects by non-admin users
MembersRequireProjects bool `json:"membersRequireProjects,required"`
// organization_id is the ID of the organization
OrganizationID string `json:"organizationId,required" format:"uuid"`
// port_sharing_disabled controls whether port sharing is disabled in the
// organization
PortSharingDisabled bool `json:"portSharingDisabled,required"`
// require_custom_domain_access controls whether users must access via custom
// domain when one is configured. When true, access via app.gitpod.io is blocked.
RequireCustomDomainAccess bool `json:"requireCustomDomainAccess,required"`
// delete_archived_environments_after controls how long archived environments are
// kept before automatic deletion. 0 means no automatic deletion. Maximum duration
// is 4 weeks (2419200 seconds).
DeleteArchivedEnvironmentsAfter string `json:"deleteArchivedEnvironmentsAfter" format:"regex"`
// editor_version_restrictions restricts which editor versions can be used. Maps
// editor ID to version policy, editor_version_restrictions not set means no
// restrictions. If empty or not set for an editor, we will use the latest version
// of the editor
EditorVersionRestrictions map[string]OrganizationPoliciesEditorVersionRestriction `json:"editorVersionRestrictions"`
// maximum_environment_lifetime controls for how long environments are allowed to
// be reused. 0 means no maximum lifetime. Maximum duration is 180 days (15552000
// seconds).
MaximumEnvironmentLifetime string `json:"maximumEnvironmentLifetime" format:"regex"`
// maximum_environment_timeout controls the maximum timeout allowed for
// environments in seconds. 0 means no limit (never). Minimum duration is 30
// minutes (1800 seconds).
MaximumEnvironmentTimeout string `json:"maximumEnvironmentTimeout" format:"regex"`
// security_agent_policy contains security agent configuration for the
// organization. When configured, security agents are automatically deployed to all
// environments.
SecurityAgentPolicy SecurityAgentPolicy `json:"securityAgentPolicy"`
JSON organizationPoliciesJSON `json:"-"`
}
func (*OrganizationPolicies) UnmarshalJSON ¶ added in v0.5.0
func (r *OrganizationPolicies) UnmarshalJSON(data []byte) (err error)
type OrganizationPoliciesEditorVersionRestriction ¶ added in v0.7.0
type OrganizationPoliciesEditorVersionRestriction struct {
// allowed_versions lists the versions that are allowed If empty, we will use the
// latest version of the editor
//
// Examples for JetBrains: `["2025.2", "2025.1", "2024.3"]`
AllowedVersions []string `json:"allowedVersions"`
JSON organizationPoliciesEditorVersionRestrictionJSON `json:"-"`
}
EditorVersionPolicy defines the version policy for a specific editor
func (*OrganizationPoliciesEditorVersionRestriction) UnmarshalJSON ¶ added in v0.7.0
func (r *OrganizationPoliciesEditorVersionRestriction) UnmarshalJSON(data []byte) (err error)
type OrganizationPolicyGetParams ¶ added in v0.5.0
type OrganizationPolicyGetParams struct {
// organization_id is the ID of the organization to retrieve policies for
OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
}
func (OrganizationPolicyGetParams) MarshalJSON ¶ added in v0.5.0
func (r OrganizationPolicyGetParams) MarshalJSON() (data []byte, err error)
type OrganizationPolicyGetResponse ¶ added in v0.5.0
type OrganizationPolicyGetResponse struct {
Policies OrganizationPolicies `json:"policies,required"`
JSON organizationPolicyGetResponseJSON `json:"-"`
}
func (*OrganizationPolicyGetResponse) UnmarshalJSON ¶ added in v0.5.0
func (r *OrganizationPolicyGetResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationPolicyService ¶ added in v0.5.0
type OrganizationPolicyService struct {
Options []option.RequestOption
}
OrganizationPolicyService 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 NewOrganizationPolicyService method instead.
func NewOrganizationPolicyService ¶ added in v0.5.0
func NewOrganizationPolicyService(opts ...option.RequestOption) (r *OrganizationPolicyService)
NewOrganizationPolicyService 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 (*OrganizationPolicyService) Get ¶ added in v0.5.0
func (r *OrganizationPolicyService) Get(ctx context.Context, body OrganizationPolicyGetParams, opts ...option.RequestOption) (res *OrganizationPolicyGetResponse, err error)
Gets organization policy settings by organization ID.
Use this method to:
- Retrieve current policy settings for an organization - View resource limits and restrictions - Check allowed editors and other configurations
### Examples
- Get organization policies:
Retrieves policy settings for a specific organization. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ```
func (*OrganizationPolicyService) Update ¶ added in v0.5.0
func (r *OrganizationPolicyService) Update(ctx context.Context, body OrganizationPolicyUpdateParams, opts ...option.RequestOption) (res *OrganizationPolicyUpdateResponse, err error)
Updates organization policy settings.
Use this method to:
- Configure editor restrictions - Set environment resource limits - Define project creation permissions - Customize default configurations
### Examples
- Update editor policies:
Restricts available editors and sets a default. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" allowedEditorIds: - "vscode" - "jetbrains" defaultEditorId: "vscode" ```
- Set environment limits:
Configures limits for environment usage. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" maximumEnvironmentTimeout: "3600s" maximumRunningEnvironmentsPerUser: "5" maximumEnvironmentsPerUser: "20" ```
type OrganizationPolicyUpdateParams ¶ added in v0.5.0
type OrganizationPolicyUpdateParams struct {
// organization_id is the ID of the organization to update policies for
OrganizationID param.Field[string] `json:"organizationId,required" format:"uuid"`
// agent_policy contains agent-specific policy settings
AgentPolicy param.Field[OrganizationPolicyUpdateParamsAgentPolicy] `json:"agentPolicy"`
// allowed_editor_ids is the list of editor IDs that are allowed to be used in the
// organization
AllowedEditorIDs param.Field[[]string] `json:"allowedEditorIds"`
// allow_local_runners controls whether local runners are allowed to be used in the
// organization
AllowLocalRunners param.Field[bool] `json:"allowLocalRunners"`
// default_editor_id is the default editor ID to be used when a user doesn't
// specify one
DefaultEditorID param.Field[string] `json:"defaultEditorId"`
// default_environment_image is the default container image when none is defined in
// repo
DefaultEnvironmentImage param.Field[string] `json:"defaultEnvironmentImage"`
// delete_archived_environments_after controls how long archived environments are
// kept before automatic deletion. 0 means no automatic deletion. Maximum duration
// is 4 weeks (2419200 seconds).
DeleteArchivedEnvironmentsAfter param.Field[string] `json:"deleteArchivedEnvironmentsAfter" format:"regex"`
// editor_version_restrictions restricts which editor versions can be used. Maps
// editor ID to version policy with allowed major versions.
EditorVersionRestrictions param.Field[map[string]OrganizationPolicyUpdateParamsEditorVersionRestrictions] `json:"editorVersionRestrictions"`
// maximum_environment_lifetime controls for how long environments are allowed to
// be reused. 0 means no maximum lifetime. Maximum duration is 180 days (15552000
// seconds).
MaximumEnvironmentLifetime param.Field[string] `json:"maximumEnvironmentLifetime" format:"regex"`
// maximum_environments_per_user limits total environments (running or stopped) per
// user
MaximumEnvironmentsPerUser param.Field[string] `json:"maximumEnvironmentsPerUser"`
// maximum_environment_timeout controls the maximum timeout allowed for
// environments in seconds. 0 means no limit (never). Minimum duration is 30
// minutes (1800 seconds).
MaximumEnvironmentTimeout param.Field[string] `json:"maximumEnvironmentTimeout" format:"regex"`
// maximum_running_environments_per_user limits simultaneously running environments
// per user
MaximumRunningEnvironmentsPerUser param.Field[string] `json:"maximumRunningEnvironmentsPerUser"`
// members_create_projects controls whether members can create projects
MembersCreateProjects param.Field[bool] `json:"membersCreateProjects"`
// members_require_projects controls whether environments can only be created from
// projects by non-admin users
MembersRequireProjects param.Field[bool] `json:"membersRequireProjects"`
// port_sharing_disabled controls whether port sharing is disabled in the
// organization
PortSharingDisabled param.Field[bool] `json:"portSharingDisabled"`
// require_custom_domain_access controls whether users must access via custom
// domain when one is configured. When true, access via app.gitpod.io is blocked.
RequireCustomDomainAccess param.Field[bool] `json:"requireCustomDomainAccess"`
// security_agent_policy contains security agent configuration updates
SecurityAgentPolicy param.Field[OrganizationPolicyUpdateParamsSecurityAgentPolicy] `json:"securityAgentPolicy"`
}
func (OrganizationPolicyUpdateParams) MarshalJSON ¶ added in v0.5.0
func (r OrganizationPolicyUpdateParams) MarshalJSON() (data []byte, err error)
type OrganizationPolicyUpdateParamsAgentPolicy ¶ added in v0.7.0
type OrganizationPolicyUpdateParamsAgentPolicy struct {
// command_deny_list contains a list of commands that agents are not allowed to
// execute
CommandDenyList param.Field[[]string] `json:"commandDenyList"`
// mcp_disabled controls whether MCP (Model Context Protocol) is disabled for
// agents
McpDisabled param.Field[bool] `json:"mcpDisabled"`
// scm_tools_disabled controls whether SCM (Source Control Management) tools are
// disabled for agents
ScmToolsDisabled param.Field[bool] `json:"scmToolsDisabled"`
}
agent_policy contains agent-specific policy settings
func (OrganizationPolicyUpdateParamsAgentPolicy) MarshalJSON ¶ added in v0.7.0
func (r OrganizationPolicyUpdateParamsAgentPolicy) MarshalJSON() (data []byte, err error)
type OrganizationPolicyUpdateParamsEditorVersionRestrictions ¶ added in v0.7.0
type OrganizationPolicyUpdateParamsEditorVersionRestrictions struct {
// allowed_versions lists the versions that are allowed If empty, we will use the
// latest version of the editor
//
// Examples for JetBrains: `["2025.2", "2025.1", "2024.3"]`
AllowedVersions param.Field[[]string] `json:"allowedVersions"`
}
EditorVersionPolicy defines the version policy for a specific editor
func (OrganizationPolicyUpdateParamsEditorVersionRestrictions) MarshalJSON ¶ added in v0.7.0
func (r OrganizationPolicyUpdateParamsEditorVersionRestrictions) MarshalJSON() (data []byte, err error)
type OrganizationPolicyUpdateParamsSecurityAgentPolicy ¶ added in v0.7.0
type OrganizationPolicyUpdateParamsSecurityAgentPolicy struct {
// crowdstrike contains CrowdStrike Falcon configuration updates
Crowdstrike param.Field[OrganizationPolicyUpdateParamsSecurityAgentPolicyCrowdstrike] `json:"crowdstrike"`
}
security_agent_policy contains security agent configuration updates
func (OrganizationPolicyUpdateParamsSecurityAgentPolicy) MarshalJSON ¶ added in v0.7.0
func (r OrganizationPolicyUpdateParamsSecurityAgentPolicy) MarshalJSON() (data []byte, err error)
type OrganizationPolicyUpdateParamsSecurityAgentPolicyCrowdstrike ¶ added in v0.7.0
type OrganizationPolicyUpdateParamsSecurityAgentPolicyCrowdstrike struct {
// additional*options contains additional FALCONCTL_OPT*\* options as key-value
// pairs
AdditionalOptions param.Field[map[string]string] `json:"additionalOptions"`
// cid_secret_id references an organization secret containing the Customer ID (CID)
CidSecretID param.Field[string] `json:"cidSecretId" format:"uuid"`
// enabled controls whether CrowdStrike Falcon is deployed to environments
Enabled param.Field[bool] `json:"enabled"`
// image is the CrowdStrike Falcon sensor container image reference
Image param.Field[string] `json:"image"`
// tags are optional tags to apply to the Falcon sensor
Tags param.Field[string] `json:"tags"`
}
crowdstrike contains CrowdStrike Falcon configuration updates
func (OrganizationPolicyUpdateParamsSecurityAgentPolicyCrowdstrike) MarshalJSON ¶ added in v0.7.0
func (r OrganizationPolicyUpdateParamsSecurityAgentPolicyCrowdstrike) MarshalJSON() (data []byte, err error)
type OrganizationPolicyUpdateResponse ¶ added in v0.5.0
type OrganizationPolicyUpdateResponse = interface{}
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"`
// 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"`
DisplayName param.Field[string] `json:"displayName"`
// email_domain is the domain that is allowed to sign in to the organization
EmailDomain param.Field[string] `json:"emailDomain"`
EmailDomains param.Field[[]string] `json:"emailDomains"`
}
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"`
DisplayName param.Field[string] `json:"displayName"`
EmailDomain param.Field[string] `json:"emailDomain"`
EmailDomains param.Field[[]string] `json:"emailDomains"`
// 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
CustomDomains *OrganizationCustomDomainService
DomainVerifications *OrganizationDomainVerificationService
Invites *OrganizationInviteService
Policies *OrganizationPolicyService
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) 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 OrganizationTier ¶ added in v0.5.0
type OrganizationTier string
const ( OrganizationTierUnspecified OrganizationTier = "ORGANIZATION_TIER_UNSPECIFIED" OrganizationTierFree OrganizationTier = "ORGANIZATION_TIER_FREE" OrganizationTierEnterprise OrganizationTier = "ORGANIZATION_TIER_ENTERPRISE" OrganizationTierCore OrganizationTier = "ORGANIZATION_TIER_CORE" OrganizationTierFreeOna OrganizationTier = "ORGANIZATION_TIER_FREE_ONA" )
func (OrganizationTier) IsKnown ¶ added in v0.5.0
func (r OrganizationTier) IsKnown() bool
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 Prebuild ¶ added in v0.7.0
type Prebuild struct {
// metadata contains organizational and ownership information
Metadata PrebuildMetadata `json:"metadata,required"`
// spec contains the configuration used to create this prebuild
Spec PrebuildSpec `json:"spec,required"`
// status contains the current status and progress of the prebuild
Status PrebuildStatus `json:"status,required"`
// id is the unique identifier for the prebuild
ID string `json:"id" format:"uuid"`
JSON prebuildJSON `json:"-"`
}
Prebuild represents a prebuild for a project that creates a snapshot for faster environment startup times.
func (*Prebuild) UnmarshalJSON ¶ added in v0.7.0
type PrebuildCancelParams ¶ added in v0.7.0
type PrebuildCancelParams struct {
// prebuild_id specifies the prebuild to cancel
PrebuildID param.Field[string] `json:"prebuildId,required" format:"uuid"`
}
func (PrebuildCancelParams) MarshalJSON ¶ added in v0.7.0
func (r PrebuildCancelParams) MarshalJSON() (data []byte, err error)
type PrebuildCancelResponse ¶ added in v0.7.0
type PrebuildCancelResponse struct {
// Prebuild represents a prebuild for a project that creates a snapshot for faster
// environment startup times.
Prebuild Prebuild `json:"prebuild,required"`
JSON prebuildCancelResponseJSON `json:"-"`
}
func (*PrebuildCancelResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *PrebuildCancelResponse) UnmarshalJSON(data []byte) (err error)
type PrebuildDeleteParams ¶ added in v0.7.0
type PrebuildDeleteParams struct {
// prebuild_id specifies the prebuild to delete
PrebuildID param.Field[string] `json:"prebuildId,required" format:"uuid"`
}
func (PrebuildDeleteParams) MarshalJSON ¶ added in v0.7.0
func (r PrebuildDeleteParams) MarshalJSON() (data []byte, err error)
type PrebuildDeleteResponse ¶ added in v0.7.0
type PrebuildDeleteResponse = interface{}
type PrebuildGetParams ¶ added in v0.7.0
type PrebuildGetParams struct {
// prebuild_id specifies the prebuild to retrieve
PrebuildID param.Field[string] `json:"prebuildId,required" format:"uuid"`
}
func (PrebuildGetParams) MarshalJSON ¶ added in v0.7.0
func (r PrebuildGetParams) MarshalJSON() (data []byte, err error)
type PrebuildGetResponse ¶ added in v0.7.0
type PrebuildGetResponse struct {
// Prebuild represents a prebuild for a project that creates a snapshot for faster
// environment startup times.
Prebuild Prebuild `json:"prebuild,required"`
JSON prebuildGetResponseJSON `json:"-"`
}
func (*PrebuildGetResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *PrebuildGetResponse) UnmarshalJSON(data []byte) (err error)
type PrebuildListParams ¶ added in v0.7.0
type PrebuildListParams struct {
Token param.Field[string] `query:"token"`
PageSize param.Field[int64] `query:"pageSize"`
// filter contains the filter options for listing prebuilds
Filter param.Field[PrebuildListParamsFilter] `json:"filter"`
// pagination contains the pagination options for listing prebuilds
Pagination param.Field[PrebuildListParamsPagination] `json:"pagination"`
}
func (PrebuildListParams) MarshalJSON ¶ added in v0.7.0
func (r PrebuildListParams) MarshalJSON() (data []byte, err error)
func (PrebuildListParams) URLQuery ¶ added in v0.7.0
func (r PrebuildListParams) URLQuery() (v url.Values)
URLQuery serializes PrebuildListParams's query parameters as `url.Values`.
type PrebuildListParamsFilter ¶ added in v0.7.0
type PrebuildListParamsFilter struct {
// phases filters prebuilds by their current phase
Phases param.Field[[]PrebuildPhase] `json:"phases"`
// project_ids filters prebuilds to specific projects
ProjectIDs param.Field[[]string] `json:"projectIds" format:"uuid"`
}
filter contains the filter options for listing prebuilds
func (PrebuildListParamsFilter) MarshalJSON ¶ added in v0.7.0
func (r PrebuildListParamsFilter) MarshalJSON() (data []byte, err error)
type PrebuildListParamsPagination ¶ added in v0.7.0
type PrebuildListParamsPagination 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 prebuilds
func (PrebuildListParamsPagination) MarshalJSON ¶ added in v0.7.0
func (r PrebuildListParamsPagination) MarshalJSON() (data []byte, err error)
type PrebuildMetadata ¶ added in v0.7.0
type PrebuildMetadata struct {
// created_at is when the prebuild was created
CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
// creator is the identity of who created the prebuild. For manual prebuilds, this
// is the user who triggered it. For scheduled prebuilds, this is the configured
// executor.
Creator shared.Subject `json:"creator,required"`
// updated_at is when the prebuild was last updated
UpdatedAt time.Time `json:"updatedAt,required" format:"date-time"`
// environment_class_id is the environment class used to create this prebuild.
// While the prebuild is created with a specific environment class, environments
// with different classes (e.g., smaller or larger instance sizes) can be created
// from the same prebuild, as long as they run on the same runner. If not specified
// in create requests, uses the project's default environment class.
EnvironmentClassID string `json:"environmentClassId" format:"uuid"`
// executor is the identity used to run the prebuild. The executor's SCM
// credentials are used to clone the repository. If not set, the creator's identity
// is used.
Executor shared.Subject `json:"executor"`
// organization_id is the ID of the organization that owns the prebuild
OrganizationID string `json:"organizationId" format:"uuid"`
// project_id is the ID of the project this prebuild was created for
ProjectID string `json:"projectId" format:"uuid"`
// trigger describes the trigger that created this prebuild.
TriggeredBy PrebuildTrigger `json:"triggeredBy"`
JSON prebuildMetadataJSON `json:"-"`
}
PrebuildMetadata contains metadata about the prebuild
func (*PrebuildMetadata) UnmarshalJSON ¶ added in v0.7.0
func (r *PrebuildMetadata) UnmarshalJSON(data []byte) (err error)
type PrebuildNewLogsTokenParams ¶ added in v0.7.0
type PrebuildNewLogsTokenParams struct {
// prebuild_id specifies the prebuild for which the logs token should be created.
//
// +required
PrebuildID param.Field[string] `json:"prebuildId,required" format:"uuid"`
}
func (PrebuildNewLogsTokenParams) MarshalJSON ¶ added in v0.7.0
func (r PrebuildNewLogsTokenParams) MarshalJSON() (data []byte, err error)
type PrebuildNewLogsTokenResponse ¶ added in v0.7.0
type PrebuildNewLogsTokenResponse struct {
// access_token is the token that can be used to access the logs of the prebuild
AccessToken string `json:"accessToken,required"`
JSON prebuildNewLogsTokenResponseJSON `json:"-"`
}
func (*PrebuildNewLogsTokenResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *PrebuildNewLogsTokenResponse) UnmarshalJSON(data []byte) (err error)
type PrebuildNewParams ¶ added in v0.7.0
type PrebuildNewParams struct {
// project_id specifies the project to create a prebuild for
ProjectID param.Field[string] `json:"projectId,required" format:"uuid"`
// spec contains the configuration for creating the prebuild
Spec param.Field[PrebuildSpecParam] `json:"spec,required"`
// environment_class_id specifies which environment class to use for the prebuild.
// If not specified, uses the project's default environment class.
EnvironmentClassID param.Field[string] `json:"environmentClassId" format:"uuid"`
}
func (PrebuildNewParams) MarshalJSON ¶ added in v0.7.0
func (r PrebuildNewParams) MarshalJSON() (data []byte, err error)
type PrebuildNewResponse ¶ added in v0.7.0
type PrebuildNewResponse struct {
// Prebuild represents a prebuild for a project that creates a snapshot for faster
// environment startup times.
Prebuild Prebuild `json:"prebuild,required"`
JSON prebuildNewResponseJSON `json:"-"`
}
func (*PrebuildNewResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *PrebuildNewResponse) UnmarshalJSON(data []byte) (err error)
type PrebuildPhase ¶ added in v0.7.0
type PrebuildPhase string
PrebuildPhase represents the lifecycle phase of a prebuild
const ( PrebuildPhaseUnspecified PrebuildPhase = "PREBUILD_PHASE_UNSPECIFIED" PrebuildPhasePending PrebuildPhase = "PREBUILD_PHASE_PENDING" PrebuildPhaseStarting PrebuildPhase = "PREBUILD_PHASE_STARTING" PrebuildPhaseRunning PrebuildPhase = "PREBUILD_PHASE_RUNNING" PrebuildPhaseStopping PrebuildPhase = "PREBUILD_PHASE_STOPPING" PrebuildPhaseSnapshotting PrebuildPhase = "PREBUILD_PHASE_SNAPSHOTTING" PrebuildPhaseCompleted PrebuildPhase = "PREBUILD_PHASE_COMPLETED" PrebuildPhaseFailed PrebuildPhase = "PREBUILD_PHASE_FAILED" PrebuildPhaseCancelling PrebuildPhase = "PREBUILD_PHASE_CANCELLING" PrebuildPhaseCancelled PrebuildPhase = "PREBUILD_PHASE_CANCELLED" PrebuildPhaseDeleting PrebuildPhase = "PREBUILD_PHASE_DELETING" PrebuildPhaseDeleted PrebuildPhase = "PREBUILD_PHASE_DELETED" )
func (PrebuildPhase) IsKnown ¶ added in v0.7.0
func (r PrebuildPhase) IsKnown() bool
type PrebuildService ¶ added in v0.7.0
type PrebuildService struct {
Options []option.RequestOption
}
PrebuildService 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 NewPrebuildService method instead.
func NewPrebuildService ¶ added in v0.7.0
func NewPrebuildService(opts ...option.RequestOption) (r *PrebuildService)
NewPrebuildService 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 (*PrebuildService) Cancel ¶ added in v0.7.0
func (r *PrebuildService) Cancel(ctx context.Context, body PrebuildCancelParams, opts ...option.RequestOption) (res *PrebuildCancelResponse, err error)
Cancels a running prebuild.
Use this method to:
- Stop prebuilds that are no longer needed - Free up resources for other operations
### Examples
- Cancel prebuild:
Stops a running prebuild and cleans up resources. ```yaml prebuildId: "07e03a28-65a5-4d98-b532-8ea67b188048" ```
func (*PrebuildService) Delete ¶ added in v0.7.0
func (r *PrebuildService) Delete(ctx context.Context, body PrebuildDeleteParams, opts ...option.RequestOption) (res *PrebuildDeleteResponse, err error)
Deletes a prebuild.
Prebuilds are automatically deleted after some time. Use this method to manually delete a prebuild before automatic cleanup, for example to remove a prebuild that should no longer be used.
Deletion is processed asynchronously. The prebuild will be marked for deletion and removed from the system in the background.
### Examples
- Delete prebuild:
Marks a prebuild for deletion and removes it from the system. ```yaml prebuildId: "07e03a28-65a5-4d98-b532-8ea67b188048" ```
func (*PrebuildService) Get ¶ added in v0.7.0
func (r *PrebuildService) Get(ctx context.Context, body PrebuildGetParams, opts ...option.RequestOption) (res *PrebuildGetResponse, err error)
Gets details about a specific prebuild.
Use this method to:
- Check prebuild status and progress - Access prebuild logs for debugging
### Examples
- Get prebuild details:
Retrieves comprehensive information about a prebuild. ```yaml prebuildId: "07e03a28-65a5-4d98-b532-8ea67b188048" ```
func (*PrebuildService) List ¶ added in v0.7.0
func (r *PrebuildService) List(ctx context.Context, params PrebuildListParams, opts ...option.RequestOption) (res *pagination.PrebuildsPage[Prebuild], err error)
ListPrebuilds
func (*PrebuildService) ListAutoPaging ¶ added in v0.7.0
func (r *PrebuildService) ListAutoPaging(ctx context.Context, params PrebuildListParams, opts ...option.RequestOption) *pagination.PrebuildsPageAutoPager[Prebuild]
ListPrebuilds
func (*PrebuildService) New ¶ added in v0.7.0
func (r *PrebuildService) New(ctx context.Context, body PrebuildNewParams, opts ...option.RequestOption) (res *PrebuildNewResponse, err error)
Creates a prebuild for a project.
Use this method to:
- Create on-demand prebuilds for faster environment startup - Trigger prebuilds after repository changes - Generate prebuilds for specific environment classes
The prebuild process creates an environment, runs the devcontainer prebuild lifecycle, and creates a snapshot for future environment provisioning.
### Examples
- Create basic prebuild:
Creates a prebuild for a project using default settings. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" spec: timeout: "3600s" # 60 minutes default ```
- Create prebuild with custom environment class:
Creates a prebuild with a specific environment class and timeout. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" spec: timeout: "3600s" # 1 hour ```
func (*PrebuildService) NewLogsToken ¶ added in v0.7.0
func (r *PrebuildService) NewLogsToken(ctx context.Context, body PrebuildNewLogsTokenParams, opts ...option.RequestOption) (res *PrebuildNewLogsTokenResponse, err error)
Creates a logs access token for a prebuild.
Use this method to:
- Stream logs from a running prebuild - Access archived logs from completed prebuilds
Generated tokens are valid for one hour.
### Examples
- Create prebuild logs token:
Generates a token for accessing prebuild logs. ```yaml prebuildId: "07e03a28-65a5-4d98-b532-8ea67b188048" ```
type PrebuildSpec ¶ added in v0.7.0
type PrebuildSpec struct {
// desired_phase is the desired phase of the prebuild. Used to signal cancellation
// or other state changes. This field is managed by the API and reconciler.
DesiredPhase PrebuildPhase `json:"desiredPhase"`
// spec_version is incremented each time the spec is updated. Used for optimistic
// concurrency control.
SpecVersion string `json:"specVersion"`
// timeout is the maximum time allowed for the prebuild to complete. Defaults to 60
// minutes if not specified. Maximum allowed timeout is 2 hours.
Timeout string `json:"timeout" format:"regex"`
JSON prebuildSpecJSON `json:"-"`
}
PrebuildSpec contains the configuration used to create a prebuild
func (*PrebuildSpec) UnmarshalJSON ¶ added in v0.7.0
func (r *PrebuildSpec) UnmarshalJSON(data []byte) (err error)
type PrebuildSpecParam ¶ added in v0.7.0
type PrebuildSpecParam struct {
// desired_phase is the desired phase of the prebuild. Used to signal cancellation
// or other state changes. This field is managed by the API and reconciler.
DesiredPhase param.Field[PrebuildPhase] `json:"desiredPhase"`
// spec_version is incremented each time the spec is updated. Used for optimistic
// concurrency control.
SpecVersion param.Field[string] `json:"specVersion"`
// timeout is the maximum time allowed for the prebuild to complete. Defaults to 60
// minutes if not specified. Maximum allowed timeout is 2 hours.
Timeout param.Field[string] `json:"timeout" format:"regex"`
}
PrebuildSpec contains the configuration used to create a prebuild
func (PrebuildSpecParam) MarshalJSON ¶ added in v0.7.0
func (r PrebuildSpecParam) MarshalJSON() (data []byte, err error)
type PrebuildStatus ¶ added in v0.7.0
type PrebuildStatus struct {
// phase is the current phase of the prebuild lifecycle
Phase PrebuildPhase `json:"phase,required"`
// completion_time is when the prebuild completed (successfully or with failure)
CompletionTime time.Time `json:"completionTime" format:"date-time"`
// environment_id is the ID of the environment used to create this prebuild. This
// field is set when the prebuild environment is created.
EnvironmentID string `json:"environmentId" format:"uuid"`
// failure_message contains details about why the prebuild failed
FailureMessage string `json:"failureMessage"`
// log_url provides access to prebuild logs. During prebuild execution, this
// references the environment logs. After completion, this may reference archived
// logs.
LogURL string `json:"logUrl" format:"uri"`
// status_version is incremented each time the status is updated. Used for
// optimistic concurrency control.
StatusVersion string `json:"statusVersion"`
// warning_message contains warnings from the prebuild environment that indicate
// something went wrong but the prebuild could still complete. For example, the
// devcontainer failed to build but the environment is still usable. These warnings
// will likely affect any environment started from this prebuild.
WarningMessage string `json:"warningMessage"`
JSON prebuildStatusJSON `json:"-"`
}
PrebuildStatus contains the current status and progress of a prebuild
func (*PrebuildStatus) UnmarshalJSON ¶ added in v0.7.0
func (r *PrebuildStatus) UnmarshalJSON(data []byte) (err error)
type PrebuildTrigger ¶ added in v0.7.0
type PrebuildTrigger string
PrebuildTrigger indicates how the prebuild was triggered
const ( PrebuildTriggerUnspecified PrebuildTrigger = "PREBUILD_TRIGGER_UNSPECIFIED" PrebuildTriggerManual PrebuildTrigger = "PREBUILD_TRIGGER_MANUAL" PrebuildTriggerScheduled PrebuildTrigger = "PREBUILD_TRIGGER_SCHEDULED" )
func (PrebuildTrigger) IsKnown ¶ added in v0.7.0
func (r PrebuildTrigger) IsKnown() bool
type Project ¶
type Project struct {
// Use `environment_classes` instead.
//
// Deprecated: deprecated
EnvironmentClass shared.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"`
// desired_phase is the desired phase of the project When set to DELETED, the
// project is pending deletion
DesiredPhase ProjectPhase `json:"desiredPhase"`
// devcontainer_file_path is the path to the devcontainer file relative to the repo
// root
DevcontainerFilePath string `json:"devcontainerFilePath"`
// environment_classes is the list of environment classes for the project
EnvironmentClasses []shared.ProjectEnvironmentClass `json:"environmentClasses"`
// initializer is the content initializer
Initializer EnvironmentInitializer `json:"initializer"`
Metadata ProjectMetadata `json:"metadata"`
// prebuild_configuration defines how prebuilds are created for this project.
PrebuildConfiguration ProjectPrebuildConfiguration `json:"prebuildConfiguration"`
// technical_description is a detailed technical description of the project This
// field is not returned by default in GetProject or ListProjects responses
TechnicalDescription string `json:"technicalDescription"`
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 ProjectEnvironmentClaseListParams ¶ added in v0.7.0
type ProjectEnvironmentClaseListParams 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[ProjectEnvironmentClaseListParamsPagination] `json:"pagination"`
// project_id specifies the project identifier
ProjectID param.Field[string] `json:"projectId" format:"uuid"`
}
func (ProjectEnvironmentClaseListParams) MarshalJSON ¶ added in v0.7.0
func (r ProjectEnvironmentClaseListParams) MarshalJSON() (data []byte, err error)
func (ProjectEnvironmentClaseListParams) URLQuery ¶ added in v0.7.0
func (r ProjectEnvironmentClaseListParams) URLQuery() (v url.Values)
URLQuery serializes ProjectEnvironmentClaseListParams's query parameters as `url.Values`.
type ProjectEnvironmentClaseListParamsPagination ¶ added in v0.7.0
type ProjectEnvironmentClaseListParamsPagination 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 (ProjectEnvironmentClaseListParamsPagination) MarshalJSON ¶ added in v0.7.0
func (r ProjectEnvironmentClaseListParamsPagination) MarshalJSON() (data []byte, err error)
type ProjectEnvironmentClaseService ¶ added in v0.7.0
type ProjectEnvironmentClaseService struct {
Options []option.RequestOption
}
ProjectEnvironmentClaseService 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 NewProjectEnvironmentClaseService method instead.
func NewProjectEnvironmentClaseService ¶ added in v0.7.0
func NewProjectEnvironmentClaseService(opts ...option.RequestOption) (r *ProjectEnvironmentClaseService)
NewProjectEnvironmentClaseService 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 (*ProjectEnvironmentClaseService) List ¶ added in v0.7.0
func (r *ProjectEnvironmentClaseService) List(ctx context.Context, params ProjectEnvironmentClaseListParams, opts ...option.RequestOption) (res *pagination.ProjectEnvironmentClassesPage[shared.ProjectEnvironmentClass], err error)
Lists environment classes of a project.
Use this method to:
- View all environment classes of a project
### Examples
- List project environment classes:
Shows all environment classes of a project. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 ```
func (*ProjectEnvironmentClaseService) ListAutoPaging ¶ added in v0.7.0
func (r *ProjectEnvironmentClaseService) ListAutoPaging(ctx context.Context, params ProjectEnvironmentClaseListParams, opts ...option.RequestOption) *pagination.ProjectEnvironmentClassesPageAutoPager[shared.ProjectEnvironmentClass]
Lists environment classes of a project.
Use this method to:
- View all environment classes of a project
### Examples
- List project environment classes:
Shows all environment classes of a project. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 ```
func (*ProjectEnvironmentClaseService) Update ¶ added in v0.7.0
func (r *ProjectEnvironmentClaseService) Update(ctx context.Context, body ProjectEnvironmentClaseUpdateParams, opts ...option.RequestOption) (res *ProjectEnvironmentClaseUpdateResponse, err error)
Updates all environment classes of a project.
Use this method to:
- Modify all environment classea of a project
### Examples
- Update project environment classes:
Updates all environment classes for a project.
```yaml
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
projectEnvironmentClasses:
- environmentClassId: "b0e12f6c-4c67-429d-a4a6-d9838b5da041"
order: 0
- localRunner: true
order: 1
```
type ProjectEnvironmentClaseUpdateParams ¶ added in v0.7.0
type ProjectEnvironmentClaseUpdateParams struct {
ProjectEnvironmentClasses param.Field[[]shared.ProjectEnvironmentClassParam] `json:"projectEnvironmentClasses"`
// project_id specifies the project identifier
ProjectID param.Field[string] `json:"projectId" format:"uuid"`
}
func (ProjectEnvironmentClaseUpdateParams) MarshalJSON ¶ added in v0.7.0
func (r ProjectEnvironmentClaseUpdateParams) MarshalJSON() (data []byte, err error)
type ProjectEnvironmentClaseUpdateResponse ¶ added in v0.7.0
type ProjectEnvironmentClaseUpdateResponse = interface{}
type ProjectEnvironmentClass ¶
type ProjectEnvironmentClass = shared.ProjectEnvironmentClass
This is an alias to an internal type.
type ProjectEnvironmentClassParam ¶
type ProjectEnvironmentClassParam = shared.ProjectEnvironmentClassParam
This is an alias to an internal type.
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"`
Filter param.Field[ProjectListParamsFilter] `json:"filter"`
// 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 ProjectListParamsFilter ¶ added in v0.5.0
type ProjectListParamsFilter struct {
// project_ids filters the response to only projects with these IDs
ProjectIDs param.Field[[]string] `json:"projectIds" format:"uuid"`
// runner_ids filters the response to only projects that use environment classes
// from these runners
RunnerIDs param.Field[[]string] `json:"runnerIds" format:"uuid"`
// search performs case-insensitive search across project name, project ID, and
// repository name
Search param.Field[string] `json:"search"`
}
func (ProjectListParamsFilter) MarshalJSON ¶ added in v0.5.0
func (r ProjectListParamsFilter) MarshalJSON() (data []byte, err error)
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 {
// 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"`
// prebuild_configuration defines how prebuilds are created for this project. If
// not set, prebuilds are disabled for the project.
PrebuildConfiguration param.Field[ProjectPrebuildConfigurationParam] `json:"prebuildConfiguration"`
// technical_description is a detailed technical description of the project This
// field is not returned by default in GetProject or ListProjects responses 8KB max
TechnicalDescription param.Field[string] `json:"technicalDescription"`
}
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 ProjectPhase ¶ added in v0.7.0
type ProjectPhase string
const ( ProjectPhaseUnspecified ProjectPhase = "PROJECT_PHASE_UNSPECIFIED" ProjectPhaseActive ProjectPhase = "PROJECT_PHASE_ACTIVE" ProjectPhaseDeleted ProjectPhase = "PROJECT_PHASE_DELETED" )
func (ProjectPhase) IsKnown ¶ added in v0.7.0
func (r ProjectPhase) IsKnown() bool
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 ProjectPrebuildConfiguration ¶ added in v0.7.0
type ProjectPrebuildConfiguration struct {
// enabled controls whether prebuilds are created for this project. When disabled,
// no automatic prebuilds will be triggered.
Enabled bool `json:"enabled"`
// enable_jetbrains_warmup controls whether JetBrains IDE warmup runs during
// prebuilds.
EnableJetbrainsWarmup bool `json:"enableJetbrainsWarmup"`
// environment_class_ids specifies which environment classes should have prebuilds
// created. If empty, no prebuilds are created.
EnvironmentClassIDs []string `json:"environmentClassIds" format:"uuid"`
// executor specifies who runs prebuilds for this project. The executor's SCM
// credentials are used to clone the repository. If not set, defaults to the
// project creator.
Executor shared.Subject `json:"executor"`
// timeout is the maximum duration allowed for a prebuild to complete. If not
// specified, defaults to 1 hour. Must be between 5 minutes and 2 hours.
Timeout string `json:"timeout" format:"regex"`
// trigger defines when prebuilds should be created.
Trigger ProjectPrebuildConfigurationTrigger `json:"trigger"`
JSON projectPrebuildConfigurationJSON `json:"-"`
}
ProjectPrebuildConfiguration defines how prebuilds are created for a project. Prebuilds create environment snapshots that enable faster environment startup times.
func (*ProjectPrebuildConfiguration) UnmarshalJSON ¶ added in v0.7.0
func (r *ProjectPrebuildConfiguration) UnmarshalJSON(data []byte) (err error)
type ProjectPrebuildConfigurationParam ¶ added in v0.7.0
type ProjectPrebuildConfigurationParam struct {
// enabled controls whether prebuilds are created for this project. When disabled,
// no automatic prebuilds will be triggered.
Enabled param.Field[bool] `json:"enabled"`
// enable_jetbrains_warmup controls whether JetBrains IDE warmup runs during
// prebuilds.
EnableJetbrainsWarmup param.Field[bool] `json:"enableJetbrainsWarmup"`
// environment_class_ids specifies which environment classes should have prebuilds
// created. If empty, no prebuilds are created.
EnvironmentClassIDs param.Field[[]string] `json:"environmentClassIds" format:"uuid"`
// executor specifies who runs prebuilds for this project. The executor's SCM
// credentials are used to clone the repository. If not set, defaults to the
// project creator.
Executor param.Field[shared.SubjectParam] `json:"executor"`
// timeout is the maximum duration allowed for a prebuild to complete. If not
// specified, defaults to 1 hour. Must be between 5 minutes and 2 hours.
Timeout param.Field[string] `json:"timeout" format:"regex"`
// trigger defines when prebuilds should be created.
Trigger param.Field[ProjectPrebuildConfigurationTriggerParam] `json:"trigger"`
}
ProjectPrebuildConfiguration defines how prebuilds are created for a project. Prebuilds create environment snapshots that enable faster environment startup times.
func (ProjectPrebuildConfigurationParam) MarshalJSON ¶ added in v0.7.0
func (r ProjectPrebuildConfigurationParam) MarshalJSON() (data []byte, err error)
type ProjectPrebuildConfigurationTrigger ¶ added in v0.7.0
type ProjectPrebuildConfigurationTrigger struct {
// daily_schedule triggers a prebuild once per day at the specified hour (UTC). The
// actual start time may vary slightly to distribute system load.
DailySchedule ProjectPrebuildConfigurationTriggerDailySchedule `json:"dailySchedule,required"`
JSON projectPrebuildConfigurationTriggerJSON `json:"-"`
}
trigger defines when prebuilds should be created.
func (*ProjectPrebuildConfigurationTrigger) UnmarshalJSON ¶ added in v0.7.0
func (r *ProjectPrebuildConfigurationTrigger) UnmarshalJSON(data []byte) (err error)
type ProjectPrebuildConfigurationTriggerDailySchedule ¶ added in v0.7.0
type ProjectPrebuildConfigurationTriggerDailySchedule struct {
// hour_utc is the hour of day (0-23) in UTC when the prebuild should start. The
// actual start time may be adjusted by a few minutes to balance system load.
HourUtc int64 `json:"hourUtc"`
JSON projectPrebuildConfigurationTriggerDailyScheduleJSON `json:"-"`
}
daily_schedule triggers a prebuild once per day at the specified hour (UTC). The actual start time may vary slightly to distribute system load.
func (*ProjectPrebuildConfigurationTriggerDailySchedule) UnmarshalJSON ¶ added in v0.7.0
func (r *ProjectPrebuildConfigurationTriggerDailySchedule) UnmarshalJSON(data []byte) (err error)
type ProjectPrebuildConfigurationTriggerDailyScheduleParam ¶ added in v0.7.0
type ProjectPrebuildConfigurationTriggerDailyScheduleParam struct {
// hour_utc is the hour of day (0-23) in UTC when the prebuild should start. The
// actual start time may be adjusted by a few minutes to balance system load.
HourUtc param.Field[int64] `json:"hourUtc"`
}
daily_schedule triggers a prebuild once per day at the specified hour (UTC). The actual start time may vary slightly to distribute system load.
func (ProjectPrebuildConfigurationTriggerDailyScheduleParam) MarshalJSON ¶ added in v0.7.0
func (r ProjectPrebuildConfigurationTriggerDailyScheduleParam) MarshalJSON() (data []byte, err error)
type ProjectPrebuildConfigurationTriggerParam ¶ added in v0.7.0
type ProjectPrebuildConfigurationTriggerParam struct {
// daily_schedule triggers a prebuild once per day at the specified hour (UTC). The
// actual start time may vary slightly to distribute system load.
DailySchedule param.Field[ProjectPrebuildConfigurationTriggerDailyScheduleParam] `json:"dailySchedule,required"`
}
trigger defines when prebuilds should be created.
func (ProjectPrebuildConfigurationTriggerParam) MarshalJSON ¶ added in v0.7.0
func (r ProjectPrebuildConfigurationTriggerParam) MarshalJSON() (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
EnvironmentClases *ProjectEnvironmentClaseService
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"
initializer:
specs:
- git:
remoteUri: "https://github.com/org/repo"
```
- Create project with devcontainer:
Creates a project with custom development container.
```yaml
name: "Backend Service"
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 - Configure prebuild settings
### Examples
- Update project name:
Changes the project's display name. ```yaml projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" name: "New Project Name" ```
- Enable prebuilds with daily schedule:
Configures prebuilds to run daily at 2 AM UTC.
```yaml
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
prebuildConfiguration:
enabled: true
environmentClassIds:
- "b0e12f6c-4c67-429d-a4a6-d9838b5da041"
timeout: "3600s"
trigger:
dailySchedule:
hourUtc: 2
```
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"`
// initializer is the content initializer
Initializer param.Field[EnvironmentInitializerParam] `json:"initializer"`
Name param.Field[string] `json:"name"`
// prebuild_configuration defines how prebuilds are created for this project. If
// not provided, the existing prebuild configuration is not modified. To disable
// prebuilds, set enabled to false.
PrebuildConfiguration param.Field[ProjectPrebuildConfigurationParam] `json:"prebuildConfiguration"`
// project_id specifies the project identifier
ProjectID param.Field[string] `json:"projectId" format:"uuid"`
// technical_description is a detailed technical description of the project This
// field is not returned by default in GetProject or ListProjects responses 8KB max
TechnicalDescription param.Field[string] `json:"technicalDescription"`
}
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 Prompt ¶ added in v0.7.0
type Prompt struct {
ID string `json:"id"`
Metadata PromptMetadata `json:"metadata"`
Spec PromptSpec `json:"spec"`
JSON promptJSON `json:"-"`
}
func (*Prompt) UnmarshalJSON ¶ added in v0.7.0
type PromptMetadata ¶ added in v0.7.0
type PromptMetadata 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 prompt creator
Creator shared.Subject `json:"creator"`
// description is a description of what the prompt does
Description string `json:"description"`
// name is the human readable name of the prompt
Name string `json:"name"`
// organization_id is the ID of the organization that contains the prompt
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 promptMetadataJSON `json:"-"`
}
func (*PromptMetadata) UnmarshalJSON ¶ added in v0.7.0
func (r *PromptMetadata) UnmarshalJSON(data []byte) (err error)
type PromptSpec ¶ added in v0.7.0
type PromptSpec struct {
// command is the unique command string within the organization
Command string `json:"command"`
// is_command indicates if this prompt is a command
IsCommand bool `json:"isCommand"`
// is_template indicates if this prompt is a template
IsTemplate bool `json:"isTemplate"`
// prompt is the content of the prompt
Prompt string `json:"prompt"`
JSON promptSpecJSON `json:"-"`
}
func (*PromptSpec) UnmarshalJSON ¶ added in v0.7.0
func (r *PromptSpec) 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 RequestInfoParam ¶ added in v0.7.0
type RequestInfoParam struct {
// Request body (truncated if large)
Data param.Field[string] `json:"data"`
// Request headers
Headers param.Field[map[string]string] `json:"headers"`
// HTTP method
Method param.Field[string] `json:"method"`
// Query parameters
QueryString param.Field[map[string]string] `json:"queryString"`
// Request URL
URL param.Field[string] `json:"url"`
}
Request information (Sentry-compatible)
func (RequestInfoParam) MarshalJSON ¶ added in v0.7.0
func (r RequestInfoParam) MarshalJSON() (data []byte, err error)
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 ResourceRole ¶ added in v0.7.0
type ResourceRole string
ResourceRole represents roles that can be assigned to groups on resources These map directly to the roles defined in backend/db/rule/rbac/role/role.go
const ( ResourceRoleUnspecified ResourceRole = "RESOURCE_ROLE_UNSPECIFIED" ResourceRoleOrgAdmin ResourceRole = "RESOURCE_ROLE_ORG_ADMIN" ResourceRoleOrgMember ResourceRole = "RESOURCE_ROLE_ORG_MEMBER" ResourceRoleGroupAdmin ResourceRole = "RESOURCE_ROLE_GROUP_ADMIN" ResourceRoleGroupViewer ResourceRole = "RESOURCE_ROLE_GROUP_VIEWER" ResourceRoleUserIdentity ResourceRole = "RESOURCE_ROLE_USER_IDENTITY" ResourceRoleUserViewer ResourceRole = "RESOURCE_ROLE_USER_VIEWER" ResourceRoleUserAdmin ResourceRole = "RESOURCE_ROLE_USER_ADMIN" ResourceRoleEnvironmentIdentity ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_IDENTITY" ResourceRoleEnvironmentAdmin ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_ADMIN" ResourceRoleEnvironmentUser ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_USER" ResourceRoleEnvironmentViewer ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_VIEWER" ResourceRoleEnvironmentRunner ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_RUNNER" ResourceRoleRunnerIdentity ResourceRole = "RESOURCE_ROLE_RUNNER_IDENTITY" ResourceRoleRunnerAdmin ResourceRole = "RESOURCE_ROLE_RUNNER_ADMIN" ResourceRoleRunnerLocalAdmin ResourceRole = "RESOURCE_ROLE_RUNNER_LOCAL_ADMIN" ResourceRoleRunnerManagedAdmin ResourceRole = "RESOURCE_ROLE_RUNNER_MANAGED_ADMIN" ResourceRoleRunnerUser ResourceRole = "RESOURCE_ROLE_RUNNER_USER" ResourceRoleRunnerConfigurationReader ResourceRole = "RESOURCE_ROLE_RUNNER_CONFIGURATION_READER" ResourceRoleHostAuthenticationTokenAdmin ResourceRole = "RESOURCE_ROLE_HOST_AUTHENTICATION_TOKEN_ADMIN" ResourceRoleHostAuthenticationTokenUpdater ResourceRole = "RESOURCE_ROLE_HOST_AUTHENTICATION_TOKEN_UPDATER" ResourceRoleProjectAdmin ResourceRole = "RESOURCE_ROLE_PROJECT_ADMIN" ResourceRoleProjectUser ResourceRole = "RESOURCE_ROLE_PROJECT_USER" ResourceRoleProjectEditor ResourceRole = "RESOURCE_ROLE_PROJECT_EDITOR" ResourceRoleEnvironmentServiceAdmin ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_SERVICE_ADMIN" ResourceRoleEnvironmentServiceViewer ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_SERVICE_VIEWER" ResourceRoleEnvironmentServiceUser ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_SERVICE_USER" ResourceRoleEnvironmentServiceEnv ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_SERVICE_ENV" ResourceRoleEnvironmentTaskAdmin ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_TASK_ADMIN" ResourceRoleEnvironmentTaskViewer ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_TASK_VIEWER" ResourceRoleEnvironmentTaskUser ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_TASK_USER" ResourceRoleEnvironmentTaskEnv ResourceRole = "RESOURCE_ROLE_ENVIRONMENT_TASK_ENV" ResourceRoleServiceAccountIdentity ResourceRole = "RESOURCE_ROLE_SERVICE_ACCOUNT_IDENTITY" ResourceRoleServiceAccountAdmin ResourceRole = "RESOURCE_ROLE_SERVICE_ACCOUNT_ADMIN" ResourceRoleAgentExecutionIdentity ResourceRole = "RESOURCE_ROLE_AGENT_EXECUTION_IDENTITY" ResourceRoleAgentExecutionUser ResourceRole = "RESOURCE_ROLE_AGENT_EXECUTION_USER" ResourceRoleAgentExecutionAdmin ResourceRole = "RESOURCE_ROLE_AGENT_EXECUTION_ADMIN" ResourceRoleAgentExecutionRunner ResourceRole = "RESOURCE_ROLE_AGENT_EXECUTION_RUNNER" ResourceRoleAgentExecutionOutputsReporter ResourceRole = "RESOURCE_ROLE_AGENT_EXECUTION_OUTPUTS_REPORTER" ResourceRoleAgentAdmin ResourceRole = "RESOURCE_ROLE_AGENT_ADMIN" ResourceRoleAgentViewer ResourceRole = "RESOURCE_ROLE_AGENT_VIEWER" ResourceRoleAgentExecutor ResourceRole = "RESOURCE_ROLE_AGENT_EXECUTOR" ResourceRoleWorkflowAdmin ResourceRole = "RESOURCE_ROLE_WORKFLOW_ADMIN" ResourceRoleWorkflowUser ResourceRole = "RESOURCE_ROLE_WORKFLOW_USER" ResourceRoleWorkflowViewer ResourceRole = "RESOURCE_ROLE_WORKFLOW_VIEWER" ResourceRoleWorkflowExecutor ResourceRole = "RESOURCE_ROLE_WORKFLOW_EXECUTOR" ResourceRoleSnapshotAdmin ResourceRole = "RESOURCE_ROLE_SNAPSHOT_ADMIN" ResourceRoleSnapshotRunner ResourceRole = "RESOURCE_ROLE_SNAPSHOT_RUNNER" )
func (ResourceRole) IsKnown ¶ added in v0.7.0
func (r ResourceRole) IsKnown() bool
type RoleAssignment ¶ added in v0.7.0
type RoleAssignment struct {
// Unique identifier for the role assignment
ID string `json:"id" format:"uuid"`
// Group identifier
GroupID string `json:"groupId" format:"uuid"`
// Organization identifier
OrganizationID string `json:"organizationId" format:"uuid"`
// Resource identifier
ResourceID string `json:"resourceId" format:"uuid"`
// Role assigned to the group on this resource
ResourceRole ResourceRole `json:"resourceRole"`
// Type of resource (runner, project, environment, etc.)
ResourceType shared.ResourceType `json:"resourceType"`
JSON roleAssignmentJSON `json:"-"`
}
RoleAssignment represents a role assigned to a group on a specific resource
func (*RoleAssignment) UnmarshalJSON ¶ added in v0.7.0
func (r *RoleAssignment) UnmarshalJSON(data []byte) (err error)
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 manager id specifies the runner manager for the managed runner. This
// field is only set for managed runners.
RunnerManagerID string `json:"runnerManagerId" format:"uuid"`
// 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" RunnerCapabilityAgentExecution RunnerCapability = "RUNNER_CAPABILITY_AGENT_EXECUTION" RunnerCapabilityAllowEnvTokenPopulation RunnerCapability = "RUNNER_CAPABILITY_ALLOW_ENV_TOKEN_POPULATION" RunnerCapabilityDefaultDevContainerImage RunnerCapability = "RUNNER_CAPABILITY_DEFAULT_DEV_CONTAINER_IMAGE" RunnerCapabilityEnvironmentSnapshot RunnerCapability = "RUNNER_CAPABILITY_ENVIRONMENT_SNAPSHOT" )
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"`
// devcontainer_image_cache_enabled controls whether the devcontainer build cache
// is enabled for this runner. Only takes effect on supported runners, currently
// only AWS EC2 and Gitpod-managed runners.
DevcontainerImageCacheEnabled bool `json:"devcontainerImageCacheEnabled"`
// log_level is the log level for the runner
LogLevel LogLevel `json:"logLevel"`
// metrics contains configuration for the runner's metrics collection
Metrics MetricsConfiguration `json:"metrics"`
// 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"`
// Filter by subject (user or service account)
SubjectID param.Field[string] `json:"subjectId" format:"uuid"`
// Deprecated: Use principal_id instead
//
// Deprecated: deprecated
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 {
// stored encrypted, retrieved via GetHostAuthenticationTokenValue
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"`
IntegrationID param.Field[string] `json:"integrationId" format:"uuid"`
// stored encrypted, retrieved via GetHostAuthenticationTokenValue
RefreshToken param.Field[string] `json:"refreshToken"`
RunnerID param.Field[string] `json:"runnerId" format:"uuid"`
// Maximum 100 scopes allowed (101 for validation purposes)
Scopes param.Field[[]string] `json:"scopes"`
Source param.Field[HostAuthenticationTokenSource] `json:"source"`
// Subject identifies the principal (user or service account) for the token
Subject param.Field[shared.SubjectParam] `json:"subject"`
// Deprecated: Use principal_id and principal_type instead
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"`
Scopes param.Field[[]string] `json:"scopes"`
}
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"`
// devcontainer_image_cache_enabled controls whether the devcontainer build cache
// is enabled for this runner. Only takes effect on supported runners, currently
// only AWS EC2 and Gitpod-managed runners.
DevcontainerImageCacheEnabled param.Field[bool] `json:"devcontainerImageCacheEnabled"`
// log_level is the log level for the runner
LogLevel param.Field[LogLevel] `json:"logLevel"`
// metrics contains configuration for the runner's metrics collection
Metrics param.Field[MetricsConfigurationParam] `json:"metrics"`
// 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 {
// deprecated, will be removed, use default_value instead
//
// Deprecated: deprecated
Default string `json:"default"`
DefaultValue RunnerConfigurationSchemaEnvironmentClassesEnumDefaultValue `json:"defaultValue"`
PossibleValues []RunnerConfigurationSchemaEnvironmentClassesEnumPossibleValue `json:"possibleValues"`
// deprecated, will be removed, use possible_values instead
//
// Deprecated: deprecated
Values []string `json:"values"`
JSON runnerConfigurationSchemaEnvironmentClassesEnumJSON `json:"-"`
}
func (*RunnerConfigurationSchemaEnvironmentClassesEnum) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaEnvironmentClassesEnum) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaEnvironmentClassesEnumDefaultValue ¶ added in v0.5.0
type RunnerConfigurationSchemaEnvironmentClassesEnumDefaultValue struct {
Detail string `json:"detail"`
Subtitle string `json:"subtitle"`
Title string `json:"title"`
JSON runnerConfigurationSchemaEnvironmentClassesEnumDefaultValueJSON `json:"-"`
}
func (*RunnerConfigurationSchemaEnvironmentClassesEnumDefaultValue) UnmarshalJSON ¶ added in v0.5.0
func (r *RunnerConfigurationSchemaEnvironmentClassesEnumDefaultValue) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaEnvironmentClassesEnumPossibleValue ¶ added in v0.5.0
type RunnerConfigurationSchemaEnvironmentClassesEnumPossibleValue struct {
Detail string `json:"detail"`
Subtitle string `json:"subtitle"`
Title string `json:"title"`
JSON runnerConfigurationSchemaEnvironmentClassesEnumPossibleValueJSON `json:"-"`
}
func (*RunnerConfigurationSchemaEnvironmentClassesEnumPossibleValue) UnmarshalJSON ¶ added in v0.5.0
func (r *RunnerConfigurationSchemaEnvironmentClassesEnumPossibleValue) 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 {
// deprecated, will be removed, use default_value instead
//
// Deprecated: deprecated
Default string `json:"default"`
DefaultValue RunnerConfigurationSchemaRunnerConfigEnumDefaultValue `json:"defaultValue"`
PossibleValues []RunnerConfigurationSchemaRunnerConfigEnumPossibleValue `json:"possibleValues"`
// deprecated, will be removed, use possible_values instead
//
// Deprecated: deprecated
Values []string `json:"values"`
JSON runnerConfigurationSchemaRunnerConfigEnumJSON `json:"-"`
}
func (*RunnerConfigurationSchemaRunnerConfigEnum) UnmarshalJSON ¶
func (r *RunnerConfigurationSchemaRunnerConfigEnum) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaRunnerConfigEnumDefaultValue ¶ added in v0.5.0
type RunnerConfigurationSchemaRunnerConfigEnumDefaultValue struct {
Detail string `json:"detail"`
Subtitle string `json:"subtitle"`
Title string `json:"title"`
JSON runnerConfigurationSchemaRunnerConfigEnumDefaultValueJSON `json:"-"`
}
func (*RunnerConfigurationSchemaRunnerConfigEnumDefaultValue) UnmarshalJSON ¶ added in v0.5.0
func (r *RunnerConfigurationSchemaRunnerConfigEnumDefaultValue) UnmarshalJSON(data []byte) (err error)
type RunnerConfigurationSchemaRunnerConfigEnumPossibleValue ¶ added in v0.5.0
type RunnerConfigurationSchemaRunnerConfigEnumPossibleValue struct {
Detail string `json:"detail"`
Subtitle string `json:"subtitle"`
Title string `json:"title"`
JSON runnerConfigurationSchemaRunnerConfigEnumPossibleValueJSON `json:"-"`
}
func (*RunnerConfigurationSchemaRunnerConfigEnumPossibleValue) UnmarshalJSON ¶ added in v0.5.0
func (r *RunnerConfigurationSchemaRunnerConfigEnumPossibleValue) 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"`
// issuer_url can be set to override the authentication provider URL, if it doesn't
// match the SCM host.
IssuerURL param.Field[string] `json:"issuerUrl"`
// 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"`
// virtual_directory is the virtual directory path for Azure DevOps Server (e.g.,
// "/tfs"). This field is only used for Azure DevOps Server SCM integrations and
// should be empty for other SCM types. Azure DevOps Server APIs work without
// collection when PAT scope is 'All accessible organizations'.
VirtualDirectory param.Field[string] `json:"virtualDirectory"`
}
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"`
// issuer_url can be set to override the authentication provider URL, if it doesn't
// match the SCM host.
IssuerURL param.Field[string] `json:"issuerUrl"`
// 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"`
// virtual_directory is the virtual directory path for Azure DevOps Server (e.g.,
// "/tfs"). This field is only used for Azure DevOps Server SCM integrations and
// should be empty for other SCM types. Azure DevOps Server APIs work without
// collection when PAT scope is 'All accessible organizations'.
VirtualDirectory param.Field[string] `json:"virtualDirectory"`
}
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"`
// issuer_url can be set to override the authentication provider URL, if it doesn't
// match the SCM host.
IssuerURL param.Field[string] `json:"issuerUrl"`
// 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"`
// virtual_directory is the virtual directory path for Azure DevOps Server (e.g.,
// "/tfs"). This field is only used for Azure DevOps Server SCM integrations and
// should be empty for other SCM types. Azure DevOps Server APIs work without
// collection when PAT scope is 'All accessible organizations'.
VirtualDirectory param.Field[string] `json:"virtualDirectory"`
}
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 RunnerNewLogsTokenParams ¶ added in v0.7.0
type RunnerNewLogsTokenParams struct {
// runner_id specifies the runner for which the logs token should be created.
//
// +required
RunnerID param.Field[string] `json:"runnerId" format:"uuid"`
}
func (RunnerNewLogsTokenParams) MarshalJSON ¶ added in v0.7.0
func (r RunnerNewLogsTokenParams) MarshalJSON() (data []byte, err error)
type RunnerNewLogsTokenResponse ¶ added in v0.7.0
type RunnerNewLogsTokenResponse struct {
// access_token is the token that can be used to access the logs and support bundle
// of the runner
AccessToken string `json:"accessToken,required"`
JSON runnerNewLogsTokenResponseJSON `json:"-"`
}
func (*RunnerNewLogsTokenResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *RunnerNewLogsTokenResponse) UnmarshalJSON(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"`
// The runner manager id specifies the runner manager for the managed runner. This
// field is mandatory for managed runners, otheriwse should not be set.
RunnerManagerID param.Field[string] `json:"runnerManagerId" format:"uuid"`
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"`
Issue RunnerParseContextURLResponseIssue `json:"issue"`
OriginalContextURL string `json:"originalContextUrl"`
// Deprecated: Use top-level PullRequest message instead
//
// Deprecated: deprecated
Pr RunnerParseContextURLResponsePr `json:"pr"`
// project_ids is a list of projects to which the context URL belongs to.
ProjectIDs []string `json:"projectIds"`
// PullRequest represents pull request metadata from source control systems. This
// message is used across workflow triggers, executions, and agent contexts to
// maintain consistent PR information throughout the system.
PullRequest RunnerParseContextURLResponsePullRequest `json:"pullRequest"`
// scm_id is the unique identifier of the SCM provider (e.g., "github", "gitlab",
// "bitbucket")
ScmID string `json:"scmId"`
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"`
Tag string `json:"tag"`
UpstreamRemoteURL string `json:"upstreamRemoteUrl"`
JSON runnerParseContextURLResponseGitJSON `json:"-"`
}
func (*RunnerParseContextURLResponseGit) UnmarshalJSON ¶
func (r *RunnerParseContextURLResponseGit) UnmarshalJSON(data []byte) (err error)
type RunnerParseContextURLResponseIssue ¶ added in v0.7.0
type RunnerParseContextURLResponseIssue struct {
// id is the source system's ID of this issue, e.g. BNFRD-6100
ID string `json:"id"`
Title string `json:"title"`
JSON runnerParseContextURLResponseIssueJSON `json:"-"`
}
func (*RunnerParseContextURLResponseIssue) UnmarshalJSON ¶ added in v0.7.0
func (r *RunnerParseContextURLResponseIssue) UnmarshalJSON(data []byte) (err error)
type RunnerParseContextURLResponsePr
deprecated
added in
v0.7.0
type RunnerParseContextURLResponsePr struct {
ID string `json:"id"`
FromBranch string `json:"fromBranch"`
Title string `json:"title"`
ToBranch string `json:"toBranch"`
JSON runnerParseContextURLResponsePrJSON `json:"-"`
}
Deprecated: Use top-level PullRequest message instead
Deprecated: deprecated
func (*RunnerParseContextURLResponsePr) UnmarshalJSON ¶ added in v0.7.0
func (r *RunnerParseContextURLResponsePr) UnmarshalJSON(data []byte) (err error)
type RunnerParseContextURLResponsePullRequest ¶ added in v0.7.0
type RunnerParseContextURLResponsePullRequest struct {
// Unique identifier from the source system (e.g., "123" for GitHub PR #123)
ID string `json:"id"`
// Author name as provided by the SCM system
Author string `json:"author"`
// Source branch name (the branch being merged from)
FromBranch string `json:"fromBranch"`
// Repository information
Repository RunnerParseContextURLResponsePullRequestRepository `json:"repository"`
// Pull request title
Title string `json:"title"`
// Target branch name (the branch being merged into)
ToBranch string `json:"toBranch"`
// Pull request URL (e.g., "https://github.com/owner/repo/pull/123")
URL string `json:"url"`
JSON runnerParseContextURLResponsePullRequestJSON `json:"-"`
}
PullRequest represents pull request metadata from source control systems. This message is used across workflow triggers, executions, and agent contexts to maintain consistent PR information throughout the system.
func (*RunnerParseContextURLResponsePullRequest) UnmarshalJSON ¶ added in v0.7.0
func (r *RunnerParseContextURLResponsePullRequest) UnmarshalJSON(data []byte) (err error)
type RunnerParseContextURLResponsePullRequestRepository ¶ added in v0.7.0
type RunnerParseContextURLResponsePullRequestRepository struct {
CloneURL string `json:"cloneUrl"`
Host string `json:"host"`
Name string `json:"name"`
Owner string `json:"owner"`
JSON runnerParseContextURLResponsePullRequestRepositoryJSON `json:"-"`
}
Repository information
func (*RunnerParseContextURLResponsePullRequestRepository) UnmarshalJSON ¶ added in v0.7.0
func (r *RunnerParseContextURLResponsePullRequestRepository) 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" RunnerProviderManaged RunnerProvider = "RUNNER_PROVIDER_MANAGED" RunnerProviderGcp RunnerProvider = "RUNNER_PROVIDER_GCP" )
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 RunnerSearchRepositoriesParams ¶ added in v0.7.0
type RunnerSearchRepositoriesParams struct {
// Maximum number of repositories to return. Default: 25, Maximum: 100 Deprecated:
// Use pagination.page_size instead
Limit param.Field[int64] `json:"limit"`
// Pagination parameters for repository search
Pagination param.Field[RunnerSearchRepositoriesParamsPagination] `json:"pagination"`
RunnerID param.Field[string] `json:"runnerId" format:"uuid"`
// The SCM's host to retrieve repositories from
ScmHost param.Field[string] `json:"scmHost"`
// Search mode determines how search_string is interpreted
SearchMode param.Field[SearchMode] `json:"searchMode"`
// Search query - interpretation depends on search_mode
SearchString param.Field[string] `json:"searchString"`
}
func (RunnerSearchRepositoriesParams) MarshalJSON ¶ added in v0.7.0
func (r RunnerSearchRepositoriesParams) MarshalJSON() (data []byte, err error)
type RunnerSearchRepositoriesParamsPagination ¶ added in v0.7.0
type RunnerSearchRepositoriesParamsPagination 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 parameters for repository search
func (RunnerSearchRepositoriesParamsPagination) MarshalJSON ¶ added in v0.7.0
func (r RunnerSearchRepositoriesParamsPagination) MarshalJSON() (data []byte, err error)
type RunnerSearchRepositoriesResponse ¶ added in v0.7.0
type RunnerSearchRepositoriesResponse struct {
// Last page in the responses
LastPage int64 `json:"lastPage"`
// Pagination information for the response
Pagination RunnerSearchRepositoriesResponsePagination `json:"pagination"`
// List of repositories matching the search criteria
Repositories []RunnerSearchRepositoriesResponseRepository `json:"repositories"`
JSON runnerSearchRepositoriesResponseJSON `json:"-"`
}
func (*RunnerSearchRepositoriesResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *RunnerSearchRepositoriesResponse) UnmarshalJSON(data []byte) (err error)
type RunnerSearchRepositoriesResponsePagination ¶ added in v0.7.0
type RunnerSearchRepositoriesResponsePagination struct {
// Token passed for retrieving the next set of results. Empty if there are no more
// results
NextToken string `json:"nextToken"`
JSON runnerSearchRepositoriesResponsePaginationJSON `json:"-"`
}
Pagination information for the response
func (*RunnerSearchRepositoriesResponsePagination) UnmarshalJSON ¶ added in v0.7.0
func (r *RunnerSearchRepositoriesResponsePagination) UnmarshalJSON(data []byte) (err error)
type RunnerSearchRepositoriesResponseRepository ¶ added in v0.7.0
type RunnerSearchRepositoriesResponseRepository struct {
// Repository name (e.g., "my-project")
Name string `json:"name"`
// Repository URL (e.g., "https://github.com/owner/my-project")
URL string `json:"url"`
JSON runnerSearchRepositoriesResponseRepositoryJSON `json:"-"`
}
func (*RunnerSearchRepositoriesResponseRepository) UnmarshalJSON ¶ added in v0.7.0
func (r *RunnerSearchRepositoriesResponseRepository) UnmarshalJSON(data []byte) (err error)
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) NewLogsToken ¶ added in v0.7.0
func (r *RunnerService) NewLogsToken(ctx context.Context, body RunnerNewLogsTokenParams, opts ...option.RequestOption) (res *RunnerNewLogsTokenResponse, err error)
Creates an access token for runner logs and debug information.
Generated tokens are valid for one hour and provide runner-specific access permissions. The token is scoped to a specific runner and can be used to access support bundles.
### Examples
- Generate runner logs token:
```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
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) SearchRepositories ¶ added in v0.7.0
func (r *RunnerService) SearchRepositories(ctx context.Context, body RunnerSearchRepositoriesParams, opts ...option.RequestOption) (res *RunnerSearchRepositoriesResponse, err error)
Searches for repositories across all authenticated SCM hosts.
Use this method to:
- List available repositories - Search repositories by name or content - Discover repositories for environment creation
Returns repositories from all authenticated SCM hosts in natural sort order. If no repositories are found, returns an empty list.
### Examples
- List all repositories:
Returns up to 25 repositories from all authenticated hosts. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ```
- Search repositories:
Searches for repositories matching the query across all hosts. ```yaml runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" searchString: "my-project" limit: 10 ```
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"`
// The runner's variant
Variant RunnerVariant `json:"variant"`
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"`
// The runner's variant
Variant param.Field[RunnerVariant] `json:"variant"`
}
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"`
// gateway_info is information about the gateway to which the runner is connected.
GatewayInfo GatewayInfo `json:"gatewayInfo"`
// llm_url is the URL of the LLM service to which the runner is connected.
LlmURL string `json:"llmUrl"`
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"`
// public_key is the runner's public key used for encryption (32 bytes)
PublicKey string `json:"publicKey" format:"byte"`
// region is the region the runner is running in, if applicable.
Region string `json:"region"`
// support_bundle_url is the URL at which the runner support bundle can be
// accessed. This URL provides access to pprof profiles and other debug
// information. Only available for standalone runners.
SupportBundleURL string `json:"supportBundleUrl"`
SystemDetails string `json:"systemDetails"`
// Time when the status was last updated.
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"`
// devcontainer_image_cache_enabled controls whether the shared devcontainer build
// cache is enabled for this runner.
DevcontainerImageCacheEnabled param.Field[bool] `json:"devcontainerImageCacheEnabled"`
// log_level is the log level for the runner
LogLevel param.Field[LogLevel] `json:"logLevel"`
// metrics contains configuration for the runner's metrics collection
Metrics param.Field[RunnerUpdateParamsSpecConfigurationMetrics] `json:"metrics"`
// 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 RunnerUpdateParamsSpecConfigurationMetrics ¶ added in v0.5.0
type RunnerUpdateParamsSpecConfigurationMetrics struct {
// enabled indicates whether the runner should collect metrics
Enabled param.Field[bool] `json:"enabled"`
// password is the password to use for the metrics collector
Password param.Field[string] `json:"password"`
// url is the URL of the metrics collector
URL param.Field[string] `json:"url"`
// username is the username to use for the metrics collector
Username param.Field[string] `json:"username"`
}
metrics contains configuration for the runner's metrics collection
func (RunnerUpdateParamsSpecConfigurationMetrics) MarshalJSON ¶ added in v0.5.0
func (r RunnerUpdateParamsSpecConfigurationMetrics) MarshalJSON() (data []byte, err error)
type RunnerUpdateResponse ¶
type RunnerUpdateResponse = interface{}
type RunnerVariant ¶ added in v0.7.0
type RunnerVariant string
const ( RunnerVariantUnspecified RunnerVariant = "RUNNER_VARIANT_UNSPECIFIED" RunnerVariantStandard RunnerVariant = "RUNNER_VARIANT_STANDARD" RunnerVariantEnterprise RunnerVariant = "RUNNER_VARIANT_ENTERPRISE" )
func (RunnerVariant) IsKnown ¶ added in v0.7.0
func (r RunnerVariant) IsKnown() bool
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"`
DisplayName string `json:"displayName"`
EmailDomain string `json:"emailDomain"`
EmailDomains []string `json:"emailDomains"`
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"`
// virtual_directory is the virtual directory path for Azure DevOps Server (e.g.,
// "/tfs"). This field is only used for Azure DevOps Server SCM integrations and
// should be empty for other SCM types. Azure DevOps Server APIs work without
// collection when PAT scope is 'All accessible organizations'.
VirtualDirectory string `json:"virtualDirectory,nullable"`
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"`
// issuer_url is used to override the authentication provider URL, if it doesn't
// match the SCM host.
//
// +optional if not set, this account is owned by the installation.
IssuerURL string `json:"issuerUrl"`
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 SearchMode ¶ added in v0.7.0
type SearchMode string
const ( SearchModeUnspecified SearchMode = "SEARCH_MODE_UNSPECIFIED" SearchModeKeyword SearchMode = "SEARCH_MODE_KEYWORD" SearchModeNative SearchMode = "SEARCH_MODE_NATIVE" )
func (SearchMode) IsKnown ¶ added in v0.7.0
func (r SearchMode) IsKnown() bool
type Secret ¶
type Secret struct {
ID string `json:"id" format:"uuid"`
// api_only indicates the secret is only available via API/CLI
APIOnly bool `json:"apiOnly"`
// 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 Deprecated: use scope instead
//
// Deprecated: deprecated
ProjectID string `json:"projectId" format:"uuid"`
Scope SecretScope `json:"scope"`
// 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
// Deprecated: use scope instead. Values in project_ids will be ignored.
//
// Deprecated: deprecated
ProjectIDs param.Field[[]string] `json:"projectIds" format:"uuid"`
// scope is the scope of the secrets to list
Scope param.Field[SecretScopeParam] `json:"scope"`
}
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 {
// api_only indicates the secret is only available via API/CLI. These secrets are
// NOT automatically injected into services or devcontainers. Useful for secrets
// that should only be consumed programmatically (e.g., by security agents).
APIOnly param.Field[bool] `json:"apiOnly"`
// secret will be mounted as a docker config in the environment VM, mount will have
// the docker registry host
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 Deprecated: use scope instead
ProjectID param.Field[string] `json:"projectId"`
// scope is the scope of the secret
Scope param.Field[SecretScopeParam] `json:"scope"`
// 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 SecretRef ¶ added in v0.7.0
SecretRef references a secret by its ID.
This is an alias to an internal type.
type SecretRefParam ¶ added in v0.7.0
type SecretRefParam = shared.SecretRefParam
SecretRef references a secret by its ID.
This is an alias to an internal type.
type SecretScope ¶ added in v0.5.0
type SecretScope struct {
// organization_id is the Organization ID this Secret belongs to
OrganizationID string `json:"organizationId" format:"uuid"`
// project_id is the Project ID this Secret belongs to
ProjectID string `json:"projectId" format:"uuid"`
// user_id is the User ID this Secret belongs to
UserID string `json:"userId" format:"uuid"`
JSON secretScopeJSON `json:"-"`
}
func (*SecretScope) UnmarshalJSON ¶ added in v0.5.0
func (r *SecretScope) UnmarshalJSON(data []byte) (err error)
type SecretScopeParam ¶ added in v0.5.0
type SecretScopeParam struct {
// organization_id is the Organization ID this Secret belongs to
OrganizationID param.Field[string] `json:"organizationId" format:"uuid"`
// project_id is the Project ID this Secret belongs to
ProjectID param.Field[string] `json:"projectId" format:"uuid"`
// user_id is the User ID this Secret belongs to
UserID param.Field[string] `json:"userId" format:"uuid"`
}
func (SecretScopeParam) MarshalJSON ¶ added in v0.5.0
func (r SecretScopeParam) MarshalJSON() (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
Use this method to:
- View all project secrets - View all user secrets
### Examples
- List project secrets:
Shows all secrets for a project.
```yaml
filter:
scope:
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
pagination:
pageSize: 20
```
- List user secrets:
Shows all secrets for a user.
```yaml
filter:
scope:
userId: "123e4567-e89b-12d3-a456-426614174000"
pagination:
pageSize: 20
```
func (*SecretService) ListAutoPaging ¶
func (r *SecretService) ListAutoPaging(ctx context.Context, params SecretListParams, opts ...option.RequestOption) *pagination.SecretsPageAutoPager[Secret]
Lists secrets
Use this method to:
- View all project secrets - View all user secrets
### Examples
- List project secrets:
Shows all secrets for a project.
```yaml
filter:
scope:
projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
pagination:
pageSize: 20
```
- List user secrets:
Shows all secrets for a user.
```yaml
filter:
scope:
userId: "123e4567-e89b-12d3-a456-426614174000"
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 SecurityAgentPolicy ¶ added in v0.7.0
type SecurityAgentPolicy struct {
// crowdstrike contains CrowdStrike Falcon configuration
Crowdstrike CrowdStrikeConfig `json:"crowdstrike"`
JSON securityAgentPolicyJSON `json:"-"`
}
SecurityAgentPolicy contains security agent configuration for an organization. When enabled, security agents are automatically deployed to all environments.
func (*SecurityAgentPolicy) UnmarshalJSON ¶ added in v0.7.0
func (r *SecurityAgentPolicy) UnmarshalJSON(data []byte) (err error)
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"`
// role specifies the intended role or purpose of the service.
Role ServiceRole `json:"role"`
// 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"`
// role specifies the intended role or purpose of the service.
Role param.Field[ServiceRole] `json:"role"`
// 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 ServiceRole ¶ added in v0.7.0
type ServiceRole string
const ( ServiceRoleUnspecified ServiceRole = "SERVICE_ROLE_UNSPECIFIED" ServiceRoleDefault ServiceRole = "SERVICE_ROLE_DEFAULT" ServiceRoleEditor ServiceRole = "SERVICE_ROLE_EDITOR" ServiceRoleAIAgent ServiceRole = "SERVICE_ROLE_AI_AGENT" ServiceRoleSecurityAgent ServiceRole = "SERVICE_ROLE_SECURITY_AGENT" )
func (ServiceRole) IsKnown ¶ added in v0.7.0
func (r ServiceRole) 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"`
// env specifies environment variables for the service.
Env []shared.EnvironmentVariableItem `json:"env"`
// 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"`
// env specifies environment variables for the service.
Env param.Field[[]shared.EnvironmentVariableItemParam] `json:"env"`
// 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"`
// output contains the output of the service. setting an output field to empty
// string will unset it.
Output map[string]string `json:"output"`
// 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 StackFrameParam ¶ added in v0.7.0
type StackFrameParam struct {
// Column number in the line
Colno param.Field[int64] `json:"colno"`
ContextLine param.Field[string] `json:"contextLine"`
// File name or path
Filename param.Field[string] `json:"filename"`
// Function name
Function param.Field[string] `json:"function"`
// Whether this frame is in application code (vs library/framework code)
InApp param.Field[bool] `json:"inApp"`
// Line number in the file
Lineno param.Field[int64] `json:"lineno"`
// Module or package name
Module param.Field[string] `json:"module"`
PostContext param.Field[[]string] `json:"postContext"`
// Source code context around the error line
PreContext param.Field[[]string] `json:"preContext"`
// Additional frame-specific variables/locals
Vars param.Field[map[string]string] `json:"vars"`
}
Stack trace frame information (Sentry-compatible)
func (StackFrameParam) MarshalJSON ¶ added in v0.7.0
func (r StackFrameParam) MarshalJSON() (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 UsageListEnvironmentRuntimeRecordsParams ¶ added in v0.5.0
type UsageListEnvironmentRuntimeRecordsParams struct {
Token param.Field[string] `query:"token"`
PageSize param.Field[int64] `query:"pageSize"`
// Filter options.
Filter param.Field[UsageListEnvironmentRuntimeRecordsParamsFilter] `json:"filter"`
// Pagination options.
Pagination param.Field[UsageListEnvironmentRuntimeRecordsParamsPagination] `json:"pagination"`
}
func (UsageListEnvironmentRuntimeRecordsParams) MarshalJSON ¶ added in v0.5.0
func (r UsageListEnvironmentRuntimeRecordsParams) MarshalJSON() (data []byte, err error)
func (UsageListEnvironmentRuntimeRecordsParams) URLQuery ¶ added in v0.5.0
func (r UsageListEnvironmentRuntimeRecordsParams) URLQuery() (v url.Values)
URLQuery serializes UsageListEnvironmentRuntimeRecordsParams's query parameters as `url.Values`.
type UsageListEnvironmentRuntimeRecordsParamsFilter ¶ added in v0.5.0
type UsageListEnvironmentRuntimeRecordsParamsFilter struct {
// Date range to query runtime records within.
DateRange param.Field[UsageListEnvironmentRuntimeRecordsParamsFilterDateRange] `json:"dateRange,required"`
// Optional project ID to filter runtime records by.
ProjectID param.Field[string] `json:"projectId"`
}
Filter options.
func (UsageListEnvironmentRuntimeRecordsParamsFilter) MarshalJSON ¶ added in v0.5.0
func (r UsageListEnvironmentRuntimeRecordsParamsFilter) MarshalJSON() (data []byte, err error)
type UsageListEnvironmentRuntimeRecordsParamsFilterDateRange ¶ added in v0.5.0
type UsageListEnvironmentRuntimeRecordsParamsFilterDateRange struct {
// End time of the date range (exclusive).
EndTime param.Field[time.Time] `json:"endTime,required" format:"date-time"`
// Start time of the date range (inclusive).
StartTime param.Field[time.Time] `json:"startTime,required" format:"date-time"`
}
Date range to query runtime records within.
func (UsageListEnvironmentRuntimeRecordsParamsFilterDateRange) MarshalJSON ¶ added in v0.5.0
func (r UsageListEnvironmentRuntimeRecordsParamsFilterDateRange) MarshalJSON() (data []byte, err error)
type UsageListEnvironmentRuntimeRecordsParamsPagination ¶ added in v0.5.0
type UsageListEnvironmentRuntimeRecordsParamsPagination 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 options.
func (UsageListEnvironmentRuntimeRecordsParamsPagination) MarshalJSON ¶ added in v0.5.0
func (r UsageListEnvironmentRuntimeRecordsParamsPagination) MarshalJSON() (data []byte, err error)
type UsageService ¶ added in v0.5.0
type UsageService struct {
Options []option.RequestOption
}
UsageService 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 NewUsageService method instead.
func NewUsageService ¶ added in v0.5.0
func NewUsageService(opts ...option.RequestOption) (r *UsageService)
NewUsageService 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 (*UsageService) ListEnvironmentRuntimeRecords ¶ added in v0.5.0
func (r *UsageService) ListEnvironmentRuntimeRecords(ctx context.Context, params UsageListEnvironmentRuntimeRecordsParams, opts ...option.RequestOption) (res *pagination.RecordsPage[EnvironmentUsageRecord], err error)
Lists completed environment runtime records within a specified date range.
Returns a list of environment runtime records that were completed within the specified date range. Records of currently running environments are not included.
Use this method to:
- View environment runtime records - Filter by project - Create custom usage reports
### Example
```yaml filter:
projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" dateRange: startTime: "2024-01-01T00:00:00Z" endTime: "2024-01-02T00:00:00Z"
pagination:
pageSize: 100
```
func (*UsageService) ListEnvironmentRuntimeRecordsAutoPaging ¶ added in v0.5.0
func (r *UsageService) ListEnvironmentRuntimeRecordsAutoPaging(ctx context.Context, params UsageListEnvironmentRuntimeRecordsParams, opts ...option.RequestOption) *pagination.RecordsPageAutoPager[EnvironmentUsageRecord]
Lists completed environment runtime records within a specified date range.
Returns a list of environment runtime records that were completed within the specified date range. Records of currently running environments are not included.
Use this method to:
- View environment runtime records - Filter by project - Create custom usage reports
### Example
```yaml filter:
projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" dateRange: startTime: "2024-01-01T00:00:00Z" endTime: "2024-01-02T00:00:00Z"
pagination:
pageSize: 100
```
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"`
// email is the user's email address
Email string `json:"email"`
// 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 UserDeleteUserParams ¶ added in v0.7.0
func (UserDeleteUserParams) MarshalJSON ¶ added in v0.7.0
func (r UserDeleteUserParams) MarshalJSON() (data []byte, err error)
type UserDeleteUserResponse ¶ added in v0.7.0
type UserDeleteUserResponse = interface{}
type UserDotfileGetParams ¶ added in v0.5.0
func (UserDotfileGetParams) MarshalJSON ¶ added in v0.5.0
func (r UserDotfileGetParams) MarshalJSON() (data []byte, err error)
type UserDotfileGetResponse ¶ added in v0.5.0
type UserDotfileGetResponse struct {
DotfilesConfiguration DotfilesConfiguration `json:"dotfilesConfiguration,required"`
JSON userDotfileGetResponseJSON `json:"-"`
}
func (*UserDotfileGetResponse) UnmarshalJSON ¶ added in v0.5.0
func (r *UserDotfileGetResponse) UnmarshalJSON(data []byte) (err error)
type UserDotfileService ¶ added in v0.5.0
type UserDotfileService struct {
Options []option.RequestOption
}
UserDotfileService 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 NewUserDotfileService method instead.
func NewUserDotfileService ¶ added in v0.5.0
func NewUserDotfileService(opts ...option.RequestOption) (r *UserDotfileService)
NewUserDotfileService 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 (*UserDotfileService) Get ¶ added in v0.5.0
func (r *UserDotfileService) Get(ctx context.Context, body UserDotfileGetParams, opts ...option.RequestOption) (res *UserDotfileGetResponse, err error)
Gets the dotfiles for a user.
Use this method to:
- Retrieve user dotfiles
### Examples
- Get dotfiles:
Retrieves the dotfiles for the current user.
```yaml
{}
```
func (*UserDotfileService) Set ¶ added in v0.5.0
func (r *UserDotfileService) Set(ctx context.Context, body UserDotfileSetParams, opts ...option.RequestOption) (res *UserDotfileSetResponse, err error)
Sets the dotfiles configuration for a user.
Use this method to:
- Configure user dotfiles - Update dotfiles settings
### Examples
- Set dotfiles configuration:
Sets the dotfiles configuration for the current user.
```yaml
{ "repository": "https://github.com/gitpod-io/dotfiles" }
```
- Remove dotfiles:
Removes the dotfiles for the current user.
```yaml
{}
```
type UserDotfileSetParams ¶ added in v0.5.0
type UserDotfileSetParams struct {
Repository param.Field[string] `json:"repository" format:"uri"`
}
func (UserDotfileSetParams) MarshalJSON ¶ added in v0.5.0
func (r UserDotfileSetParams) MarshalJSON() (data []byte, err error)
type UserDotfileSetResponse ¶ added in v0.5.0
type UserDotfileSetResponse = interface{}
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 UserGetUserParams ¶ added in v0.7.0
func (UserGetUserParams) MarshalJSON ¶ added in v0.7.0
func (r UserGetUserParams) MarshalJSON() (data []byte, err error)
type UserGetUserResponse ¶ added in v0.7.0
type UserGetUserResponse struct {
User User `json:"user,required"`
JSON userGetUserResponseJSON `json:"-"`
}
func (*UserGetUserResponse) UnmarshalJSON ¶ added in v0.7.0
func (r *UserGetUserResponse) UnmarshalJSON(data []byte) (err error)
type UserInputBlockParam ¶ added in v0.7.0
type UserInputBlockParam struct {
Text param.Field[UserInputBlockTextParam] `json:"text,required"`
ID param.Field[string] `json:"id"`
// Timestamp when this block was created. Used for debugging and support bundles.
CreatedAt param.Field[time.Time] `json:"createdAt" format:"date-time"`
}
func (UserInputBlockParam) MarshalJSON ¶ added in v0.7.0
func (r UserInputBlockParam) MarshalJSON() (data []byte, err error)
type UserInputBlockTextParam ¶ added in v0.7.0
func (UserInputBlockTextParam) MarshalJSON ¶ added in v0.7.0
func (r UserInputBlockTextParam) MarshalJSON() (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
Dotfiles *UserDotfileService
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) DeleteUser ¶ added in v0.7.0
func (r *UserService) DeleteUser(ctx context.Context, body UserDeleteUserParams, opts ...option.RequestOption) (res *UserDeleteUserResponse, err error)
Deletes a user. If the User comes from an organization's SSO provider, the Account will also be deleted.
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) GetUser ¶ added in v0.7.0
func (r *UserService) GetUser(ctx context.Context, body UserGetUserParams, opts ...option.RequestOption) (res *UserGetUserResponse, err error)
Gets basic information about a specific user by their ID.
Use this method to:
- Retrieve user profile information - Get user details for display purposes - Fetch user metadata for administrative tasks
### Examples
- Get user by ID:
Retrieves basic user information by user ID. ```yaml userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" ```
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
- agent.go
- aliases.go
- client.go
- editor.go
- environment.go
- environmentautomation.go
- environmentautomationservice.go
- environmentautomationtask.go
- environmentautomationtaskexecution.go
- environmentclass.go
- error.go
- event.go
- field.go
- gateway.go
- group.go
- groupmembership.go
- grouproleassignment.go
- identity.go
- organization.go
- organizationcustomdomain.go
- organizationdomainverification.go
- organizationinvite.go
- organizationpolicy.go
- organizationssoconfiguration.go
- prebuild.go
- project.go
- projectenvironmentclase.go
- projectpolicy.go
- runner.go
- runnerconfiguration.go
- runnerconfigurationenvironmentclass.go
- runnerconfigurationhostauthenticationtoken.go
- runnerconfigurationschema.go
- runnerconfigurationscmintegration.go
- runnerpolicy.go
- secret.go
- usage.go
- user.go
- userdotfile.go
- userpat.go