Documentation
¶
Overview ¶
Package models defines Phobos resources and their properties as structs.
Index ¶
- Constants
- Variables
- func GetAssignablePermissions() []string
- type Action
- type ActivityEvent
- type ActivityEventAction
- type ActivityEventApprovePipelineNodePayload
- type ActivityEventCreateMembershipPayload
- type ActivityEventDeferPipelineNodePayload
- type ActivityEventDeleteResourcePayload
- type ActivityEventRemoveMembershipPayload
- type ActivityEventRetryPipelineNodePayload
- type ActivityEventRevokeApprovalPipelineNodePayload
- type ActivityEventSchedulePipelineNodePayload
- type ActivityEventStartPipelineNodePayload
- type ActivityEventTargetType
- type ActivityEventUndeferPipelineNodePayload
- type ActivityEventUnschedulePipelineNodePayload
- type ActivityEventUpdateMembershipPayload
- type ActivityEventUpdatePipelineNodePayload
- type ActivityEventUpdateReleasePayload
- type ActivityEventUpdateTeamPayload
- type Agent
- type AgentSession
- type AgentType
- type Announcement
- func (a *Announcement) GetGlobalID() string
- func (a *Announcement) GetID() string
- func (a *Announcement) GetModelType() types.ModelType
- func (a *Announcement) IsActive() bool
- func (a *Announcement) IsExpired() bool
- func (a *Announcement) ResolveMetadata(key string) (*string, error)
- func (a *Announcement) Validate() error
- type AnnouncementType
- type ApprovalRule
- type AsymSigningKey
- type AsymSigningKeyStatus
- type BoundClaimsType
- type Comment
- type CronSchedule
- type DefaultRoleID
- type Environment
- type EnvironmentRule
- type Job
- func (j *Job) ForceCancel(canceledBy string) error
- func (j *Job) GetForceCancelAvailableAt() time.Time
- func (j *Job) GetGlobalID() string
- func (j *Job) GetID() string
- func (j *Job) GetModelType() types.ModelType
- func (j *Job) GetOrgName() string
- func (j *Job) GetProjectName() string
- func (j *Job) GetStatus() JobStatus
- func (j *Job) GracefullyCancel() error
- func (j *Job) ResolveMetadata(key string) (*string, error)
- func (j *Job) SetStatus(status JobStatus) error
- func (j *Job) Validate() error
- type JobStatus
- type JobTaskData
- type JobTimestamps
- type JobType
- type LifecycleTemplate
- type LifecycleTemplateStatus
- type LogStream
- type MaintenanceMode
- type Membership
- type Metric
- type MetricName
- type MetricTagName
- type Model
- type NestedPipeline
- type OIDCTrustPolicy
- type Organization
- type Permission
- type Pipeline
- func (p *Pipeline) BuildStateMachine() *statemachine.StateMachine
- func (p *Pipeline) CancelNode(nodePath string, force bool) ([]statemachine.NodeStatusChange, error)
- func (p *Pipeline) GetAction(path string) (*PipelineAction, bool)
- func (p *Pipeline) GetGlobalID() string
- func (p *Pipeline) GetID() string
- func (p *Pipeline) GetModelType() types.ModelType
- func (p *Pipeline) GetNestedPipeline(path string) (*NestedPipeline, bool)
- func (p *Pipeline) GetOrgName() string
- func (p *Pipeline) GetProjectName() string
- func (p *Pipeline) GetStage(path string) (*PipelineStage, bool)
- func (p *Pipeline) GetTask(path string) (*PipelineTask, bool)
- func (p *Pipeline) ResolveMetadata(key string) (*string, error)
- func (p *Pipeline) SetNodeStatus(nodePath string, status statemachine.NodeStatus) ([]statemachine.NodeStatusChange, error)
- func (p *Pipeline) SetStatus(status statemachine.NodeStatus) ([]statemachine.NodeStatusChange, error)
- func (p *Pipeline) Validate() error
- type PipelineAction
- type PipelineActionOutput
- type PipelineAnnotation
- type PipelineApproval
- type PipelineApprovalStatus
- type PipelineApprovalType
- type PipelineStage
- type PipelineTask
- type PipelineTaskWhenCondition
- type PipelineTemplate
- type PipelineTemplateStatus
- type PipelineTimestamps
- type PipelineType
- type PipelineWhenCondition
- type Plugin
- type PluginPlatform
- type PluginVersion
- type PluginVersionDocCategory
- type PluginVersionDocFileMetadata
- type Project
- func (p *Project) EvaluatePipelineTokenSubClaimExpression(pipelineType PipelineType, pipelineID string, environmentName string) (string, error)
- func (p *Project) GetGlobalID() string
- func (p *Project) GetID() string
- func (p *Project) GetModelType() types.ModelType
- func (p *Project) GetOrgName() string
- func (p *Project) ResolveMetadata(key string) (*string, error)
- func (p *Project) Validate() error
- type ProjectVariable
- func (pv *ProjectVariable) FQN() string
- func (pv *ProjectVariable) GetGlobalID() string
- func (pv *ProjectVariable) GetID() string
- func (pv *ProjectVariable) GetModelType() types.ModelType
- func (pv *ProjectVariable) ResolveMetadata(key string) (*string, error)
- func (pv *ProjectVariable) Validate() error
- type ProjectVariableSet
- type Release
- type ReleaseLifecycle
- func (r *ReleaseLifecycle) GetGlobalID() string
- func (r *ReleaseLifecycle) GetID() string
- func (r *ReleaseLifecycle) GetModelType() types.ModelType
- func (r *ReleaseLifecycle) GetOrgName() string
- func (r *ReleaseLifecycle) ResolveMetadata(key string) (*string, error)
- func (r *ReleaseLifecycle) Validate() error
- type ResourceLimit
- type ResourceMetadata
- type Role
- type SCIMToken
- type ScopeType
- type ServiceAccount
- type Team
- type TeamMember
- type Thread
- type ToDoItem
- type ToDoItemPipelineTaskApprovalPayload
- type ToDoItemTargetType
- type User
- type VCSProvider
- type VCSProviderAuthType
- type VCSProviderType
- type VariableCategory
Constants ¶
const ( // DefaultMaxJobDuration is the default max job duration DefaultMaxJobDuration = time.Hour * 12 // MaxAllowedJobDuration is the max allowed job duration MaxAllowedJobDuration = time.Hour * 24 )
const ( AddParticipantReleaseChangeType = "ADD_PARTICIPANT" RemoveParticipantReleaseChangeType = "REMOVE_PARTICIPANT" )
ReleaseChangeType constants
const AgentSessionHeartbeatInterval = time.Minute
AgentSessionHeartbeatInterval is the interval that agents should send heartbeats
const ( // DefaultPipelineTokenSubClaimExpression is the default hcl expression for setting the sub claim // in a pipeline JWT DefaultPipelineTokenSubClaimExpression = "${project_prn}" )
const (
// MaxPluginVersionDocFiles is the maximum number of documentation files allowed for a plugin version.
MaxPluginVersionDocFiles = 100
)
const ProjectVariableEnvironmentScopeAll = "*"
ProjectVariableEnvironmentScopeAll is the environment scope for all environments
Variables ¶
var ( ViewOrganization = Permission{ResourceType: types.OrganizationModelType.Name(), Action: ViewAction} ViewMembership = Permission{ResourceType: types.MembershipModelType.Name(), Action: ViewAction} CreateMembership = Permission{ResourceType: types.MembershipModelType.Name(), Action: CreateAction} UpdateMembership = Permission{ResourceType: types.MembershipModelType.Name(), Action: UpdateAction} DeleteMembership = Permission{ResourceType: types.MembershipModelType.Name(), Action: DeleteAction} ViewProject = Permission{ResourceType: types.ProjectModelType.Name(), Action: ViewAction} CreateProject = Permission{ResourceType: types.ProjectModelType.Name(), Action: CreateAction} UpdateProject = Permission{ResourceType: types.ProjectModelType.Name(), Action: UpdateAction} UpdateProjectVariables = Permission{ResourceType: types.ProjectVariableSetModelType.Name(), Action: CreateAction} DeleteProject = Permission{ResourceType: types.ProjectModelType.Name(), Action: DeleteAction} ViewJob = Permission{ResourceType: types.JobModelType.Name(), Action: ViewAction} ClaimJob = Permission{ResourceType: types.JobModelType.Name(), Action: ClaimAction} UpdateJobState = Permission{ResourceType: types.JobModelType.Name(), Action: UpdateAction} CreateTeam = Permission{ResourceType: types.TeamModelType.Name(), Action: CreateAction} UpdateTeam = Permission{ResourceType: types.TeamModelType.Name(), Action: UpdateAction} DeleteTeam = Permission{ResourceType: types.TeamModelType.Name(), Action: DeleteAction} CreateUser = Permission{ResourceType: types.UserModelType.Name(), Action: CreateAction} UpdateUser = Permission{ResourceType: types.UserModelType.Name(), Action: UpdateAction} DeleteUser = Permission{ResourceType: types.UserModelType.Name(), Action: DeleteAction} ViewPipelineTemplate = Permission{ResourceType: types.PipelineTemplateModelType.Name(), Action: ViewAction} CreatePipelineTemplate = Permission{ResourceType: types.PipelineTemplateModelType.Name(), Action: CreateAction} DeletePipelineTemplate = Permission{ResourceType: types.PipelineTemplateModelType.Name(), Action: DeleteAction} UpdatePipelineTemplate = Permission{ResourceType: types.PipelineTemplateModelType.Name(), Action: UpdateAction} ViewPipeline = Permission{ResourceType: types.PipelineModelType.Name(), Action: ViewAction} ExecutePipeline = Permission{ResourceType: types.PipelineModelType.Name(), Action: ExecuteAction} UpdatePipelineState = Permission{ResourceType: types.PipelineModelType.Name(), Action: UpdateAction} // Special non-assignable permission. CancelPipeline = Permission{ResourceType: types.PipelineModelType.Name(), Action: CancelAction} // Cancelling a pipeline also allows cancelling jobs. ViewAgent = Permission{ResourceType: types.AgentModelType.Name(), Action: ViewAction} CreateAgent = Permission{ResourceType: types.AgentModelType.Name(), Action: CreateAction} UpdateAgent = Permission{ResourceType: types.AgentModelType.Name(), Action: UpdateAction} DeleteAgent = Permission{ResourceType: types.AgentModelType.Name(), Action: DeleteAction} CreateAgentSession = Permission{ResourceType: types.AgentSessionModelType.Name(), Action: CreateAction} UpdateAgentSession = Permission{ResourceType: types.AgentSessionModelType.Name(), Action: UpdateAction} ViewEnvironment = Permission{ResourceType: types.EnvironmentModelType.Name(), Action: ViewAction} CreateEnvironment = Permission{ResourceType: types.EnvironmentModelType.Name(), Action: CreateAction} UpdateEnvironment = Permission{ResourceType: types.EnvironmentModelType.Name(), Action: UpdateAction} DeleteEnvironment = Permission{ResourceType: types.EnvironmentModelType.Name(), Action: DeleteAction} ViewServiceAccount = Permission{ResourceType: types.ServiceAccountModelType.Name(), Action: ViewAction} CreateServiceAccount = Permission{ResourceType: types.ServiceAccountModelType.Name(), Action: CreateAction} UpdateServiceAccount = Permission{ResourceType: types.ServiceAccountModelType.Name(), Action: UpdateAction} DeleteServiceAccount = Permission{ResourceType: types.ServiceAccountModelType.Name(), Action: DeleteAction} ViewApprovalRule = Permission{ResourceType: types.ApprovalRuleModelType.Name(), Action: ViewAction} CreateApprovalRule = Permission{ResourceType: types.ApprovalRuleModelType.Name(), Action: CreateAction} UpdateApprovalRule = Permission{ResourceType: types.ApprovalRuleModelType.Name(), Action: UpdateAction} DeleteApprovalRule = Permission{ResourceType: types.ApprovalRuleModelType.Name(), Action: DeleteAction} ViewLifecycleTemplate = Permission{ResourceType: types.LifecycleTemplateModelType.Name(), Action: ViewAction} CreateLifecycleTemplate = Permission{ResourceType: types.LifecycleTemplateModelType.Name(), Action: CreateAction} ViewReleaseLifecycle = Permission{ResourceType: types.ReleaseLifecycleModelType.Name(), Action: ViewAction} CreateReleaseLifecycle = Permission{ResourceType: types.ReleaseLifecycleModelType.Name(), Action: CreateAction} UpdateReleaseLifecycle = Permission{ResourceType: types.ReleaseLifecycleModelType.Name(), Action: UpdateAction} DeleteReleaseLifecycle = Permission{ResourceType: types.ReleaseLifecycleModelType.Name(), Action: DeleteAction} ViewRelease = Permission{ResourceType: types.ReleaseModelType.Name(), Action: ViewAction} CreateRelease = Permission{ResourceType: types.ReleaseModelType.Name(), Action: CreateAction} UpdateRelease = Permission{ResourceType: types.ReleaseModelType.Name(), Action: UpdateAction} DeleteRelease = Permission{ResourceType: types.ReleaseModelType.Name(), Action: DeleteAction} ViewProjectVariable = Permission{ResourceType: types.ProjectVariableModelType.Name(), Action: ViewAction} ViewPlugin = Permission{ResourceType: types.PluginModelType.Name(), Action: ViewAction} CreatePlugin = Permission{ResourceType: types.PluginModelType.Name(), Action: CreateAction} UpdatePlugin = Permission{ResourceType: types.PluginModelType.Name(), Action: UpdateAction} DeletePlugin = Permission{ResourceType: types.PluginModelType.Name(), Action: DeleteAction} ViewVCSProvider = Permission{ResourceType: types.VCSProviderModelType.Name(), Action: ViewAction} CreateVCSProvider = Permission{ResourceType: types.VCSProviderModelType.Name(), Action: CreateAction} UpdateVCSProvider = Permission{ResourceType: types.VCSProviderModelType.Name(), Action: UpdateAction} DeleteVCSProvider = Permission{ResourceType: types.VCSProviderModelType.Name(), Action: DeleteAction} ViewComment = Permission{ResourceType: types.CommentModelType.Name(), Action: ViewAction} CreateComment = Permission{ResourceType: types.CommentModelType.Name(), Action: CreateAction} ViewEnvironmentRule = Permission{ResourceType: types.EnvironmentRuleModelType.Name(), Action: ViewAction} CreateEnvironmentRule = Permission{ResourceType: types.EnvironmentRuleModelType.Name(), Action: CreateAction} UpdateEnvironmentRule = Permission{ResourceType: types.EnvironmentRuleModelType.Name(), Action: UpdateAction} DeleteEnvironmentRule = Permission{ResourceType: types.EnvironmentRuleModelType.Name(), Action: DeleteAction} )
All possible Permissions.
var DefaultCronScheduleTimezone = time.UTC
DefaultCronScheduleTimezone is the default timezone for cron schedules
Functions ¶
func GetAssignablePermissions ¶
func GetAssignablePermissions() []string
GetAssignablePermissions returns a list of assignable permissions.
Types ¶
type Action ¶
type Action string
Action is an enum representing a CRUD action.
const ( ViewAction Action = "view" CreateAction Action = "create" UpdateAction Action = "update" DeleteAction Action = "delete" ExecuteAction Action = "execute" ClaimAction Action = "claim" CancelAction Action = "cancel" )
Action constants.
func (Action) HasViewerAccess ¶
HasViewerAccess returns true if Action is viewer access or greater.
type ActivityEvent ¶
type ActivityEvent struct {
UserID *string
ServiceAccountID *string
OrganizationID *string
ProjectID *string
TargetID *string
Payload []byte
Action ActivityEventAction
TargetType ActivityEventTargetType
Metadata ResourceMetadata
}
ActivityEvent represents an activity event.
func (*ActivityEvent) GetGlobalID ¶ added in v0.41.0
func (a *ActivityEvent) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*ActivityEvent) GetID ¶ added in v0.41.0
func (a *ActivityEvent) GetID() string
GetID returns the Metadata ID.
func (*ActivityEvent) GetModelType ¶ added in v0.41.0
func (a *ActivityEvent) GetModelType() types.ModelType
GetModelType returns the model type
func (*ActivityEvent) ResolveMetadata ¶
func (a *ActivityEvent) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*ActivityEvent) Validate ¶ added in v0.41.0
func (a *ActivityEvent) Validate() error
Validate returns an error if the model is not valid
type ActivityEventAction ¶
type ActivityEventAction string
ActivityEventAction represents an action that can be performed on a resource.
const ( ActionCreate ActivityEventAction = "CREATE" ActionUpdate ActivityEventAction = "UPDATE" ActionDelete ActivityEventAction = "DELETE" ActionStart ActivityEventAction = "START" ActionRetry ActivityEventAction = "RETRY" ActionCreateMembership ActivityEventAction = "CREATE_MEMBERSHIP" ActionRemoveMembership ActivityEventAction = "REMOVE_MEMBERSHIP" ActionCancel ActivityEventAction = "CANCEL" ActionDefer ActivityEventAction = "DEFER" ActionUndefer ActivityEventAction = "UNDEFER" ActionApprove ActivityEventAction = "APPROVE" ActionRevokeApproval ActivityEventAction = "REVOKE_APPROVAL" ActionSchedule ActivityEventAction = "SCHEDULE" ActionUnschedule ActivityEventAction = "UNSCHEDULE" )
ActivityEventAction constants.
type ActivityEventApprovePipelineNodePayload ¶ added in v0.10.0
type ActivityEventApprovePipelineNodePayload struct {
NodePath string `json:"nodePath"`
NodeType string `json:"nodeType"`
}
ActivityEventApprovePipelineNodePayload represents the payload for an approve pipeline node activity event.
type ActivityEventCreateMembershipPayload ¶
type ActivityEventCreateMembershipPayload struct {
UserID *string `json:"userId"`
ServiceAccountID *string `json:"serviceAccountId"`
TeamID *string `json:"teamId"`
Role string `json:"role"`
}
ActivityEventCreateMembershipPayload represents the payload for a create membership activity event.
type ActivityEventDeferPipelineNodePayload ¶ added in v0.10.0
type ActivityEventDeferPipelineNodePayload struct {
NodePath string `json:"nodePath"`
NodeType string `json:"nodeType"`
Reason string `json:"reason"`
}
ActivityEventDeferPipelineNodePayload represents the payload for a defer pipeline node activity event.
type ActivityEventDeleteResourcePayload ¶
type ActivityEventDeleteResourcePayload struct {
Name *string `json:"name"`
ID string `json:"id"`
Type string `json:"type"`
}
ActivityEventDeleteResourcePayload represents the payload for a delete resource activity event.
type ActivityEventRemoveMembershipPayload ¶
type ActivityEventRemoveMembershipPayload struct {
UserID *string `json:"userId"`
ServiceAccountID *string `json:"serviceAccountId"`
TeamID *string `json:"teamId"`
}
ActivityEventRemoveMembershipPayload represents the payload for a remove membership activity event.
type ActivityEventRetryPipelineNodePayload ¶ added in v0.10.0
type ActivityEventRetryPipelineNodePayload struct {
NodePath string `json:"nodePath"`
NodeType string `json:"nodeType"`
}
ActivityEventRetryPipelineNodePayload represents the payload for a retry pipeline node activity event.
type ActivityEventRevokeApprovalPipelineNodePayload ¶ added in v0.10.0
type ActivityEventRevokeApprovalPipelineNodePayload struct {
NodePath string `json:"nodePath"`
NodeType string `json:"nodeType"`
}
ActivityEventRevokeApprovalPipelineNodePayload represents the payload for a revoke approval pipeline node activity event.
type ActivityEventSchedulePipelineNodePayload ¶ added in v0.10.0
type ActivityEventSchedulePipelineNodePayload struct {
NodePath string `json:"nodePath"`
NodeType string `json:"nodeType"`
StartTime *time.Time `json:"startTime"`
}
ActivityEventSchedulePipelineNodePayload represents the payload for a schedule pipeline node activity event.
type ActivityEventStartPipelineNodePayload ¶ added in v0.10.0
type ActivityEventStartPipelineNodePayload struct {
NodePath string `json:"nodePath"`
NodeType string `json:"nodeType"`
}
ActivityEventStartPipelineNodePayload represents the payload for a start pipeline node activity event.
type ActivityEventTargetType ¶
type ActivityEventTargetType string
ActivityEventTargetType represents a type of resource that can be acted upon.
const ( TargetRole ActivityEventTargetType = "ROLE" TargetOrganization ActivityEventTargetType = "ORGANIZATION" TargetProject ActivityEventTargetType = "PROJECT" TargetProjectVariableSet ActivityEventTargetType = "PROJECT_VARIABLE_SET" TargetGlobal ActivityEventTargetType = "GLOBAL" TargetMembership ActivityEventTargetType = "MEMBERSHIP" TargetAgent ActivityEventTargetType = "AGENT" TargetPipelineTemplate ActivityEventTargetType = "PIPELINE_TEMPLATE" TargetPipeline ActivityEventTargetType = "PIPELINE" TargetTeam ActivityEventTargetType = "TEAM" TargetEnvironment ActivityEventTargetType = "ENVIRONMENT" TargetServiceAccount ActivityEventTargetType = "SERVICE_ACCOUNT" TargetApprovalRule ActivityEventTargetType = "APPROVAL_RULE" TargetLifecycleTemplate ActivityEventTargetType = "LIFECYCLE_TEMPLATE" TargetReleaseLifecycle ActivityEventTargetType = "RELEASE_LIFECYCLE" TargetRelease ActivityEventTargetType = "RELEASE" TargetPlugin ActivityEventTargetType = "PLUGIN" TargetPluginVersion ActivityEventTargetType = "PLUGIN_VERSION" TargetComment ActivityEventTargetType = "COMMENT" TargetUser ActivityEventTargetType = "USER" TargetVCSProvider ActivityEventTargetType = "VCS_PROVIDER" TargetThread ActivityEventTargetType = "THREAD" TargetEnvironmentRule ActivityEventTargetType = "ENVIRONMENT_RULE" )
ActivityEventTargetType constants.
func (ActivityEventTargetType) String ¶
func (t ActivityEventTargetType) String() string
String returns the string representation of the activity event target type.
type ActivityEventUndeferPipelineNodePayload ¶ added in v0.10.0
type ActivityEventUndeferPipelineNodePayload struct {
NodePath string `json:"nodePath"`
NodeType string `json:"nodeType"`
}
ActivityEventUndeferPipelineNodePayload represents the payload for an undefer pipeline node activity event.
type ActivityEventUnschedulePipelineNodePayload ¶ added in v0.10.0
type ActivityEventUnschedulePipelineNodePayload struct {
NodePath string `json:"nodePath"`
NodeType string `json:"nodeType"`
}
ActivityEventUnschedulePipelineNodePayload represents the payload for an unschedule pipeline node activity event.
type ActivityEventUpdateMembershipPayload ¶
type ActivityEventUpdateMembershipPayload struct {
PrevRole string `json:"prevRole"`
NewRole string `json:"newRole"`
}
ActivityEventUpdateMembershipPayload represents the payload for a update membership activity event.
type ActivityEventUpdatePipelineNodePayload ¶ added in v0.10.0
type ActivityEventUpdatePipelineNodePayload struct {
NodePath string `json:"nodePath"`
NodeType string `json:"nodeType"`
}
ActivityEventUpdatePipelineNodePayload represents the payload for a update pipeline node activity event.
type ActivityEventUpdateReleasePayload ¶
type ActivityEventUpdateReleasePayload struct {
ID string `json:"id"`
ChangeType string `json:"changeType"`
Type string `json:"type"`
}
ActivityEventUpdateReleasePayload represents the payload for a update release activity event.
type ActivityEventUpdateTeamPayload ¶
type ActivityEventUpdateTeamPayload struct {
UserID string `json:"userId"`
ChangeType string `json:"changeType"`
Maintainer bool `json:"maintainer"`
}
ActivityEventUpdateTeamPayload represents the payload for a update team activity event.
type Agent ¶
type Agent struct {
OrganizationID *string
Type AgentType
Name string
Description string
CreatedBy string
Metadata ResourceMetadata
Tags []string
Disabled bool
RunUntaggedJobs bool
}
Agent is responsible for claiming and executing jobs.
func (*Agent) GetGlobalID ¶ added in v0.41.0
GetGlobalID returns the Metadata ID as a GID.
func (*Agent) GetModelType ¶ added in v0.41.0
GetModelType returns the model type
func (*Agent) GetOrgName ¶
GetOrgName returns the org name for the agent
func (*Agent) ResolveMetadata ¶
ResolveMetadata resolves the metadata fields for cursor-based pagination
type AgentSession ¶
type AgentSession struct {
LastContactTimestamp time.Time
AgentID string
Metadata ResourceMetadata
ErrorCount int
Internal bool
}
AgentSession represents a session for an agent
func (*AgentSession) Active ¶
func (a *AgentSession) Active() bool
Active returns true if the session has received a heartbeat within the last heartbeat interval
func (*AgentSession) GetGlobalID ¶ added in v0.41.0
func (a *AgentSession) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*AgentSession) GetID ¶ added in v0.41.0
func (a *AgentSession) GetID() string
GetID returns the Metadata ID.
func (*AgentSession) GetModelType ¶ added in v0.41.0
func (a *AgentSession) GetModelType() types.ModelType
GetModelType returns the model type
func (*AgentSession) ResolveMetadata ¶
func (a *AgentSession) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*AgentSession) Validate ¶ added in v0.41.0
func (a *AgentSession) Validate() error
Validate returns an error if the model is not valid
type AgentType ¶
type AgentType string
AgentType constant
const ( OrganizationAgent AgentType = "ORGANIZATION" )
AgentType constants
type Announcement ¶ added in v0.39.0
type Announcement struct {
Metadata ResourceMetadata
Message string
StartTime time.Time
EndTime *time.Time
CreatedBy string
Type AnnouncementType
Dismissible bool
}
Announcement represents a scheduled announcement message
func (*Announcement) GetGlobalID ¶ added in v0.41.0
func (a *Announcement) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*Announcement) GetID ¶ added in v0.41.0
func (a *Announcement) GetID() string
GetID returns the Metadata ID.
func (*Announcement) GetModelType ¶ added in v0.41.0
func (a *Announcement) GetModelType() types.ModelType
GetModelType returns the model type
func (*Announcement) IsActive ¶ added in v0.39.0
func (a *Announcement) IsActive() bool
IsActive returns true if the announcement is currently active (within its time range)
func (*Announcement) IsExpired ¶ added in v0.39.0
func (a *Announcement) IsExpired() bool
IsExpired returns true if the announcement has expired (past its end time)
func (*Announcement) ResolveMetadata ¶ added in v0.39.0
func (a *Announcement) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*Announcement) Validate ¶ added in v0.39.0
func (a *Announcement) Validate() error
Validate validates the announcement fields
type AnnouncementType ¶ added in v0.39.0
type AnnouncementType string
AnnouncementType represents the type/severity level of an announcement
const ( // AnnouncementTypeInfo represents informational announcements AnnouncementTypeInfo AnnouncementType = "INFO" // AnnouncementTypeError represents error/critical announcements AnnouncementTypeError AnnouncementType = "ERROR" // AnnouncementTypeWarning represents warning announcements AnnouncementTypeWarning AnnouncementType = "WARNING" // AnnouncementTypeSuccess represents success announcements AnnouncementTypeSuccess AnnouncementType = "SUCCESS" )
type ApprovalRule ¶
type ApprovalRule struct {
Scope ScopeType
OrgID string // required (global scope not allowed)
ProjectID *string // required if project scope; must be nil if org scope
Name string
Description string
CreatedBy string
Metadata ResourceMetadata
TeamIDs []string
UserIDs []string
ServiceAccountIDs []string
ApprovalsRequired int
}
ApprovalRule represents a rule that can be used to control who can approve a task
func (*ApprovalRule) GetGlobalID ¶ added in v0.41.0
func (a *ApprovalRule) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*ApprovalRule) GetID ¶ added in v0.41.0
func (a *ApprovalRule) GetID() string
GetID returns the Metadata ID.
func (*ApprovalRule) GetModelType ¶ added in v0.41.0
func (a *ApprovalRule) GetModelType() types.ModelType
GetModelType returns the model type
func (*ApprovalRule) ResolveMetadata ¶
func (a *ApprovalRule) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*ApprovalRule) Validate ¶
func (a *ApprovalRule) Validate() error
Validate returns an error if the model is not valid
type AsymSigningKey ¶ added in v0.39.0
type AsymSigningKey struct {
PublicKey []byte
PluginData []byte
Metadata ResourceMetadata
Status AsymSigningKeyStatus
PubKeyID string
PluginType string
}
AsymSigningKey represents a GPG key used for signing
func (*AsymSigningKey) GetGlobalID ¶ added in v0.41.0
func (a *AsymSigningKey) GetGlobalID() string
GetGlobalID returns the global ID
func (*AsymSigningKey) GetID ¶ added in v0.41.0
func (a *AsymSigningKey) GetID() string
GetID returns the ID
func (*AsymSigningKey) GetModelType ¶ added in v0.41.0
func (a *AsymSigningKey) GetModelType() types.ModelType
GetModelType returns the model type
func (*AsymSigningKey) ResolveMetadata ¶ added in v0.39.0
func (a *AsymSigningKey) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*AsymSigningKey) Validate ¶ added in v0.39.0
func (a *AsymSigningKey) Validate() error
Validate validates the resource
type AsymSigningKeyStatus ¶ added in v0.39.0
type AsymSigningKeyStatus string
AsymSigningKeyStatus represents the various states for a asymmetric signing key resource
const ( AsymSigningKeyStatusCreating AsymSigningKeyStatus = "creating" AsymSigningKeyStatusActive AsymSigningKeyStatus = "active" AsymSigningKeyStatusDecommissioning AsymSigningKeyStatus = "decommissioning" )
AsymSigningKey status types
type BoundClaimsType ¶
type BoundClaimsType string
BoundClaimsType defines the type of comparison to be used for bound claims
const ( // BoundClaimsTypeString is used for exact string matching BoundClaimsTypeString BoundClaimsType = "STRING" // BoundClaimsTypeGlob is used for glob pattern matching (i.e. a wildcard character can be used within the claim value) BoundClaimsTypeGlob BoundClaimsType = "GLOB" )
type Comment ¶
type Comment struct {
ThreadID string
UserID *string
ServiceAccountID *string
Text string
Metadata ResourceMetadata
}
Comment represents a Phobos comment.
func (*Comment) GetGlobalID ¶ added in v0.41.0
GetGlobalID returns the Metadata ID as a GID.
func (*Comment) GetModelType ¶ added in v0.41.0
GetModelType returns the model type
func (*Comment) ResolveMetadata ¶
ResolveMetadata resolves the metadata fields for cursor-based pagination
type CronSchedule ¶ added in v0.9.0
CronSchedule represents a cron schedule for running this task
func (*CronSchedule) NextTime ¶ added in v0.9.0
func (c *CronSchedule) NextTime() (*time.Time, error)
NextTime returns the next time the cron schedule will run
func (*CronSchedule) Validate ¶ added in v0.9.0
func (c *CronSchedule) Validate() error
Validate validates the cron schedule
type DefaultRoleID ¶
type DefaultRoleID string
DefaultRoleID represents the static UUIDs for default Phobos roles.
const ( OwnerRoleID DefaultRoleID = "3e8eb414-4504-4dc5-ad81-2f0d20db6ee4" ReleaseManagerRoleID DefaultRoleID = "c78c6d31-465f-4d16-a365-51f10a4ca37d" DeveloperRoleID DefaultRoleID = "d50e782f-c82a-4e18-b68b-c7eb176f4e5e" ViewerRoleID DefaultRoleID = "2e240dba-ee81-4f0b-bd97-b8d8b15b9119" )
DefaultRoleID constants.
func (DefaultRoleID) Equals ¶
func (d DefaultRoleID) Equals(want string) bool
Equals returns true if the both IDs are the same.
func (DefaultRoleID) IsDefaultRole ¶
func (d DefaultRoleID) IsDefaultRole() bool
IsDefaultRole returns true if ID belongs to a default role.
func (DefaultRoleID) Permissions ¶
func (d DefaultRoleID) Permissions() ([]Permission, bool)
Permissions returns the Permission set for a default Phobos role.
func (DefaultRoleID) String ¶
func (d DefaultRoleID) String() string
String returns the ID as a string.
type Environment ¶
type Environment struct {
ProjectID string
Name string
Description string
CreatedBy string
Metadata ResourceMetadata
}
Environment is responsible for claiming and executing jobs.
func (*Environment) GetGlobalID ¶ added in v0.41.0
func (e *Environment) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*Environment) GetID ¶ added in v0.41.0
func (e *Environment) GetID() string
GetID returns the Metadata ID.
func (*Environment) GetModelType ¶ added in v0.41.0
func (e *Environment) GetModelType() types.ModelType
GetModelType returns the model type
func (*Environment) ResolveMetadata ¶
func (e *Environment) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*Environment) Validate ¶
func (e *Environment) Validate() error
Validate returns an error if the model is not valid
type EnvironmentRule ¶
type EnvironmentRule struct {
Metadata ResourceMetadata
CreatedBy string
Scope ScopeType
OrgID string // required
ProjectID *string // required if project scope; must be nil if org scope
EnvironmentName string
TeamIDs []string
UserIDs []string
ServiceAccountIDs []string
RoleIDs []string
}
EnvironmentRule represents a rule that can be used to control who can approve a task
func (*EnvironmentRule) GetGlobalID ¶ added in v0.41.0
func (e *EnvironmentRule) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*EnvironmentRule) GetID ¶ added in v0.41.0
func (e *EnvironmentRule) GetID() string
GetID returns the Metadata ID.
func (*EnvironmentRule) GetModelType ¶ added in v0.41.0
func (e *EnvironmentRule) GetModelType() types.ModelType
GetModelType returns the model type
func (*EnvironmentRule) ResolveMetadata ¶
func (e *EnvironmentRule) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*EnvironmentRule) Validate ¶
func (e *EnvironmentRule) Validate() error
Validate returns an error if the model is not valid
type Job ¶
type Job struct {
Timestamps JobTimestamps
Data interface{}
AgentType *string
ForceCanceledBy *string
AgentID *string
Image *string // Custom image to use for the job
CancelRequestedTimestamp *time.Time
AgentName *string
Type JobType
ProjectID string
Metadata ResourceMetadata
Tags []string
MaxJobDuration int32
ForceCanceled bool
// contains filtered or unexported fields
}
Job represents a unit of work that is completed as part of a pipeline or lifecycle
func (*Job) ForceCancel ¶
ForceCancel forcefully cancels the job
func (*Job) GetForceCancelAvailableAt ¶
GetForceCancelAvailableAt returns the time when this job can be forcefully canceled
func (*Job) GetGlobalID ¶ added in v0.41.0
GetGlobalID returns the Metadata ID as a GID.
func (*Job) GetModelType ¶ added in v0.41.0
GetModelType returns the model type
func (*Job) GetOrgName ¶
GetOrgName returns the org name for the job
func (*Job) GetProjectName ¶ added in v0.14.0
GetProjectName returns the project name for the job
func (*Job) GracefullyCancel ¶
GracefullyCancel gracefully cancels the job
func (*Job) ResolveMetadata ¶
ResolveMetadata resolves the metadata fields for cursor-based pagination
type JobStatus ¶
type JobStatus string
JobStatus type
const ( JobQueued JobStatus = "queued" JobPending JobStatus = "pending" JobRunning JobStatus = "running" JobFailed JobStatus = "failed" JobSucceeded JobStatus = "succeeded" JobCanceled JobStatus = "canceled" JobCanceling JobStatus = "canceling" )
Job Status Constants
func (JobStatus) IsFinishedStatus ¶
IsFinishedStatus returns true if the job is finished (failed, succeeded, or canceled)
type JobTaskData ¶
JobTaskData is the data for a job of type task
type JobTimestamps ¶
type JobTimestamps struct {
QueuedTimestamp *time.Time
PendingTimestamp *time.Time
RunningTimestamp *time.Time
FinishedTimestamp *time.Time
}
JobTimestamps includes the timestamp for each job state change
type JobType ¶
type JobType string
JobType indicates the type of job
const (
JobTaskType JobType = "task"
)
Job Types Constants
type LifecycleTemplate ¶
type LifecycleTemplate struct {
CreatedBy string
Scope ScopeType
OrganizationID string // required (global scope not allowed)
ProjectID *string // required if project scope; must be nil if org scope
Status LifecycleTemplateStatus
Metadata ResourceMetadata
}
LifecycleTemplate represents a Phobos lifecycle template.
func (*LifecycleTemplate) GetGlobalID ¶ added in v0.41.0
func (l *LifecycleTemplate) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*LifecycleTemplate) GetID ¶ added in v0.41.0
func (l *LifecycleTemplate) GetID() string
GetID returns the Metadata ID.
func (*LifecycleTemplate) GetModelType ¶ added in v0.41.0
func (l *LifecycleTemplate) GetModelType() types.ModelType
GetModelType returns the model type
func (*LifecycleTemplate) ResolveMetadata ¶
func (l *LifecycleTemplate) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*LifecycleTemplate) Validate ¶ added in v0.41.0
func (l *LifecycleTemplate) Validate() error
Validate returns an error if the model is not valid
type LifecycleTemplateStatus ¶
type LifecycleTemplateStatus string
LifecycleTemplateStatus represents the status of a Phobos lifecycle template.
const ( LifecycleTemplatePending LifecycleTemplateStatus = "PENDING" LifecycleTemplateUploaded LifecycleTemplateStatus = "UPLOADED" )
LifecycleTemplateStatus values.
type LogStream ¶
type LogStream struct {
JobID *string
AgentSessionID *string
Metadata ResourceMetadata
Size int
Completed bool
}
LogStream represents a stream of logs
func (*LogStream) GetGlobalID ¶ added in v0.41.0
GetGlobalID returns the Metadata ID as a GID.
func (*LogStream) GetModelType ¶ added in v0.41.0
GetModelType returns the model type
func (*LogStream) ResolveMetadata ¶
ResolveMetadata resolves the metadata fields for cursor-based pagination
type MaintenanceMode ¶ added in v0.39.0
type MaintenanceMode struct {
CreatedBy string
Metadata ResourceMetadata
}
MaintenanceMode represents the maintenance mode (aka read-only mode) of the system.
func (*MaintenanceMode) GetGlobalID ¶ added in v0.41.0
func (m *MaintenanceMode) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*MaintenanceMode) GetID ¶ added in v0.41.0
func (m *MaintenanceMode) GetID() string
GetID returns the Metadata ID.
func (*MaintenanceMode) GetModelType ¶ added in v0.41.0
func (m *MaintenanceMode) GetModelType() types.ModelType
GetModelType returns the model type
func (*MaintenanceMode) ResolveMetadata ¶ added in v0.41.0
func (m *MaintenanceMode) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*MaintenanceMode) Validate ¶ added in v0.41.0
func (m *MaintenanceMode) Validate() error
Validate returns an error if the model is not valid
type Membership ¶
type Membership struct {
UserID *string
TeamID *string
ServiceAccountID *string
ProjectID *string
OrganizationID *string
RoleID string
Scope ScopeType
Metadata ResourceMetadata
}
Membership represents an association between a member and an organization or project.
func (*Membership) GetGlobalID ¶ added in v0.41.0
func (m *Membership) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*Membership) GetID ¶ added in v0.41.0
func (m *Membership) GetID() string
GetID returns the Metadata ID.
func (*Membership) GetModelType ¶ added in v0.41.0
func (m *Membership) GetModelType() types.ModelType
GetModelType returns the model type
func (*Membership) ResolveMetadata ¶
func (m *Membership) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*Membership) Validate ¶ added in v0.41.0
func (m *Membership) Validate() error
Validate returns an error if the model is not valid
type Metric ¶
type Metric struct {
Tags map[MetricTagName]string
PipelineID *string
ReleaseID *string
ProjectID *string
OrganizationID *string
EnvironmentName *string
Name MetricName
Metadata ResourceMetadata
Value float64
}
Metric represents a resource metric.
func (*Metric) GetGlobalID ¶ added in v0.41.0
GetGlobalID returns the Metadata ID as a GID.
func (*Metric) GetModelType ¶ added in v0.41.0
GetModelType returns the model type
func (*Metric) ResolveMetadata ¶
ResolveMetadata resolves the metadata fields for cursor-based pagination
type MetricName ¶
type MetricName string
MetricName represents the type of the metric.
const ( // MetricPipelineCompleted is the number of completed pipelines MetricPipelineCompleted MetricName = "PIPELINE_COMPLETED" // MetricPipelineDuration is the time it takes for a pipeline to complete MetricPipelineDuration MetricName = "PIPELINE_DURATION" // MetricDeploymentRecoveryTime is the time it takes for a deployment to recover after it has failed MetricDeploymentRecoveryTime MetricName = "DEPLOYMENT_RECOVERY_TIME" // MetricDeploymentUpdated is the number of updates to a deployment MetricDeploymentUpdated MetricName = "DEPLOYMENT_UPDATED" // MetricPipelineLeadTime is the time from when a pipeline is created to when it is completed MetricPipelineLeadTime MetricName = "PIPELINE_LEAD_TIME" // MetricApprovalRequestWaitTime is the time it takes for an approval request to be approved MetricApprovalRequestWaitTime MetricName = "APPROVAL_REQUEST_WAIT_TIME" // MetricApprovalRequestCreated is the number of created approval requests MetricApprovalRequestCreated MetricName = "APPROVAL_REQUEST_CREATED" // MetricApprovalRequestCompleted is the number of completed approval requests MetricApprovalRequestCompleted MetricName = "APPROVAL_REQUEST_COMPLETED" )
MetricName constants.
type MetricTagName ¶
type MetricTagName string
MetricTagName represents the supported metric tag names
const ( // MetricTagNamePipelineType is the type of the pipeline MetricTagNamePipelineType MetricTagName = "PIPELINE_TYPE" // MetricTagNamePipelineStatus is the status of the pipeline MetricTagNamePipelineStatus MetricTagName = "PIPELINE_STATUS" // MetricTagNameApprovalTargetType is the type of the approval MetricTagNameApprovalTargetType MetricTagName = "APPROVAL_TARGET_TYPE" // MetricTagNameReleaseLifecycle is the name of the release lifecycle MetricTagNameReleaseLifecycle MetricTagName = "RELEASE_LIFECYCLE" )
type Model ¶ added in v0.41.0
type Model interface {
GetID() string
GetGlobalID() string
GetModelType() types.ModelType
ResolveMetadata(key string) (*string, error)
Validate() error
}
Model defines the interface that all Phobos models must implement.
type NestedPipeline ¶
type NestedPipeline struct {
EnvironmentName *string
ScheduledStartTime *time.Time
CronSchedule *CronSchedule
OnError statemachine.OnErrorStrategy
LatestPipelineID string
Name string
Path string
Status statemachine.NodeStatus
ApprovalStatus PipelineApprovalStatus
Dependencies []string
Errors []string
}
NestedPipeline represents a nested pipeline
func (*NestedPipeline) ClearErrors ¶ added in v0.10.0
func (n *NestedPipeline) ClearErrors()
ClearErrors clears the errors for the nested pipeline
func (*NestedPipeline) ClearSchedule ¶ added in v0.10.0
func (n *NestedPipeline) ClearSchedule()
ClearSchedule clears the schedule for the nested pipeline
type OIDCTrustPolicy ¶
type OIDCTrustPolicy struct {
BoundClaimsType BoundClaimsType
BoundClaims map[string]string
Issuer string
}
OIDCTrustPolicy defined the IDP that can be used for logging into the service account
type Organization ¶
type Organization struct {
Name string
Description string
CreatedBy string
Metadata ResourceMetadata
}
Organization represents a Phobos organization which users can belong to
func (*Organization) GetGlobalID ¶ added in v0.41.0
func (o *Organization) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*Organization) GetID ¶ added in v0.41.0
func (o *Organization) GetID() string
GetID returns the Metadata ID.
func (*Organization) GetModelType ¶ added in v0.41.0
func (o *Organization) GetModelType() types.ModelType
GetModelType returns the model type
func (*Organization) ResolveMetadata ¶
func (o *Organization) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*Organization) Validate ¶
func (o *Organization) Validate() error
Validate returns an error if the model is not valid
type Permission ¶
Permission represents a level of access a subject has to a Phobos resource.
func ParsePermissions ¶
func ParsePermissions(perms []string) ([]Permission, error)
ParsePermissions parses and normalizes a slice of permission strings and extracts a Permission that adheres to the format resource_type:action.
func (*Permission) GTE ¶
func (p *Permission) GTE(want *Permission) bool
GTE returns true if permission available is >= wanted permission.
func (*Permission) IsAssignable ¶
func (p *Permission) IsAssignable() bool
IsAssignable returns true if permission is assignable to a role.
func (*Permission) String ¶
func (p *Permission) String() string
String returns the Permission as <resource_type:action> string.
type Pipeline ¶
type Pipeline struct {
ReleaseID *string
ParentPipelineID *string
ParentPipelineNodePath *string
EnvironmentName *string
CreatedBy string
ProjectID string
ProjectVariableSetID *string
PipelineTemplateID string
ApprovalStatus PipelineApprovalStatus
When PipelineWhenCondition
Type PipelineType
Status statemachine.NodeStatus
Timestamps PipelineTimestamps
Metadata ResourceMetadata
Stages []*PipelineStage
Annotations []*PipelineAnnotation
ApprovalRuleIDs []string
Superseded bool
}
Pipeline represents a Phobos pipeline.
func (*Pipeline) BuildStateMachine ¶
func (p *Pipeline) BuildStateMachine() *statemachine.StateMachine
BuildStateMachine builds a state machine based on the current state of the pipeline graph
func (*Pipeline) CancelNode ¶
func (p *Pipeline) CancelNode(nodePath string, force bool) ([]statemachine.NodeStatusChange, error)
CancelNode cancels the pipeline node
func (*Pipeline) GetAction ¶
func (p *Pipeline) GetAction(path string) (*PipelineAction, bool)
GetAction returns a pipeline action by its path
func (*Pipeline) GetGlobalID ¶ added in v0.41.0
GetGlobalID returns the Metadata ID as a GID.
func (*Pipeline) GetModelType ¶ added in v0.41.0
GetModelType returns the model type
func (*Pipeline) GetNestedPipeline ¶
func (p *Pipeline) GetNestedPipeline(path string) (*NestedPipeline, bool)
GetNestedPipeline returns a nested pipeline by its path
func (*Pipeline) GetOrgName ¶
GetOrgName returns the org name for the pipeline
func (*Pipeline) GetProjectName ¶
GetProjectName returns the project name for the pipeline
func (*Pipeline) GetStage ¶
func (p *Pipeline) GetStage(path string) (*PipelineStage, bool)
GetStage returns a pipeline stage by its path
func (*Pipeline) GetTask ¶
func (p *Pipeline) GetTask(path string) (*PipelineTask, bool)
GetTask returns a pipeline task by its path
func (*Pipeline) ResolveMetadata ¶
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*Pipeline) SetNodeStatus ¶
func (p *Pipeline) SetNodeStatus(nodePath string, status statemachine.NodeStatus) ([]statemachine.NodeStatusChange, error)
SetNodeStatus sets the status of a node in the pipeline
func (*Pipeline) SetStatus ¶
func (p *Pipeline) SetStatus(status statemachine.NodeStatus) ([]statemachine.NodeStatusChange, error)
SetStatus sets the status of the pipeline
type PipelineAction ¶
type PipelineAction struct {
Name string
PluginName string
ActionName string
Status statemachine.NodeStatus
Path string
}
PipelineAction defines an action that will be executed using a provider plugin
type PipelineActionOutput ¶
type PipelineActionOutput struct {
Name string
PipelineID string
ActionPath string
Metadata ResourceMetadata
Value []byte
Type []byte
}
PipelineActionOutput defines an output for a pipeline action
func (*PipelineActionOutput) GetGlobalID ¶ added in v0.41.0
func (p *PipelineActionOutput) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*PipelineActionOutput) GetID ¶ added in v0.41.0
func (p *PipelineActionOutput) GetID() string
GetID returns the Metadata ID.
func (*PipelineActionOutput) GetModelType ¶ added in v0.41.0
func (p *PipelineActionOutput) GetModelType() types.ModelType
GetModelType returns the model type
func (*PipelineActionOutput) ResolveMetadata ¶ added in v0.41.0
func (p *PipelineActionOutput) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*PipelineActionOutput) Validate ¶ added in v0.41.0
func (p *PipelineActionOutput) Validate() error
Validate returns an error if the model is not valid
type PipelineAnnotation ¶
PipelineAnnotation represents an annotation for a pipeline
type PipelineApproval ¶
type PipelineApproval struct {
UserID *string
ServiceAccountID *string
TaskPath *string
PipelineID string
Type PipelineApprovalType
Metadata ResourceMetadata
ApprovalRuleIDs []string
}
PipelineApproval defines an approval for a pipeline or task.
func (*PipelineApproval) GetGlobalID ¶ added in v0.41.0
func (p *PipelineApproval) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*PipelineApproval) GetID ¶ added in v0.41.0
func (p *PipelineApproval) GetID() string
GetID returns the Metadata ID.
func (*PipelineApproval) GetModelType ¶ added in v0.41.0
func (p *PipelineApproval) GetModelType() types.ModelType
GetModelType returns the model type
func (*PipelineApproval) ResolveMetadata ¶
func (p *PipelineApproval) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*PipelineApproval) Validate ¶ added in v0.41.0
func (p *PipelineApproval) Validate() error
Validate returns an error if the model is not valid
type PipelineApprovalStatus ¶
type PipelineApprovalStatus string
PipelineApprovalStatus represents the approval status of a pipeline node.
const ( ApprovalNotRequired PipelineApprovalStatus = "NOT_REQUIRED" ApprovalPending PipelineApprovalStatus = "PENDING" ApprovalApproved PipelineApprovalStatus = "APPROVED" )
ApprovalStatus enums.
type PipelineApprovalType ¶
type PipelineApprovalType string
PipelineApprovalType represents the pipeline node type the approval is for.
const ( ApprovalTypeTask PipelineApprovalType = "TASK" ApprovalTypePipeline PipelineApprovalType = "PIPELINE" // nested or non-nested )
ApprovalType enums.
type PipelineStage ¶
type PipelineStage struct {
NestedPipelines []*NestedPipeline
Path string
Name string
Status statemachine.NodeStatus
Tasks []*PipelineTask
}
PipelineStage represents a stage within a pipeline
type PipelineTask ¶
type PipelineTask struct {
// interval between retries when this is a repeated task
Interval *time.Duration
// LastAttemptFinishedAt is the time the last attempt finished
LastAttemptFinishedAt *time.Time
// scheduled start time for the task (optional), this field can only
// be set when the task is manual
ScheduledStartTime *time.Time
// CronSchedule is the cron schedule for the task
CronSchedule *CronSchedule
// status of the task
Status statemachine.NodeStatus
// approval status of the task
ApprovalStatus PipelineApprovalStatus
// when condition specifies when the task should be executed
When PipelineTaskWhenCondition
// on error specifies the behavior of the pipeline node when a task encounters an error
OnError statemachine.OnErrorStrategy
// latest job associated with this task
LatestJobID *string
// path is the path of the task within the pipeline
Path string
// name of the task
Name string
// image is the custom image to use for the task
Image *string
// actions are the actions that will be executed by the task
Actions []*PipelineAction
// list of tags to restrict which agents can run jobs for this task
AgentTags []string
// Dependencies are tasks needed by this task (within the same stage)
Dependencies []string
// optional approval rule IDs
ApprovalRuleIDs []string
// any errors that have occurred during initialization.
Errors []string
// max attempts specifies how many times a task will be retried automatically
MaxAttempts int
// AttemptCount is the number of times the task has been attempted
AttemptCount int
// indicates if the task has a success condition
HasSuccessCondition bool
}
PipelineTask is a task within a pipeline
func (*PipelineTask) ClearErrors ¶ added in v0.10.0
func (p *PipelineTask) ClearErrors()
ClearErrors clears the errors for the task
func (*PipelineTask) ClearSchedule ¶ added in v0.10.0
func (p *PipelineTask) ClearSchedule()
ClearSchedule clears the schedule for the task
func (*PipelineTask) IsRetryable ¶ added in v0.2.0
func (p *PipelineTask) IsRetryable() bool
IsRetryable returns true if the task can be retried
type PipelineTaskWhenCondition ¶
type PipelineTaskWhenCondition string
PipelineTaskWhenCondition defines the possible conditions for a task to be executed
const ( AutoPipelineTask PipelineTaskWhenCondition = config.WhenAuto ManualPipelineTask PipelineTaskWhenCondition = config.WhenManual )
PipelineTaskWhenCondition Constants
type PipelineTemplate ¶
type PipelineTemplate struct {
CreatedBy string
ProjectID string
Status PipelineTemplateStatus
Name *string
SemanticVersion *string
Metadata ResourceMetadata
Versioned bool
Archived bool
Latest bool
}
PipelineTemplate represents a Phobos pipeline template.
func (*PipelineTemplate) GetGlobalID ¶ added in v0.41.0
func (p *PipelineTemplate) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*PipelineTemplate) GetID ¶ added in v0.41.0
func (p *PipelineTemplate) GetID() string
GetID returns the Metadata ID.
func (*PipelineTemplate) GetModelType ¶ added in v0.41.0
func (p *PipelineTemplate) GetModelType() types.ModelType
GetModelType returns the model type
func (*PipelineTemplate) ResolveMetadata ¶
func (p *PipelineTemplate) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*PipelineTemplate) Validate ¶
func (p *PipelineTemplate) Validate() error
Validate validates the pipeline template.
type PipelineTemplateStatus ¶
type PipelineTemplateStatus string
PipelineTemplateStatus represents the status of a Phobos pipeline template.
const ( PipelineTemplatePending PipelineTemplateStatus = "pending" PipelineTemplateUploaded PipelineTemplateStatus = "uploaded" )
PipelineTemplateStatus values.
type PipelineTimestamps ¶
PipelineTimestamps includes the timestamp for each pipeline
type PipelineType ¶
type PipelineType string
PipelineType represents the type of a pipeline
const ( // RunbookPipelineType is a pipeline that is executed on demand and is not associated with an environment RunbookPipelineType PipelineType = "RUNBOOK" // ReleaseLifecyclePipelineType is a pipeline that is executed as part of a release lifecycle ReleaseLifecyclePipelineType PipelineType = "RELEASE_LIFECYCLE" // NestedPipelineType is a pipeline that is executed as a nested pipeline NestedPipelineType PipelineType = "NESTED" // DeploymentPipelineType is a pipeline that is executed as part of a deployment DeploymentPipelineType PipelineType = "DEPLOYMENT" )
PipelineType constants
type PipelineWhenCondition ¶
type PipelineWhenCondition string
PipelineWhenCondition defines the possible conditions for a pipeline to be executed
const ( AutoPipeline PipelineWhenCondition = config.WhenAuto ManualPipeline PipelineWhenCondition = config.WhenManual )
PipelineWhenCondition Constants
type Plugin ¶
type Plugin struct {
CreatedBy string
Name string
OrganizationID string
RepositoryURL string
Metadata ResourceMetadata
Private bool
}
Plugin represents a Phobos plugin often used to interface with external services or extend Phobos functionality.
func (*Plugin) GetGlobalID ¶ added in v0.41.0
GetGlobalID returns the Metadata ID as a GID.
func (*Plugin) GetModelType ¶ added in v0.41.0
GetModelType returns the model type
func (*Plugin) ResolveMetadata ¶
ResolveMetadata resolves the metadata fields for cursor-based pagination
type PluginPlatform ¶
type PluginPlatform struct {
PluginVersionID string
OperatingSystem string
Architecture string
SHASum string
Filename string
CreatedBy string
Metadata ResourceMetadata
BinaryUploaded bool
}
PluginPlatform represents a support platform for a plugin.
func (*PluginPlatform) GetGlobalID ¶ added in v0.41.0
func (p *PluginPlatform) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*PluginPlatform) GetID ¶ added in v0.41.0
func (p *PluginPlatform) GetID() string
GetID returns the Metadata ID.
func (*PluginPlatform) GetModelType ¶ added in v0.41.0
func (p *PluginPlatform) GetModelType() types.ModelType
GetModelType returns the model type
func (*PluginPlatform) ResolveMetadata ¶
func (p *PluginPlatform) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*PluginPlatform) Validate ¶ added in v0.41.0
func (p *PluginPlatform) Validate() error
Validate returns an error if the model is not valid
type PluginVersion ¶
type PluginVersion struct {
DocFiles map[string]*PluginVersionDocFileMetadata
CreatedBy string
PluginID string
SemanticVersion string
Metadata ResourceMetadata
Protocols []string
SHASumsUploaded bool
ReadmeUploaded bool
SchemaUploaded bool
Latest bool
}
PluginVersion represents a version of a Phobos plugin.
func (*PluginVersion) GetGlobalID ¶ added in v0.41.0
func (p *PluginVersion) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*PluginVersion) GetID ¶ added in v0.41.0
func (p *PluginVersion) GetID() string
GetID returns the Metadata ID.
func (*PluginVersion) GetModelType ¶ added in v0.41.0
func (p *PluginVersion) GetModelType() types.ModelType
GetModelType returns the model type
func (*PluginVersion) ResolveMetadata ¶
func (p *PluginVersion) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*PluginVersion) Validate ¶
func (p *PluginVersion) Validate() error
Validate checks if the plugin version is valid.
type PluginVersionDocCategory ¶
type PluginVersionDocCategory string
PluginVersionDocCategory represents the category of a plugin version documentation file.
const ( PluginVersionDocCategoryOverview PluginVersionDocCategory = "OVERVIEW" PluginVersionDocCategoryAction PluginVersionDocCategory = "ACTION" PluginVersionDocCategoryGuide PluginVersionDocCategory = "GUIDE" )
PluginVersionDocCategory constants
type PluginVersionDocFileMetadata ¶
type PluginVersionDocFileMetadata struct {
Title string `json:"title"`
Category PluginVersionDocCategory `json:"category"`
Subcategory string `json:"subcategory"`
Name string `json:"name"`
FilePath string `json:"file_path"`
}
PluginVersionDocFileMetadata represents the metadata of a plugin version documentation file.
func (*PluginVersionDocFileMetadata) Validate ¶
func (p *PluginVersionDocFileMetadata) Validate() error
Validate validates the plugin version documentation file metadata.
type Project ¶
type Project struct {
Name string
Description string
CreatedBy string
OrgID string
Metadata ResourceMetadata
PipelineTokenSubClaimExpression *string
}
Project represents a Phobos project.
func (*Project) EvaluatePipelineTokenSubClaimExpression ¶ added in v0.39.0
func (p *Project) EvaluatePipelineTokenSubClaimExpression(pipelineType PipelineType, pipelineID string, environmentName string) (string, error)
EvaluatePipelineTokenSubClaimExpression returns the subject claim for the pipeline token
func (*Project) GetGlobalID ¶ added in v0.41.0
GetGlobalID returns the Metadata ID as a GID.
func (*Project) GetModelType ¶ added in v0.41.0
GetModelType returns the model type
func (*Project) GetOrgName ¶
GetOrgName returns the org name for the project
func (*Project) ResolveMetadata ¶
ResolveMetadata resolves the metadata fields for cursor-based pagination
type ProjectVariable ¶
type ProjectVariable struct {
Key string
Value string
EnvironmentScope string
PipelineType PipelineType
CreatedBy string
ProjectID string
Metadata ResourceMetadata
}
ProjectVariable represents a Phobos project variable
func (*ProjectVariable) FQN ¶
func (pv *ProjectVariable) FQN() string
FQN returns a fully qualified name for the project variable
func (*ProjectVariable) GetGlobalID ¶ added in v0.41.0
func (pv *ProjectVariable) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*ProjectVariable) GetID ¶ added in v0.41.0
func (pv *ProjectVariable) GetID() string
GetID returns the Metadata ID.
func (*ProjectVariable) GetModelType ¶ added in v0.41.0
func (pv *ProjectVariable) GetModelType() types.ModelType
GetModelType returns the model type
func (*ProjectVariable) ResolveMetadata ¶
func (pv *ProjectVariable) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*ProjectVariable) Validate ¶
func (pv *ProjectVariable) Validate() error
Validate returns an error if the model is not valid
type ProjectVariableSet ¶
type ProjectVariableSet struct {
ProjectID string
Revision string
Latest bool
Metadata ResourceMetadata
}
ProjectVariableSet represents a Phobos project variable set
func (*ProjectVariableSet) GetGlobalID ¶ added in v0.41.0
func (pvs *ProjectVariableSet) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*ProjectVariableSet) GetID ¶ added in v0.41.0
func (pvs *ProjectVariableSet) GetID() string
GetID returns the Metadata ID.
func (*ProjectVariableSet) GetModelType ¶ added in v0.41.0
func (pvs *ProjectVariableSet) GetModelType() types.ModelType
GetModelType returns the model type
func (*ProjectVariableSet) ResolveMetadata ¶
func (pvs *ProjectVariableSet) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*ProjectVariableSet) Validate ¶ added in v0.41.0
func (pvs *ProjectVariableSet) Validate() error
Validate returns an error if the model is not valid
type Release ¶
type Release struct {
DueDate *time.Time
SemanticVersion string
ProjectID string
CreatedBy string
LifecyclePRN string
Metadata ResourceMetadata
UserParticipantIDs []string
TeamParticipantIDs []string
PreRelease bool
Latest bool
}
Release is composed of a set of assets, a snapshot of the automation used to deploy the assets, and the state of the automation
func (*Release) GetGlobalID ¶ added in v0.41.0
GetGlobalID returns the Metadata ID as a GID.
func (*Release) GetModelType ¶ added in v0.41.0
GetModelType returns the model type
func (*Release) ResolveMetadata ¶
ResolveMetadata resolves the metadata fields for cursor-based pagination
type ReleaseLifecycle ¶
type ReleaseLifecycle struct {
Scope ScopeType
OrganizationID string // required (global scope not allowed)
ProjectID *string // required if project scope; must be nil if org scope
Name string
CreatedBy string
LifecycleTemplateID string
EnvironmentNames []string
Metadata ResourceMetadata
}
ReleaseLifecycle represents a Phobos release lifecycle.
func (*ReleaseLifecycle) GetGlobalID ¶ added in v0.41.0
func (r *ReleaseLifecycle) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*ReleaseLifecycle) GetID ¶ added in v0.41.0
func (r *ReleaseLifecycle) GetID() string
GetID returns the Metadata ID.
func (*ReleaseLifecycle) GetModelType ¶ added in v0.41.0
func (r *ReleaseLifecycle) GetModelType() types.ModelType
GetModelType returns the model type
func (*ReleaseLifecycle) GetOrgName ¶
func (r *ReleaseLifecycle) GetOrgName() string
GetOrgName returns the org name
func (*ReleaseLifecycle) ResolveMetadata ¶
func (r *ReleaseLifecycle) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*ReleaseLifecycle) Validate ¶
func (r *ReleaseLifecycle) Validate() error
Validate validates the ReleaseLifecycle model
type ResourceLimit ¶
type ResourceLimit struct {
Name string
Metadata ResourceMetadata
Value int
}
ResourceLimit represents a resource limit
func (*ResourceLimit) GetGlobalID ¶ added in v0.41.0
func (r *ResourceLimit) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*ResourceLimit) GetID ¶ added in v0.41.0
func (r *ResourceLimit) GetID() string
GetID returns the Metadata ID.
func (*ResourceLimit) GetModelType ¶ added in v0.41.0
func (r *ResourceLimit) GetModelType() types.ModelType
GetModelType returns the model type
func (*ResourceLimit) ResolveMetadata ¶ added in v0.41.0
func (r *ResourceLimit) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*ResourceLimit) Validate ¶ added in v0.41.0
func (r *ResourceLimit) Validate() error
Validate returns an error if the model is not valid
type ResourceMetadata ¶
type ResourceMetadata struct {
CreationTimestamp *time.Time `json:"createdAt"`
LastUpdatedTimestamp *time.Time `json:"updatedAt,omitempty"`
ID string `json:"id"`
PRN string `json:"prn"`
Version int `json:"version"`
}
ResourceMetadata contains metadata for a particular resource
type Role ¶
type Role struct {
Name string
Description string
CreatedBy string
Metadata ResourceMetadata
// contains filtered or unexported fields
}
Role defines a subject's ability to access or modify resources within Phobos. It provides a set of permissions that dictate which resources can be viewed or modified.
func (*Role) GetGlobalID ¶ added in v0.41.0
GetGlobalID returns the Metadata ID as a GID.
func (*Role) GetModelType ¶ added in v0.41.0
GetModelType returns the model type
func (*Role) GetPermissions ¶
func (r *Role) GetPermissions() []Permission
GetPermissions returns permissions for a role.
func (*Role) ResolveMetadata ¶
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*Role) SetPermissions ¶
func (r *Role) SetPermissions(perms []Permission)
SetPermissions sets permissions for a role.
type SCIMToken ¶
type SCIMToken struct {
Nonce string
CreatedBy string
Metadata ResourceMetadata
}
SCIMToken represents a SCIM token.
func (*SCIMToken) GetGlobalID ¶ added in v0.41.0
GetGlobalID returns the Metadata ID as a GID.
func (*SCIMToken) GetModelType ¶ added in v0.41.0
GetModelType returns the model type
func (*SCIMToken) ResolveMetadata ¶ added in v0.41.0
ResolveMetadata resolves the metadata fields for cursor-based pagination
type ScopeType ¶
type ScopeType string
ScopeType defines an enum representing the level at which a resource is available.
type ServiceAccount ¶
type ServiceAccount struct {
Metadata ResourceMetadata
Scope ScopeType
OrganizationID *string // required if org or project scope
ProjectID *string // required if project scope; must be nil if org scope
Name string
Description string
CreatedBy string
OIDCTrustPolicies []OIDCTrustPolicy
}
ServiceAccount provides M2M authentication
func (*ServiceAccount) GetGlobalID ¶ added in v0.41.0
func (s *ServiceAccount) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*ServiceAccount) GetID ¶ added in v0.41.0
func (s *ServiceAccount) GetID() string
GetID returns the Metadata ID.
func (*ServiceAccount) GetModelType ¶ added in v0.41.0
func (s *ServiceAccount) GetModelType() types.ModelType
GetModelType returns the model type
func (*ServiceAccount) ResolveMetadata ¶
func (s *ServiceAccount) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*ServiceAccount) Validate ¶
func (s *ServiceAccount) Validate() error
Validate returns an error if the model is not valid
type Team ¶
type Team struct {
SCIMExternalID *string
Name string
Description string
Metadata ResourceMetadata
}
Team represents a team of (human) users
func (*Team) GetGlobalID ¶ added in v0.41.0
GetGlobalID returns the Metadata ID as a GID.
func (*Team) GetModelType ¶ added in v0.41.0
GetModelType returns the model type
func (*Team) ResolveMetadata ¶
ResolveMetadata resolves the metadata fields for cursor-based pagination
type TeamMember ¶
type TeamMember struct {
UserID string
TeamID string
Metadata ResourceMetadata
IsMaintainer bool
}
TeamMember represents an association between a (human) user and a Team
func (*TeamMember) GetGlobalID ¶ added in v0.41.0
func (t *TeamMember) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*TeamMember) GetID ¶ added in v0.41.0
func (t *TeamMember) GetID() string
GetID returns the Metadata ID.
func (*TeamMember) GetModelType ¶ added in v0.41.0
func (t *TeamMember) GetModelType() types.ModelType
GetModelType returns the model type
func (*TeamMember) ResolveMetadata ¶
func (t *TeamMember) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*TeamMember) Validate ¶ added in v0.41.0
func (t *TeamMember) Validate() error
Validate returns an error if the model is not valid
type Thread ¶
type Thread struct {
PipelineID *string
ReleaseID *string
Metadata ResourceMetadata
}
Thread represents a collection of comments.
func (*Thread) GetGlobalID ¶ added in v0.41.0
GetGlobalID returns the Metadata ID as a GID.
func (*Thread) GetModelType ¶ added in v0.41.0
GetModelType returns the model type
func (*Thread) ResolveMetadata ¶
ResolveMetadata resolves the metadata fields for cursor-based pagination
type ToDoItem ¶
type ToDoItem struct {
Payload []byte
UserIDs []string
TeamIDs []string
ResolvedByUsers []string
ProjectID *string
OrganizationID string
TargetID string
TargetType ToDoItemTargetType
Metadata ResourceMetadata
AutoResolved bool
Resolvable bool
}
ToDoItem represents a TODO item resource.
func (*ToDoItem) GetGlobalID ¶ added in v0.41.0
GetGlobalID returns the Metadata ID as a GID.
func (*ToDoItem) GetModelType ¶ added in v0.41.0
GetModelType returns the model type
func (*ToDoItem) IsResolved ¶
IsResolved returns true if the item was resolved.
func (*ToDoItem) ResolveMetadata ¶
ResolveMetadata resolves the metadata fields for cursor-based pagination
type ToDoItemPipelineTaskApprovalPayload ¶
type ToDoItemPipelineTaskApprovalPayload struct {
TaskPath string `json:"taskPath"`
}
ToDoItemPipelineTaskApprovalPayload represents the payload of a pipeline task approval item.
type ToDoItemTargetType ¶
type ToDoItemTargetType string
ToDoItemTargetType represents the target type of a TODO item.
const ( PipelineApprovalTarget ToDoItemTargetType = "PIPELINE_APPROVAL" TaskApprovalTarget ToDoItemTargetType = "TASK_APPROVAL" )
ToDoItemTargetType constants.
type User ¶
type User struct {
SCIMExternalID *string
Username string
Email string
Metadata ResourceMetadata
Admin bool
Active bool
}
User represents a human user account
func (*User) GetGlobalID ¶ added in v0.41.0
GetGlobalID returns the Metadata ID as a GID.
func (*User) GetModelType ¶ added in v0.41.0
GetModelType returns the model type
func (*User) ResolveMetadata ¶
ResolveMetadata resolves the metadata fields for cursor-based pagination
type VCSProvider ¶
type VCSProvider struct {
OAuthAccessTokenExpiresAt *time.Time
URL url.URL
CreatedBy string
Name string
Description string
OrganizationID string
Type VCSProviderType
Scope ScopeType
AuthType VCSProviderAuthType
OAuthClientSecret *string
OAuthClientID *string
OAuthState *string
OAuthAccessToken *string
OAuthRefreshToken *string
PersonalAccessToken *string
ProjectID *string
ExtraOAuthScopes []string
AuthFlowStartedAt *time.Time
Metadata ResourceMetadata
}
VCSProvider represents a Version Control System provider.
func (*VCSProvider) GetGlobalID ¶ added in v0.41.0
func (v *VCSProvider) GetGlobalID() string
GetGlobalID returns the Metadata ID as a GID.
func (*VCSProvider) GetID ¶ added in v0.41.0
func (v *VCSProvider) GetID() string
GetID returns the Metadata ID.
func (*VCSProvider) GetModelType ¶ added in v0.41.0
func (v *VCSProvider) GetModelType() types.ModelType
GetModelType returns the model type
func (*VCSProvider) GetOrgName ¶
func (v *VCSProvider) GetOrgName() string
GetOrgName returns the org name
func (*VCSProvider) ResolveMetadata ¶
func (v *VCSProvider) ResolveMetadata(key string) (*string, error)
ResolveMetadata resolves the metadata fields for cursor-based pagination
func (*VCSProvider) Validate ¶
func (v *VCSProvider) Validate() error
Validate returns an error if the model is not valid
type VCSProviderAuthType ¶
type VCSProviderAuthType string
VCSProviderAuthType represents the auth type a VCS provider uses.
const ( AccessTokenType VCSProviderAuthType = "ACCESS_TOKEN" OAuthType VCSProviderAuthType = "OAUTH" )
VCSProviderAuthType enums.
type VCSProviderType ¶
type VCSProviderType string
VCSProviderType represents the vcs provider type.
const ( GitHubType VCSProviderType = "GITHUB" GitLabType VCSProviderType = "GITLAB" )
VCSProviderType enums.
type VariableCategory ¶
type VariableCategory string
VariableCategory is the type of variable category
const ( HCLVariable VariableCategory = "HCL" EnvironmentVariable VariableCategory = "ENVIRONMENT" )
VariableCategory constants
Source Files
¶
- activity_event.go
- agent.go
- agent_session.go
- announcement.go
- approval_rule.go
- asymsigningkey.go
- comment.go
- environment.go
- environment_rule.go
- job.go
- lifecycle_template.go
- logstream.go
- maintenancemode.go
- membership.go
- metric.go
- models.go
- organization.go
- permission.go
- pipeline.go
- pipeline_action_output.go
- pipeline_approval.go
- pipeline_template.go
- plugin.go
- plugin_platform.go
- plugin_version.go
- project.go
- release.go
- release_lifecycle.go
- resource.go
- resourcelimit.go
- role.go
- scim.go
- serviceaccount.go
- team.go
- teammember.go
- todo_item.go
- user.go
- variable.go
- vcs_provider.go