Documentation
¶
Index ¶
- type AutomationTrigger
- type AutomationTriggerParam
- type EnvironmentClass
- type EnvironmentClassParam
- type ErrorCode
- type FieldValue
- type FieldValueParam
- type Gateway
- type OrganizationRole
- type Principal
- type RunsOn
- type RunsOnDocker
- type RunsOnDockerParam
- type RunsOnParam
- 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 UserStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutomationTrigger ¶
type AutomationTrigger struct { Manual bool `json:"manual"` PostDevcontainerStart bool `json:"postDevcontainerStart"` PostEnvironmentStart bool `json:"postEnvironmentStart"` JSON automationTriggerJSON `json:"-"` }
An AutomationTrigger represents a trigger for an automation action. The `post_environment_start` field indicates that the automation should be triggered after the environment has started. The `post_devcontainer_start` field indicates that the automation should be triggered after the dev container has started.
func (*AutomationTrigger) UnmarshalJSON ¶
func (r *AutomationTrigger) UnmarshalJSON(data []byte) (err error)
type AutomationTriggerParam ¶
type AutomationTriggerParam struct { Manual param.Field[bool] `json:"manual"` PostDevcontainerStart param.Field[bool] `json:"postDevcontainerStart"` PostEnvironmentStart param.Field[bool] `json:"postEnvironmentStart"` }
An AutomationTrigger represents a trigger for an automation action. The `post_environment_start` field indicates that the automation should be triggered after the environment has started. The `post_devcontainer_start` field indicates that the automation should be triggered after the dev container has started.
func (AutomationTriggerParam) MarshalJSON ¶
func (r AutomationTriggerParam) MarshalJSON() (data []byte, err error)
type EnvironmentClass ¶
type EnvironmentClass struct { // id is the unique identifier of the environment class ID string `json:"id,required"` // runner_id is the unique identifier of the runner the environment class belongs // to RunnerID string `json:"runnerId,required"` // configuration describes the configuration of the environment class Configuration []FieldValue `json:"configuration"` // description is a human readable description of the environment class Description string `json:"description"` // display_name is the human readable name of the environment class DisplayName string `json:"displayName"` // enabled indicates whether the environment class can be used to create new // environments. Enabled bool `json:"enabled"` JSON environmentClassJSON `json:"-"` }
func (*EnvironmentClass) UnmarshalJSON ¶
func (r *EnvironmentClass) UnmarshalJSON(data []byte) (err error)
type EnvironmentClassParam ¶
type EnvironmentClassParam struct { // id is the unique identifier of the environment class ID param.Field[string] `json:"id,required"` // runner_id is the unique identifier of the runner the environment class belongs // to RunnerID param.Field[string] `json:"runnerId,required"` // configuration describes the configuration of the environment class Configuration param.Field[[]FieldValueParam] `json:"configuration"` // description is a human readable description of the environment class Description param.Field[string] `json:"description"` // display_name is the human readable name of the environment class DisplayName param.Field[string] `json:"displayName"` // enabled indicates whether the environment class can be used to create new // environments. Enabled param.Field[bool] `json:"enabled"` }
func (EnvironmentClassParam) MarshalJSON ¶
func (r EnvironmentClassParam) MarshalJSON() (data []byte, err error)
type ErrorCode ¶ added in v0.3.2
type ErrorCode string
const ( ErrorCodeCanceled ErrorCode = "canceled" ErrorCodeUnknown ErrorCode = "unknown" ErrorCodeInvalidArgument ErrorCode = "invalid_argument" ErrorCodeDeadlineExceeded ErrorCode = "deadline_exceeded" ErrorCodeNotFound ErrorCode = "not_found" ErrorCodeAlreadyExists ErrorCode = "already_exists" ErrorCodePermissionDenied ErrorCode = "permission_denied" ErrorCodeResourceExhausted ErrorCode = "resource_exhausted" ErrorCodeFailedPrecondition ErrorCode = "failed_precondition" ErrorCodeAborted ErrorCode = "aborted" ErrorCodeOutOfRange ErrorCode = "out_of_range" ErrorCodeUnimplemented ErrorCode = "unimplemented" ErrorCodeInternal ErrorCode = "internal" ErrorCodeDataLoss ErrorCode = "data_loss" ErrorCodeUnauthenticated ErrorCode = "unauthenticated" )
type FieldValue ¶
type FieldValue struct { Key string `json:"key"` Value string `json:"value"` JSON fieldValueJSON `json:"-"` }
func (*FieldValue) UnmarshalJSON ¶
func (r *FieldValue) UnmarshalJSON(data []byte) (err error)
type FieldValueParam ¶
type FieldValueParam struct { Key param.Field[string] `json:"key"` Value param.Field[string] `json:"value"` }
func (FieldValueParam) MarshalJSON ¶
func (r FieldValueParam) MarshalJSON() (data []byte, err error)
type Gateway ¶ added in v0.5.0
type Gateway struct { // name is the human-readable name of the gateway. name is unique across all // gateways. Name string `json:"name,required"` // url of the gateway URL string `json:"url,required"` // region is the geographical region where the gateway is located Region string `json:"region"` JSON gatewayJSON `json:"-"` }
Gateway represents a system gateway that provides access to services
func (*Gateway) UnmarshalJSON ¶ added in v0.5.0
type OrganizationRole ¶
type OrganizationRole string
const ( OrganizationRoleUnspecified OrganizationRole = "ORGANIZATION_ROLE_UNSPECIFIED" OrganizationRoleAdmin OrganizationRole = "ORGANIZATION_ROLE_ADMIN" OrganizationRoleMember OrganizationRole = "ORGANIZATION_ROLE_MEMBER" )
func (OrganizationRole) IsKnown ¶
func (r OrganizationRole) IsKnown() bool
type Principal ¶
type Principal string
const ( PrincipalUnspecified Principal = "PRINCIPAL_UNSPECIFIED" PrincipalAccount Principal = "PRINCIPAL_ACCOUNT" PrincipalUser Principal = "PRINCIPAL_USER" PrincipalRunner Principal = "PRINCIPAL_RUNNER" PrincipalEnvironment Principal = "PRINCIPAL_ENVIRONMENT" PrincipalServiceAccount Principal = "PRINCIPAL_SERVICE_ACCOUNT" PrincipalRunnerManager Principal = "PRINCIPAL_RUNNER_MANAGER" )
type RunsOn ¶
type RunsOn struct { Docker RunsOnDocker `json:"docker,required"` JSON runsOnJSON `json:"-"` }
func (*RunsOn) UnmarshalJSON ¶
type RunsOnDocker ¶
type RunsOnDocker struct { Environment []string `json:"environment"` Image string `json:"image"` JSON runsOnDockerJSON `json:"-"` }
func (*RunsOnDocker) UnmarshalJSON ¶
func (r *RunsOnDocker) UnmarshalJSON(data []byte) (err error)
type RunsOnDockerParam ¶
type RunsOnDockerParam struct { Environment param.Field[[]string] `json:"environment"` Image param.Field[string] `json:"image"` }
func (RunsOnDockerParam) MarshalJSON ¶
func (r RunsOnDockerParam) MarshalJSON() (data []byte, err error)
type RunsOnParam ¶
type RunsOnParam struct {
Docker param.Field[RunsOnDockerParam] `json:"docker,required"`
}
func (RunsOnParam) MarshalJSON ¶
func (r RunsOnParam) MarshalJSON() (data []byte, err error)
type Subject ¶
type Subject struct { // id is the UUID of the subject ID string `json:"id"` // Principal is the principal of the subject Principal Principal `json:"principal"` JSON subjectJSON `json:"-"` }
func (*Subject) UnmarshalJSON ¶
type SubjectParam ¶
type SubjectParam struct { // id is the UUID of the subject ID param.Field[string] `json:"id"` // Principal is the principal of the subject Principal param.Field[Principal] `json:"principal"` }
func (SubjectParam) MarshalJSON ¶
func (r SubjectParam) MarshalJSON() (data []byte, err error)
type Task ¶
type Task struct { ID string `json:"id,required" format:"uuid"` // dependencies specifies the IDs of the automations this task depends on. DependsOn []string `json:"dependsOn" format:"uuid"` EnvironmentID string `json:"environmentId" format:"uuid"` Metadata TaskMetadata `json:"metadata"` Spec TaskSpec `json:"spec"` JSON taskJSON `json:"-"` }
func (*Task) UnmarshalJSON ¶
type TaskExecution ¶
type TaskExecution struct { ID string `json:"id,required" format:"uuid"` Metadata TaskExecutionMetadata `json:"metadata"` Spec TaskExecutionSpec `json:"spec"` Status TaskExecutionStatus `json:"status"` JSON taskExecutionJSON `json:"-"` }
func (*TaskExecution) UnmarshalJSON ¶
func (r *TaskExecution) UnmarshalJSON(data []byte) (err error)
type TaskExecutionMetadata ¶
type TaskExecutionMetadata struct { // completed_at is the time the task execution was done. CompletedAt time.Time `json:"completedAt" format:"date-time"` // created_at is the time the task was created. CreatedAt time.Time `json:"createdAt" format:"date-time"` // creator describes the principal who created/started the task run. Creator Subject `json:"creator"` // environment_id is the ID of the environment in which the task run is executed. EnvironmentID string `json:"environmentId" format:"uuid"` // started_at is the time the task execution actually started to run. StartedAt time.Time `json:"startedAt" format:"date-time"` // started_by describes the trigger that started the task execution. StartedBy string `json:"startedBy"` // task_id is the ID of the main task being executed. TaskID string `json:"taskId" format:"uuid"` JSON taskExecutionMetadataJSON `json:"-"` }
func (*TaskExecutionMetadata) UnmarshalJSON ¶
func (r *TaskExecutionMetadata) UnmarshalJSON(data []byte) (err error)
type TaskExecutionPhase ¶
type TaskExecutionPhase string
const ( TaskExecutionPhaseUnspecified TaskExecutionPhase = "TASK_EXECUTION_PHASE_UNSPECIFIED" TaskExecutionPhasePending TaskExecutionPhase = "TASK_EXECUTION_PHASE_PENDING" TaskExecutionPhaseRunning TaskExecutionPhase = "TASK_EXECUTION_PHASE_RUNNING" TaskExecutionPhaseSucceeded TaskExecutionPhase = "TASK_EXECUTION_PHASE_SUCCEEDED" TaskExecutionPhaseFailed TaskExecutionPhase = "TASK_EXECUTION_PHASE_FAILED" TaskExecutionPhaseStopped TaskExecutionPhase = "TASK_EXECUTION_PHASE_STOPPED" )
func (TaskExecutionPhase) IsKnown ¶
func (r TaskExecutionPhase) IsKnown() bool
type TaskExecutionSpec ¶
type TaskExecutionSpec struct { // desired_phase is the phase the task execution should be in. Used to stop a // running task execution early. DesiredPhase TaskExecutionPhase `json:"desiredPhase"` // plan is a list of groups of steps. The steps in a group are executed // concurrently, while the groups are executed sequentially. The order of the // groups is the order in which they are executed. Plan []TaskExecutionSpecPlan `json:"plan"` JSON taskExecutionSpecJSON `json:"-"` }
func (*TaskExecutionSpec) UnmarshalJSON ¶
func (r *TaskExecutionSpec) UnmarshalJSON(data []byte) (err error)
type TaskExecutionSpecPlan ¶
type TaskExecutionSpecPlan struct { Steps []TaskExecutionSpecPlanStep `json:"steps"` JSON taskExecutionSpecPlanJSON `json:"-"` }
func (*TaskExecutionSpecPlan) UnmarshalJSON ¶
func (r *TaskExecutionSpecPlan) UnmarshalJSON(data []byte) (err error)
type TaskExecutionSpecPlanStep ¶
type TaskExecutionSpecPlanStep struct { // ID is the ID of the execution step ID string `json:"id" format:"uuid"` DependsOn []string `json:"dependsOn"` Label string `json:"label"` ServiceID string `json:"serviceId" format:"uuid"` Task TaskExecutionSpecPlanStepsTask `json:"task"` JSON taskExecutionSpecPlanStepJSON `json:"-"` }
func (*TaskExecutionSpecPlanStep) UnmarshalJSON ¶
func (r *TaskExecutionSpecPlanStep) UnmarshalJSON(data []byte) (err error)
type TaskExecutionSpecPlanStepsTask ¶
type TaskExecutionSpecPlanStepsTask struct { ID string `json:"id" format:"uuid"` Spec TaskSpec `json:"spec"` JSON taskExecutionSpecPlanStepsTaskJSON `json:"-"` }
func (*TaskExecutionSpecPlanStepsTask) UnmarshalJSON ¶
func (r *TaskExecutionSpecPlanStepsTask) UnmarshalJSON(data []byte) (err error)
type TaskExecutionStatus ¶
type TaskExecutionStatus struct { // failure_message summarises why the task execution failed to operate. If this is // non-empty the task execution has failed to operate and will likely transition to // a failed state. FailureMessage string `json:"failureMessage"` // log_url is the URL to the logs of the task's steps. If this is empty, the task // either has no logs or has not yet started. LogURL string `json:"logUrl"` // the phase of a task execution represents the aggregated phase of all steps. Phase TaskExecutionPhase `json:"phase"` // version of the status update. Task executions 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"` // steps provides the status for each individual step of the task execution. If a // step is missing it has not yet started. Steps []TaskExecutionStatusStep `json:"steps"` JSON taskExecutionStatusJSON `json:"-"` }
func (*TaskExecutionStatus) UnmarshalJSON ¶
func (r *TaskExecutionStatus) UnmarshalJSON(data []byte) (err error)
type TaskExecutionStatusStep ¶
type TaskExecutionStatusStep struct { // ID is the ID of the execution step ID string `json:"id" format:"uuid"` // failure_message summarises why the step failed to operate. If this is non-empty // the step has failed to operate and will likely transition to a failed state. FailureMessage string `json:"failureMessage"` // output contains the output of the task execution. setting an output field to // empty string will unset it. Output map[string]string `json:"output"` // phase is the current phase of the execution step Phase TaskExecutionPhase `json:"phase"` JSON taskExecutionStatusStepJSON `json:"-"` }
func (*TaskExecutionStatusStep) UnmarshalJSON ¶
func (r *TaskExecutionStatusStep) UnmarshalJSON(data []byte) (err error)
type TaskMetadata ¶
type TaskMetadata struct { // created_at is the time the task was created. CreatedAt time.Time `json:"createdAt" format:"date-time"` // creator describes the principal who created the task. Creator Subject `json:"creator"` // description is a user-facing description for the task. It can be used to provide // context and documentation for the task. Description string `json:"description"` // name is a user-facing name for the task. Unlike the reference, this field is not // unique, and not referenced by the system. This is a short descriptive name for // the task. Name string `json:"name"` // reference is a user-facing identifier for the task which must be unique on the // environment. It is used to express dependencies between tasks, and to identify // the task in user interactions (e.g. the CLI). Reference string `json:"reference"` // triggered_by is a list of trigger that start the task. TriggeredBy []AutomationTrigger `json:"triggeredBy"` JSON taskMetadataJSON `json:"-"` }
func (*TaskMetadata) UnmarshalJSON ¶
func (r *TaskMetadata) UnmarshalJSON(data []byte) (err error)
type TaskMetadataParam ¶
type TaskMetadataParam struct { // created_at is the time the task was created. CreatedAt param.Field[time.Time] `json:"createdAt" format:"date-time"` // creator describes the principal who created the task. Creator param.Field[SubjectParam] `json:"creator"` // description is a user-facing description for the task. It can be used to provide // context and documentation for the task. Description param.Field[string] `json:"description"` // name is a user-facing name for the task. Unlike the reference, this field is not // unique, and not referenced by the system. This is a short descriptive name for // the task. Name param.Field[string] `json:"name"` // reference is a user-facing identifier for the task which must be unique on the // environment. It is used to express dependencies between tasks, and to identify // the task in user interactions (e.g. the CLI). Reference param.Field[string] `json:"reference"` // triggered_by is a list of trigger that start the task. TriggeredBy param.Field[[]AutomationTriggerParam] `json:"triggeredBy"` }
func (TaskMetadataParam) MarshalJSON ¶
func (r TaskMetadataParam) MarshalJSON() (data []byte, err error)
type TaskSpec ¶
type TaskSpec struct { // command contains the command the task should execute Command string `json:"command"` // runs_on specifies the environment the task should run on. RunsOn RunsOn `json:"runsOn"` JSON taskSpecJSON `json:"-"` }
func (*TaskSpec) UnmarshalJSON ¶
type TaskSpecParam ¶
type TaskSpecParam struct { // command contains the command the task should execute Command param.Field[string] `json:"command"` // runs_on specifies the environment the task should run on. RunsOn param.Field[RunsOnParam] `json:"runsOn"` }
func (TaskSpecParam) MarshalJSON ¶
func (r TaskSpecParam) MarshalJSON() (data []byte, err error)
type UserStatus ¶
type UserStatus string
const ( UserStatusUnspecified UserStatus = "USER_STATUS_UNSPECIFIED" UserStatusActive UserStatus = "USER_STATUS_ACTIVE" UserStatusSuspended UserStatus = "USER_STATUS_SUSPENDED" UserStatusLeft UserStatus = "USER_STATUS_LEFT" )
func (UserStatus) IsKnown ¶
func (r UserStatus) IsKnown() bool