Documentation ¶
Overview ¶
Status types for CI.
Index ¶
- Constants
- Variables
- func GetAllCheckPayloadTypes() ([]CheckPayloadKind, CheckPayloadKind)
- func GetAllCheckStatuses() ([]CheckStatus, CheckStatus)
- func GetAllJobStates() ([]JobState, JobState)
- func GetAllLabelActivityTypes() ([]PullReqLabelActivityType, PullReqLabelActivityType)
- func GetAllLabelColors() ([]LabelColor, LabelColor)
- func GetAllLabelTypes() ([]LabelType, LabelType)
- func GetAllMembershipRoles() ([]MembershipRole, MembershipRole)
- func GetAllMembershipSpaceSorts() ([]MembershipSpaceSort, MembershipSpaceSort)
- func GetAllMembershipUserSorts() ([]MembershipUserSort, MembershipUserSort)
- func GetAllPrincipalTypes() ([]PrincipalType, PrincipalType)
- func GetAllPublicKeySorts() ([]PublicKeySort, PublicKeySort)
- func GetAllPublicKeyUsages() ([]PublicKeyUsage, PublicKeyUsage)
- func GetAllPullReqActivityKinds() ([]PullReqActivityKind, PullReqActivityKind)
- func GetAllPullReqActivityTypes() ([]PullReqActivityType, PullReqActivityType)
- func GetAllPullReqCommentStatuses() ([]PullReqCommentStatus, PullReqCommentStatus)
- func GetAllPullReqReviewDecisions() ([]PullReqReviewDecision, PullReqReviewDecision)
- func GetAllPullReqReviewerTypes() ([]PullReqReviewerType, PullReqReviewerType)
- func GetAllPullReqSorts() ([]PullReqSort, PullReqSort)
- func GetAllPullReqStates() ([]PullReqState, PullReqState)
- func GetAllRuleSorts() ([]RuleSort, RuleSort)
- func GetAllRuleStates() ([]RuleState, RuleState)
- func GetAllTriggerActions() ([]TriggerAction, TriggerAction)
- func GetAllWebhookTriggers() ([]WebhookTrigger, WebhookTrigger)
- func Sanitize[E constraints.Ordered](element E, all func() ([]E, E)) (E, bool)
- type BranchSortOption
- type CIStatus
- type CheckPayloadKind
- type CheckStatus
- type CodeOwnerViolationCode
- type ContentEncodingType
- type GitServiceType
- type GitspaceAccessType
- type GitspaceActionType
- type GitspaceCodeRepoType
- type GitspaceEntityType
- type GitspaceEventType
- type GitspaceInstanceStateType
- type GitspaceStateType
- type IDEType
- type InfraEvent
- type InfraProviderType
- type InfraProvisioningType
- type InfraStatus
- type JobPriority
- type JobState
- type LabelColor
- type LabelType
- type MembershipRole
- type MembershipSpaceSort
- type MembershipUserSort
- type MergeCheckStatus
- type MergeMethod
- type Order
- type ParentResourceType
- type Permission
- type PrincipalType
- type PublicKeySort
- type PublicKeyUsage
- type PublicResourceType
- type PullReqActivityKind
- type PullReqActivityType
- type PullReqCommentStatus
- type PullReqLabelActivityType
- type PullReqReviewDecision
- type PullReqReviewerType
- type PullReqSort
- type PullReqState
- type RepoAttr
- type RepoState
- type ResolverKind
- type ResolverType
- type ResourceType
- type RuleSort
- type RuleState
- type SSEType
- type ScmType
- type SettingsScope
- type SpaceAttr
- type TagSortOption
- type TokenType
- type TriggerAction
- type TriggerEvent
- type UserAttr
- type WebhookAttr
- type WebhookExecutionResult
- type WebhookParent
- type WebhookTrigger
Constants ¶
const ( PullReqSortNumber = "number" PullReqSortCreated = "created" PullReqSortEdited = "edited" PullReqSortMerged = "merged" PullReqSortUpdated = "updated" )
PullReqSort enumeration.
const ( MergeMethodMerge = MergeMethod(gitenum.MergeMethodMerge) MergeMethodSquash = MergeMethod(gitenum.MergeMethodSquash) MergeMethodRebase = MergeMethod(gitenum.MergeMethodRebase) )
MergeMethod enumeration.
const ( TriggerHook = "@hook" TriggerCron = "@cron" )
Trigger types.
const ( TriggerEventCron = "cron" TriggerEventManual = "manual" TriggerEventPush = "push" TriggerEventPullRequest = "pull_request" TriggerEventTag = "tag" )
Hook event constants.
Variables ¶
var LabelActivityTypes = sortEnum([]PullReqLabelActivityType{ LabelActivityAssign, LabelActivityUnassign, LabelActivityReassign, LabelActivityNoop, })
var LabelColors = sortEnum([]LabelColor{ LabelColorBackground, LabelColorStroke, LabelColorText, LabelColorAccent, LabelColorRed, LabelColorGreen, LabelColorYellow, LabelColorBlue, LabelColorPink, LabelColorPurple, LabelColorViolet, LabelColorIndigo, LabelColorCyan, LabelColorOrange, LabelColorBrown, LabelColorMint, LabelColorLime, })
var LabelTypes = sortEnum([]LabelType{ LabelTypeStatic, LabelTypeDynamic, })
var MembershipRoles = sortEnum([]MembershipRole{ MembershipRoleReader, MembershipRoleExecutor, MembershipRoleContributor, MembershipRoleSpaceOwner, })
var MergeMethods = sortEnum([]MergeMethod{ MergeMethodMerge, MergeMethodSquash, MergeMethodRebase, })
Functions ¶
func GetAllCheckPayloadTypes ¶
func GetAllCheckPayloadTypes() ([]CheckPayloadKind, CheckPayloadKind)
func GetAllCheckStatuses ¶
func GetAllCheckStatuses() ([]CheckStatus, CheckStatus)
func GetAllJobStates ¶
func GetAllLabelActivityTypes ¶
func GetAllLabelActivityTypes() ([]PullReqLabelActivityType, PullReqLabelActivityType)
func GetAllLabelColors ¶
func GetAllLabelColors() ([]LabelColor, LabelColor)
func GetAllLabelTypes ¶
func GetAllMembershipRoles ¶
func GetAllMembershipRoles() ([]MembershipRole, MembershipRole)
func GetAllMembershipSpaceSorts ¶
func GetAllMembershipSpaceSorts() ([]MembershipSpaceSort, MembershipSpaceSort)
func GetAllMembershipUserSorts ¶
func GetAllMembershipUserSorts() ([]MembershipUserSort, MembershipUserSort)
func GetAllPrincipalTypes ¶
func GetAllPrincipalTypes() ([]PrincipalType, PrincipalType)
func GetAllPublicKeySorts ¶
func GetAllPublicKeySorts() ([]PublicKeySort, PublicKeySort)
func GetAllPublicKeyUsages ¶
func GetAllPublicKeyUsages() ([]PublicKeyUsage, PublicKeyUsage)
func GetAllPullReqActivityKinds ¶
func GetAllPullReqActivityKinds() ([]PullReqActivityKind, PullReqActivityKind)
func GetAllPullReqActivityTypes ¶
func GetAllPullReqActivityTypes() ([]PullReqActivityType, PullReqActivityType)
func GetAllPullReqCommentStatuses ¶
func GetAllPullReqCommentStatuses() ([]PullReqCommentStatus, PullReqCommentStatus)
func GetAllPullReqReviewDecisions ¶
func GetAllPullReqReviewDecisions() ([]PullReqReviewDecision, PullReqReviewDecision)
func GetAllPullReqReviewerTypes ¶
func GetAllPullReqReviewerTypes() ([]PullReqReviewerType, PullReqReviewerType)
func GetAllPullReqSorts ¶
func GetAllPullReqSorts() ([]PullReqSort, PullReqSort)
func GetAllPullReqStates ¶
func GetAllPullReqStates() ([]PullReqState, PullReqState)
func GetAllRuleSorts ¶
func GetAllRuleStates ¶
func GetAllTriggerActions ¶
func GetAllTriggerActions() ([]TriggerAction, TriggerAction)
func GetAllWebhookTriggers ¶
func GetAllWebhookTriggers() ([]WebhookTrigger, WebhookTrigger)
func Sanitize ¶
func Sanitize[E constraints.Ordered](element E, all func() ([]E, E)) (E, bool)
Types ¶
type BranchSortOption ¶
type BranchSortOption int
BranchSortOption specifies the available sort options for branches.
const ( BranchSortOptionDefault BranchSortOption = iota BranchSortOptionName BranchSortOptionDate )
func ParseBranchSortOption ¶
func ParseBranchSortOption(s string) BranchSortOption
ParseBranchSortOption parses the branch sort option string and returns the equivalent enumeration.
func (BranchSortOption) String ¶
func (o BranchSortOption) String() string
String returns a string representation of the branch sort option.
type CIStatus ¶
type CIStatus string
CIStatus defines the different kinds of CI statuses for stages, steps and executions.
const ( CIStatusSkipped CIStatus = "skipped" CIStatusBlocked CIStatus = "blocked" CIStatusDeclined CIStatus = "declined" CIStatusWaitingOnDeps CIStatus = "waiting_on_dependencies" CIStatusPending CIStatus = "pending" CIStatusRunning CIStatus = "running" CIStatusSuccess CIStatus = "success" CIStatusFailure CIStatus = "failure" CIStatusKilled CIStatus = "killed" CIStatusError CIStatus = "error" )
func ParseCIStatus ¶
ParseCIStatus converts the status from a string to typed enum. If the match is not exact, will just return default error status instead of explicitly returning not found error.
func (CIStatus) ConvertToCheckStatus ¶
func (status CIStatus) ConvertToCheckStatus() CheckStatus
type CheckPayloadKind ¶
type CheckPayloadKind string
CheckPayloadKind defines status payload type.
const ( CheckPayloadKindEmpty CheckPayloadKind = "" CheckPayloadKindRaw CheckPayloadKind = "raw" CheckPayloadKindMarkdown CheckPayloadKind = "markdown" CheckPayloadKindPipeline CheckPayloadKind = "pipeline" )
CheckPayloadKind enumeration.
func (CheckPayloadKind) Enum ¶
func (CheckPayloadKind) Enum() []interface{}
func (CheckPayloadKind) Sanitize ¶
func (s CheckPayloadKind) Sanitize() (CheckPayloadKind, bool)
type CheckStatus ¶
type CheckStatus string
CheckStatus defines status check status.
const ( CheckStatusPending CheckStatus = "pending" CheckStatusRunning CheckStatus = "running" CheckStatusSuccess CheckStatus = "success" CheckStatusFailure CheckStatus = "failure" CheckStatusError CheckStatus = "error" )
CheckStatus enumeration.
func (CheckStatus) Enum ¶
func (CheckStatus) Enum() []interface{}
func (CheckStatus) IsCompleted ¶
func (s CheckStatus) IsCompleted() bool
func (CheckStatus) Sanitize ¶
func (s CheckStatus) Sanitize() (CheckStatus, bool)
type CodeOwnerViolationCode ¶
type CodeOwnerViolationCode string
const ( // CodeOwnerViolationCodeUserNotFound occurs when user in codeowners file is not present. CodeOwnerViolationCodeUserNotFound CodeOwnerViolationCode = "user_not_found" // CodeOwnerViolationCodePatternInvalid occurs when a pattern in codeowners file is incorrect. CodeOwnerViolationCodePatternInvalid CodeOwnerViolationCode = "pattern_invalid" // CodeOwnerViolationCodePatternEmpty occurs when a pattern in codeowners file is empty. CodeOwnerViolationCodePatternEmpty CodeOwnerViolationCode = "pattern_empty" )
func (CodeOwnerViolationCode) Enum ¶
func (CodeOwnerViolationCode) Enum() []interface{}
type ContentEncodingType ¶
type ContentEncodingType string
ContentEncodingType describes the encoding of content.
const ( // ContentEncodingTypeUTF8 describes utf-8 encoded content. ContentEncodingTypeUTF8 ContentEncodingType = "utf8" // ContentEncodingTypeBase64 describes base64 encoded content. ContentEncodingTypeBase64 ContentEncodingType = "base64" )
func (ContentEncodingType) Enum ¶
func (ContentEncodingType) Enum() []interface{}
type GitServiceType ¶
type GitServiceType string
GitServiceType represents the different types of service values send by git's smart http protocol. See https://git-scm.com/docs/http-protocol#_smart_clients for more details.
const ( // GitServiceTypeReceivePack is sent by git push operations (server "receives" data from client). GitServiceTypeReceivePack GitServiceType = "receive-pack" // GitServiceTypeUploadPack is sent by git pull operations (server "uploads" data to client). GitServiceTypeUploadPack GitServiceType = "upload-pack" )
func ParseGitServiceType ¶
func ParseGitServiceType(s string) (GitServiceType, error)
ParseGitServiceType parses the git service type string and returns the equivalent enumeration. If the value is unknown and doesn't represent a git service type, an error is returned.
type GitspaceAccessType ¶
type GitspaceAccessType string
const ( GitspaceAccessTypeJWTToken GitspaceAccessType = "jwt_token" GitspaceAccessTypeUserCredentials GitspaceAccessType = "user_credentials" GitspaceAccessTypeSSHKey GitspaceAccessType = "ssh_key" )
func (GitspaceAccessType) Enum ¶
func (GitspaceAccessType) Enum() []interface{}
type GitspaceActionType ¶
type GitspaceActionType string
const ( GitspaceActionTypeStart GitspaceActionType = "start" GitspaceActionTypeStop GitspaceActionType = "stop" )
func (GitspaceActionType) Enum ¶
func (GitspaceActionType) Enum() []interface{}
type GitspaceCodeRepoType ¶
type GitspaceCodeRepoType string
const ( CodeRepoTypeGithub GitspaceCodeRepoType = "github" CodeRepoTypeGitlab GitspaceCodeRepoType = "gitlab" CodeRepoTypeGitness GitspaceCodeRepoType = "gitness" CodeRepoTypeHarnessCode GitspaceCodeRepoType = "harness_code" CodeRepoTypeBitbucket GitspaceCodeRepoType = "bitbucket" CodeRepoTypeUnknown GitspaceCodeRepoType = "unknown" )
func (GitspaceCodeRepoType) Enum ¶
func (GitspaceCodeRepoType) Enum() []interface{}
type GitspaceEntityType ¶
type GitspaceEntityType string
const ( GitspaceEntityTypeGitspaceConfig GitspaceEntityType = "gitspace_config" GitspaceEntityTypeGitspaceInstance GitspaceEntityType = "gitspace_instance" )
func (GitspaceEntityType) Enum ¶
func (GitspaceEntityType) Enum() []interface{}
type GitspaceEventType ¶
type GitspaceEventType string
const ( // Start action events. GitspaceEventTypeGitspaceActionStart GitspaceEventType = "gitspace_action_start" GitspaceEventTypeGitspaceActionStartCompleted GitspaceEventType = "gitspace_action_start_completed" GitspaceEventTypeGitspaceActionStartFailed GitspaceEventType = "gitspace_action_start_failed" // Stop action events. GitspaceEventTypeGitspaceActionStop GitspaceEventType = "gitspace_action_stop" GitspaceEventTypeGitspaceActionStopCompleted GitspaceEventType = "gitspace_action_stop_completed" GitspaceEventTypeGitspaceActionStopFailed GitspaceEventType = "gitspace_action_stop_failed" // Fetch devcontainer config events. GitspaceEventTypeFetchDevcontainerStart GitspaceEventType = "fetch_devcontainer_start" GitspaceEventTypeFetchDevcontainerCompleted GitspaceEventType = "fetch_devcontainer_completed" GitspaceEventTypeFetchDevcontainerFailed GitspaceEventType = "fetch_devcontainer_failed" // Infra provisioning events. GitspaceEventTypeInfraProvisioningStart GitspaceEventType = "infra_provisioning_start" GitspaceEventTypeInfraProvisioningCompleted GitspaceEventType = "infra_provisioning_completed" GitspaceEventTypeInfraProvisioningFailed GitspaceEventType = "infra_provisioning_failed" // Infra stop events. GitspaceEventTypeInfraStopStart GitspaceEventType = "infra_stop_start" GitspaceEventTypeInfraStopCompleted GitspaceEventType = "infra_stop_completed" GitspaceEventTypeInfraStopFailed GitspaceEventType = "infra_stop_failed" // Infra deprovisioning events. GitspaceEventTypeInfraDeprovisioningStart GitspaceEventType = "infra_deprovisioning_start" GitspaceEventTypeInfraDeprovisioningCompleted GitspaceEventType = "infra_deprovisioning_completed" GitspaceEventTypeInfraDeprovisioningFailed GitspaceEventType = "infra_deprovisioning_failed" // Agent connection events. GitspaceEventTypeAgentConnectStart GitspaceEventType = "agent_connect_start" GitspaceEventTypeAgentConnectCompleted GitspaceEventType = "agent_connect_completed" GitspaceEventTypeAgentConnectFailed GitspaceEventType = "agent_connect_failed" // Gitspace creation events. GitspaceEventTypeAgentGitspaceCreationStart GitspaceEventType = "agent_gitspace_creation_start" GitspaceEventTypeAgentGitspaceCreationCompleted GitspaceEventType = "agent_gitspace_creation_completed" GitspaceEventTypeAgentGitspaceCreationFailed GitspaceEventType = "agent_gitspace_creation_failed" // Gitspace stop events. GitspaceEventTypeAgentGitspaceStopStart GitspaceEventType = "agent_gitspace_stop_start" GitspaceEventTypeAgentGitspaceStopCompleted GitspaceEventType = "agent_gitspace_stop_completed" GitspaceEventTypeAgentGitspaceStopFailed GitspaceEventType = "agent_gitspace_stop_failed" // Gitspace deletion events. GitspaceEventTypeAgentGitspaceDeletionStart GitspaceEventType = "agent_gitspace_deletion_start" GitspaceEventTypeAgentGitspaceDeletionCompleted GitspaceEventType = "agent_gitspace_deletion_completed" GitspaceEventTypeAgentGitspaceDeletionFailed GitspaceEventType = "agent_gitspace_deletion_failed" // Gitspace state events. GitspaceEventTypeAgentGitspaceStateReportRunning GitspaceEventType = "agent_gitspace_state_report_running" GitspaceEventTypeAgentGitspaceStateReportError GitspaceEventType = "agent_gitspace_state_report_error" GitspaceEventTypeAgentGitspaceStateReportStopped GitspaceEventType = "agent_gitspace_state_report_stopped" GitspaceEventTypeAgentGitspaceStateReportUnknown GitspaceEventType = "agent_gitspace_state_report_unknown" )
func (GitspaceEventType) Enum ¶
func (GitspaceEventType) Enum() []interface{}
type GitspaceInstanceStateType ¶
type GitspaceInstanceStateType string
const ( GitspaceInstanceStateRunning GitspaceInstanceStateType = "running" GitspaceInstanceStateUninitialized GitspaceInstanceStateType = "uninitialized" GitspaceInstanceStateUnknown GitspaceInstanceStateType = "unknown" GitspaceInstanceStateError GitspaceInstanceStateType = "error" GitspaceInstanceStateDeleted GitspaceInstanceStateType = "deleted" GitspaceInstanceStateStarting GitspaceInstanceStateType = "starting" GitspaceInstanceStateStopping GitspaceInstanceStateType = "stopping" )
func (GitspaceInstanceStateType) Enum ¶
func (GitspaceInstanceStateType) Enum() []interface{}
func (GitspaceInstanceStateType) IsBusyStatus ¶
func (g GitspaceInstanceStateType) IsBusyStatus() bool
func (GitspaceInstanceStateType) IsFinalStatus ¶
func (g GitspaceInstanceStateType) IsFinalStatus() bool
type GitspaceStateType ¶
type GitspaceStateType string
const ( GitspaceStateRunning GitspaceStateType = "running" GitspaceStateStopped GitspaceStateType = "stopped" GitspaceStateStarting GitspaceStateType = "starting" GitspaceStateStopping GitspaceStateType = "stopping" GitspaceStateError GitspaceStateType = "error" GitspaceStateUninitialized GitspaceStateType = "uninitialized" )
func GetGitspaceStateFromInstance ¶
func GetGitspaceStateFromInstance( instanceState GitspaceInstanceStateType, ) (GitspaceStateType, error)
func (GitspaceStateType) Enum ¶
func (GitspaceStateType) Enum() []interface{}
type InfraEvent ¶
type InfraEvent string
const ( InfraEventProvision InfraEvent = "provision" InfraEventStop InfraEvent = "stop" InfraEventDeprovision InfraEvent = "deprovision" )
func (InfraEvent) Enum ¶
func (InfraEvent) Enum() []interface{}
type InfraProviderType ¶
type InfraProviderType string
const ( InfraProviderTypeDocker InfraProviderType = "docker" InfraProviderTypeHarnessGCP InfraProviderType = "harness_gcp" )
func (InfraProviderType) Enum ¶
func (InfraProviderType) Enum() []interface{}
type InfraProvisioningType ¶
type InfraProvisioningType string
const ( InfraProvisioningTypeExisting InfraProvisioningType = "existing" InfraProvisioningTypeNew InfraProvisioningType = "new" )
func (InfraProvisioningType) Enum ¶
func (InfraProvisioningType) Enum() []interface{}
type InfraStatus ¶
type InfraStatus string
const ( InfraStatusPending InfraStatus = "pending" InfraStatusProvisioned InfraStatus = "provisioned" InfraStatusDestroyed InfraStatus = "destroyed" InfraStatusMarkedForDestroy InfraStatus = "marked_for_destroy" InfraStatusUnknown InfraStatus = "unknown" InfraStatusSuspended InfraStatus = "suspended" )
func (InfraStatus) Enum ¶
func (InfraStatus) Enum() []interface{}
type JobPriority ¶
type JobPriority int
JobPriority represents priority of a background job.
const ( JobPriorityNormal JobPriority = 0 JobPriorityElevated JobPriority = 1 )
JobPriority enumeration.
type JobState ¶
type JobState string
JobState represents state of a background job.
const ( JobStateScheduled JobState = "scheduled" JobStateRunning JobState = "running" JobStateFinished JobState = "finished" JobStateFailed JobState = "failed" JobStateCanceled JobState = "canceled" )
JobState enumeration.
func (JobState) IsCompleted ¶
type LabelColor ¶
type LabelColor string
const ( LabelColorBackground LabelColor = "background" LabelColorStroke LabelColor = "stroke" LabelColorText LabelColor = "text" LabelColorAccent LabelColor = "accent" LabelColorRed LabelColor = "red" LabelColorGreen LabelColor = "green" LabelColorYellow LabelColor = "yellow" LabelColorBlue LabelColor = "blue" LabelColorPink LabelColor = "pink" LabelColorPurple LabelColor = "purple" LabelColorViolet LabelColor = "violet" LabelColorIndigo LabelColor = "indigo" LabelColorCyan LabelColor = "cyan" LabelColorOrange LabelColor = "orange" LabelColorBrown LabelColor = "brown" LabelColorMint LabelColor = "mint" LabelColorLime LabelColor = "lime" )
func (LabelColor) Enum ¶
func (LabelColor) Enum() []interface{}
func (LabelColor) Sanitize ¶
func (t LabelColor) Sanitize() (LabelColor, bool)
type MembershipRole ¶
type MembershipRole string
MembershipRole represents the different level of space memberships (permission set).
const ( MembershipRoleReader MembershipRole = "reader" MembershipRoleExecutor MembershipRole = "executor" MembershipRoleContributor MembershipRole = "contributor" MembershipRoleSpaceOwner MembershipRole = "space_owner" )
func (MembershipRole) Enum ¶
func (MembershipRole) Enum() []interface{}
func (MembershipRole) Permissions ¶
func (m MembershipRole) Permissions() []Permission
Permissions returns the list of permissions for the role.
func (MembershipRole) Sanitize ¶
func (m MembershipRole) Sanitize() (MembershipRole, bool)
type MembershipSpaceSort ¶
type MembershipSpaceSort string
MembershipSpaceSort represents membership space sort order.
const ( // TODO [CODE-1363]: remove after identifier migration. MembershipSpaceSortUID MembershipSpaceSort = uid MembershipSpaceSortIdentifier MembershipSpaceSort = identifier MembershipSpaceSortCreated MembershipSpaceSort = created )
MembershipSpaceSort enumeration.
func ParseMembershipSpaceSort ¶
func ParseMembershipSpaceSort(s string) MembershipSpaceSort
ParseMembershipSpaceSort parses the membership space sort attribute string and returns the equivalent enumeration.
func (MembershipSpaceSort) Enum ¶
func (MembershipSpaceSort) Enum() []interface{}
func (MembershipSpaceSort) Sanitize ¶
func (s MembershipSpaceSort) Sanitize() (MembershipSpaceSort, bool)
func (MembershipSpaceSort) String ¶
func (s MembershipSpaceSort) String() string
String returns the string representation of the attribute.
type MembershipUserSort ¶
type MembershipUserSort string
MembershipUserSort represents membership user sort order.
const ( MembershipUserSortName MembershipUserSort = name MembershipUserSortCreated MembershipUserSort = created )
MembershipUserSort enumeration.
func ParseMembershipUserSort ¶
func ParseMembershipUserSort(s string) MembershipUserSort
ParseMembershipUserSort parses the membership user sort attribute string and returns the equivalent enumeration.
func (MembershipUserSort) Enum ¶
func (MembershipUserSort) Enum() []interface{}
func (MembershipUserSort) Sanitize ¶
func (s MembershipUserSort) Sanitize() (MembershipUserSort, bool)
func (MembershipUserSort) String ¶
func (s MembershipUserSort) String() string
String returns the string representation of the attribute.
type MergeCheckStatus ¶
type MergeCheckStatus string
const ( // MergeCheckStatusUnchecked merge status has not been checked. MergeCheckStatusUnchecked MergeCheckStatus = "unchecked" // MergeCheckStatusConflict can’t merge into the target branch due to a potential conflict. MergeCheckStatusConflict MergeCheckStatus = "conflict" // MergeCheckStatusMergeable branch can merged cleanly into the target branch. MergeCheckStatusMergeable MergeCheckStatus = "mergeable" )
type MergeMethod ¶
type MergeMethod gitenum.MergeMethod
func (MergeMethod) Enum ¶
func (MergeMethod) Enum() []interface{}
func (MergeMethod) Sanitize ¶
func (m MergeMethod) Sanitize() (MergeMethod, bool)
type Order ¶
type Order int
Order defines the sort order.
func ParseOrder ¶
ParseOrder parses the order string and returns an order enumeration.
type ParentResourceType ¶
type ParentResourceType string
ParentResourceType defines the different types of parent resources.
var ( ParentResourceTypeSpace ParentResourceType = "space" ParentResourceTypeRepo ParentResourceType = "repo" )
func GetAllParentResourceTypes ¶
func GetAllParentResourceTypes() []ParentResourceType
func (ParentResourceType) Enum ¶
func (ParentResourceType) Enum() []interface{}
type Permission ¶
type Permission string
Permission represents the different types of permissions a principal can have.
const ( /* ----- SPACE ----- */ PermissionSpaceView Permission = "space_view" PermissionSpaceEdit Permission = "space_edit" PermissionSpaceDelete Permission = "space_delete" )
const ( /* ----- REPOSITORY ----- */ PermissionRepoView Permission = "repo_view" PermissionRepoEdit Permission = "repo_edit" PermissionRepoDelete Permission = "repo_delete" PermissionRepoPush Permission = "repo_push" PermissionRepoReview Permission = "repo_review" PermissionRepoReportCommitCheck Permission = "repo_reportCommitCheck" )
const ( /* ----- USER ----- */ PermissionUserView Permission = "user_view" PermissionUserEdit Permission = "user_edit" PermissionUserDelete Permission = "user_delete" PermissionUserEditAdmin Permission = "user_editAdmin" )
const ( /* ----- SERVICE ACCOUNT ----- */ PermissionServiceAccountView Permission = "serviceaccount_view" PermissionServiceAccountEdit Permission = "serviceaccount_edit" PermissionServiceAccountDelete Permission = "serviceaccount_delete" )
const ( /* ----- SERVICE ----- */ PermissionServiceView Permission = "service_view" PermissionServiceEdit Permission = "service_edit" PermissionServiceDelete Permission = "service_delete" PermissionServiceEditAdmin Permission = "service_editAdmin" )
const ( /* ----- PIPELINE ----- */ PermissionPipelineView Permission = "pipeline_view" PermissionPipelineEdit Permission = "pipeline_edit" PermissionPipelineDelete Permission = "pipeline_delete" PermissionPipelineExecute Permission = "pipeline_execute" )
const ( /* ----- SECRET ----- */ PermissionSecretView Permission = "secret_view" PermissionSecretEdit Permission = "secret_edit" PermissionSecretDelete Permission = "secret_delete" PermissionSecretAccess Permission = "secret_access" )
const ( /* ----- CONNECTOR ----- */ PermissionConnectorView Permission = "connector_view" PermissionConnectorEdit Permission = "connector_edit" PermissionConnectorDelete Permission = "connector_delete" PermissionConnectorAccess Permission = "connector_access" )
const ( /* ----- TEMPLATE ----- */ PermissionTemplateView Permission = "template_view" PermissionTemplateEdit Permission = "template_edit" PermissionTemplateDelete Permission = "template_delete" PermissionTemplateAccess Permission = "template_access" )
const ( /* ----- GITSPACE ----- */ PermissionGitspaceView Permission = "gitspace_view" PermissionGitspaceEdit Permission = "gitspace_edit" PermissionGitspaceDelete Permission = "gitspace_delete" PermissionGitspaceAccess Permission = "gitspace_access" )
const ( /* ----- INFRAPROVIDER ----- */ PermissionInfraProviderView Permission = "infraprovider_view" PermissionInfraProviderEdit Permission = "infraprovider_edit" PermissionInfraProviderDelete Permission = "infraprovider_delete" PermissionInfraProviderAccess Permission = "infraprovider_access" )
type PrincipalType ¶
type PrincipalType string
PrincipalType defines the supported types of principals.
const ( // PrincipalTypeUser represents a user. PrincipalTypeUser PrincipalType = "user" // PrincipalTypeServiceAccount represents a service account. PrincipalTypeServiceAccount PrincipalType = "serviceaccount" // PrincipalTypeService represents a service. PrincipalTypeService PrincipalType = "service" )
func (PrincipalType) Enum ¶
func (PrincipalType) Enum() []interface{}
func (PrincipalType) Sanitize ¶
func (s PrincipalType) Sanitize() (PrincipalType, bool)
type PublicKeySort ¶
type PublicKeySort string
PublicKeySort is used to specify sorting of public keys.
const ( PublicKeySortCreated PublicKeySort = "created" PublicKeySortIdentifier PublicKeySort = "identifier" )
PublicKeySort enumeration.
func (PublicKeySort) Enum ¶
func (PublicKeySort) Enum() []interface{}
func (PublicKeySort) Sanitize ¶
func (s PublicKeySort) Sanitize() (PublicKeySort, bool)
type PublicKeyUsage ¶
type PublicKeyUsage string
PublicKeyUsage represents usage type of public key.
const ( PublicKeyUsageAuth PublicKeyUsage = "auth" PublicKeyUsageSign PublicKeyUsage = "sign" )
PublicKeyUsage enumeration.
func (PublicKeyUsage) Enum ¶
func (PublicKeyUsage) Enum() []interface{}
func (PublicKeyUsage) Sanitize ¶
func (s PublicKeyUsage) Sanitize() (PublicKeyUsage, bool)
type PublicResourceType ¶
type PublicResourceType string
PublicResourceType defines the type of the public resource.
const ( PublicResourceTypeRepo PublicResourceType = "repository" PublicResourceTypeSpace PublicResourceType = "space" )
func GetAllPublicResourceTypes ¶
func GetAllPublicResourceTypes() []PublicResourceType
func (PublicResourceType) Enum ¶
func (PublicResourceType) Enum() []interface{}
type PullReqActivityKind ¶
type PullReqActivityKind string
PullReqActivityKind defines kind of pull request activity system message. Kind defines the source of the pull request activity entry: Whether it's generated by the system, it's a user comment or a part of code review.
const ( PullReqActivityKindSystem PullReqActivityKind = "system" PullReqActivityKindComment PullReqActivityKind = "comment" PullReqActivityKindChangeComment PullReqActivityKind = "change-comment" )
PullReqActivityKind enumeration.
func (PullReqActivityKind) Enum ¶
func (PullReqActivityKind) Enum() []interface{}
func (PullReqActivityKind) Sanitize ¶
func (k PullReqActivityKind) Sanitize() (PullReqActivityKind, bool)
type PullReqActivityType ¶
type PullReqActivityType string
PullReqActivityType defines pull request activity message type. Essentially, the Type determines the structure of the pull request activity's Payload structure.
const ( PullReqActivityTypeComment PullReqActivityType = "comment" PullReqActivityTypeCodeComment PullReqActivityType = "code-comment" PullReqActivityTypeTitleChange PullReqActivityType = "title-change" PullReqActivityTypeStateChange PullReqActivityType = "state-change" PullReqActivityTypeReviewSubmit PullReqActivityType = "review-submit" PullReqActivityTypeReviewerDelete PullReqActivityType = "reviewer-delete" PullReqActivityTypeBranchUpdate PullReqActivityType = "branch-update" PullReqActivityTypeBranchDelete PullReqActivityType = "branch-delete" PullReqActivityTypeMerge PullReqActivityType = "merge" PullReqActivityTypeLabelModify PullReqActivityType = "label-modify" )
PullReqActivityType enumeration.
func (PullReqActivityType) Enum ¶
func (PullReqActivityType) Enum() []interface{}
func (PullReqActivityType) Sanitize ¶
func (t PullReqActivityType) Sanitize() (PullReqActivityType, bool)
type PullReqCommentStatus ¶
type PullReqCommentStatus string
PullReqCommentStatus defines status of a pull request comment.
const ( PullReqCommentStatusActive PullReqCommentStatus = "active" PullReqCommentStatusResolved PullReqCommentStatus = "resolved" )
PullReqCommentStatus enumeration.
func (PullReqCommentStatus) Enum ¶
func (PullReqCommentStatus) Enum() []interface{}
func (PullReqCommentStatus) Sanitize ¶
func (s PullReqCommentStatus) Sanitize() (PullReqCommentStatus, bool)
type PullReqLabelActivityType ¶
type PullReqLabelActivityType string
const ( LabelActivityAssign PullReqLabelActivityType = "assign" LabelActivityUnassign PullReqLabelActivityType = "unassign" LabelActivityReassign PullReqLabelActivityType = "reassign" LabelActivityNoop PullReqLabelActivityType = "noop" )
func (PullReqLabelActivityType) Enum ¶
func (PullReqLabelActivityType) Enum() []interface{}
func (PullReqLabelActivityType) Sanitize ¶
func (t PullReqLabelActivityType) Sanitize() (PullReqLabelActivityType, bool)
type PullReqReviewDecision ¶
type PullReqReviewDecision string
PullReqReviewDecision defines state of a pull request review.
const ( PullReqReviewDecisionPending PullReqReviewDecision = "pending" PullReqReviewDecisionReviewed PullReqReviewDecision = "reviewed" PullReqReviewDecisionApproved PullReqReviewDecision = "approved" PullReqReviewDecisionChangeReq PullReqReviewDecision = "changereq" )
PullReqReviewDecision enumeration.
func (PullReqReviewDecision) Enum ¶
func (PullReqReviewDecision) Enum() []interface{}
func (PullReqReviewDecision) Sanitize ¶
func (decision PullReqReviewDecision) Sanitize() (PullReqReviewDecision, bool)
type PullReqReviewerType ¶
type PullReqReviewerType string
PullReqReviewerType defines type of a pull request reviewer.
const ( PullReqReviewerTypeRequested PullReqReviewerType = "requested" PullReqReviewerTypeAssigned PullReqReviewerType = "assigned" PullReqReviewerTypeSelfAssigned PullReqReviewerType = "self_assigned" )
PullReqReviewerType enumeration.
func (PullReqReviewerType) Enum ¶
func (PullReqReviewerType) Enum() []interface{}
func (PullReqReviewerType) Sanitize ¶
func (reviewerType PullReqReviewerType) Sanitize() (PullReqReviewerType, bool)
type PullReqSort ¶
type PullReqSort string
PullReqSort defines pull request attribute that can be used for sorting.
func (PullReqSort) Enum ¶
func (PullReqSort) Enum() []interface{}
func (PullReqSort) Sanitize ¶
func (s PullReqSort) Sanitize() (PullReqSort, bool)
type PullReqState ¶
type PullReqState string
PullReqState defines pull request state.
const ( PullReqStateOpen PullReqState = "open" PullReqStateMerged PullReqState = "merged" PullReqStateClosed PullReqState = "closed" )
PullReqState enumeration.
func (PullReqState) Enum ¶
func (PullReqState) Enum() []interface{}
func (PullReqState) Sanitize ¶
func (s PullReqState) Sanitize() (PullReqState, bool)
type RepoAttr ¶
type RepoAttr int
RepoAttr defines repo attributes that can be used for sorting and filtering.
const ( RepoAttrNone RepoAttr = iota // TODO [CODE-1363]: remove after identifier migration. RepoAttrUID RepoAttrIdentifier RepoAttrCreated RepoAttrUpdated RepoAttrDeleted )
RepoAttr enumeration.
func ParseRepoAttr ¶
ParseRepoAttr parses the repo attribute string and returns the equivalent enumeration.
type RepoState ¶
type RepoState int
RepoState defines repo state.
type ResolverKind ¶
type ResolverKind string
ResolverKind represents the kind of resolver.
const ( // ResolverKindPlugin is a plugin resolver. ResolverKindPlugin ResolverKind = "plugin" // ResolverKindTemplate is a template resolver. ResolverKindTemplate ResolverKind = "template" )
func ParseResolverKind ¶
func ParseResolverKind(r string) (ResolverKind, error)
func (ResolverKind) String ¶
func (r ResolverKind) String() string
type ResolverType ¶
type ResolverType string
ResolverType represents the type of resolver.
const ( // ResolverTypeStep is a step level resolver. ResolverTypeStep ResolverType = "step" // ResolverTypeStage is a stage level resolver. ResolverTypeStage ResolverType = "stage" )
func ParseResolverType ¶
func ParseResolverType(s string) (ResolverType, error)
func (ResolverType) String ¶
func (t ResolverType) String() string
type ResourceType ¶
type ResourceType string
ResourceType represents the different types of resources that can be guarded with permissions.
const ( ResourceTypeSpace ResourceType = "SPACE" ResourceTypeRepo ResourceType = "REPOSITORY" ResourceTypeUser ResourceType = "USER" ResourceTypeServiceAccount ResourceType = "SERVICEACCOUNT" ResourceTypeService ResourceType = "SERVICE" ResourceTypePipeline ResourceType = "PIPELINE" ResourceTypeSecret ResourceType = "SECRET" ResourceTypeConnector ResourceType = "CONNECTOR" ResourceTypeTemplate ResourceType = "TEMPLATE" ResourceTypeGitspace ResourceType = "GITSPACE" ResourceTypeInfraProvider ResourceType = "INFRAPROVIDER" )
type RuleSort ¶
type RuleSort string
RuleSort contains protection rule sorting options.
func ParseRuleSortAttr ¶
ParseRuleSortAttr parses the protection rule sorting option.
type RuleState ¶
type RuleState string
RuleState represents rule state.
type SSEType ¶
type SSEType string
SSEType defines the kind of server sent event.
const ( SSETypeExecutionUpdated SSEType = "execution_updated" SSETypeExecutionRunning SSEType = "execution_running" SSETypeExecutionCompleted SSEType = "execution_completed" SSETypeExecutionCanceled SSEType = "execution_canceled" SSETypeRepositoryImportCompleted SSEType = "repository_import_completed" SSETypeRepositoryExportCompleted SSEType = "repository_export_completed" SSETypePullRequestUpdated SSEType = "pullreq_updated" SSETypeLogLineAppended SSEType = "log_line_appended" )
Enums for event types delivered to the event stream for the UI.
type SettingsScope ¶
type SettingsScope string
SettingsScope defines the different scopes of a setting.
var ( // SettingsScopeSpace defines settings stored on a space level. SettingsScopeSpace SettingsScope = "space" // SettingsScopeRepo defines settings stored on a repo level. SettingsScopeRepo SettingsScope = "repo" )
func GetAllSettingsScopes ¶
func GetAllSettingsScopes() []SettingsScope
func (SettingsScope) Enum ¶
func (SettingsScope) Enum() []interface{}
type SpaceAttr ¶
type SpaceAttr int
SpaceAttr defines space attributes that can be used for sorting and filtering.
const ( SpaceAttrNone SpaceAttr = iota // TODO [CODE-1363]: remove after identifier migration. SpaceAttrUID SpaceAttrIdentifier SpaceAttrCreated SpaceAttrUpdated SpaceAttrDeleted )
Order enumeration.
func ParseSpaceAttr ¶
ParseSpaceAttr parses the space attribute string and returns the equivalent enumeration.
type TagSortOption ¶
type TagSortOption int
TagSortOption specifies the available sort options for tags.
const ( TagSortOptionDefault TagSortOption = iota TagSortOptionName TagSortOptionDate )
func ParseTagSortOption ¶
func ParseTagSortOption(s string) TagSortOption
ParseTagSortOption parses the tag sort option string and returns the equivalent enumeration.
func (TagSortOption) String ¶
func (o TagSortOption) String() string
String returns a string representation of the tag sort option.
type TriggerAction ¶
type TriggerAction string
TriggerAction defines the different actions on triggers will fire.
const ( // TriggerActionBranchCreated gets triggered when a branch gets created. TriggerActionBranchCreated TriggerAction = "branch_created" // TriggerActionBranchUpdated gets triggered when a branch gets updated. TriggerActionBranchUpdated TriggerAction = "branch_updated" // TriggerActionTagCreated gets triggered when a tag gets created. TriggerActionTagCreated TriggerAction = "tag_created" // TriggerActionTagUpdated gets triggered when a tag gets updated. TriggerActionTagUpdated TriggerAction = "tag_updated" // TriggerActionPullReqCreated gets triggered when a pull request gets created. TriggerActionPullReqCreated TriggerAction = "pullreq_created" // TriggerActionPullReqReopened gets triggered when a pull request gets reopened. TriggerActionPullReqReopened TriggerAction = "pullreq_reopened" // TriggerActionPullReqBranchUpdated gets triggered when a pull request source branch gets updated. TriggerActionPullReqBranchUpdated TriggerAction = "pullreq_branch_updated" // TriggerActionPullReqClosed gets triggered when a pull request is closed. TriggerActionPullReqClosed = "pullreq_closed" // TriggerActionPullReqMerged gets triggered when a pull request is merged. TriggerActionPullReqMerged = "pullreq_merged" )
These are similar to enums defined in webhook enum but can diverge as these are different entities.
func (TriggerAction) Enum ¶
func (TriggerAction) Enum() []interface{}
func (TriggerAction) GetTriggerEvent ¶
func (t TriggerAction) GetTriggerEvent() TriggerEvent
func (TriggerAction) Sanitize ¶
func (t TriggerAction) Sanitize() (TriggerAction, bool)
type TriggerEvent ¶
type TriggerEvent string
TriggerEvent defines the different kinds of events in triggers.
type UserAttr ¶
type UserAttr int
UserAttr defines user attributes that can be used for sorting and filtering.
const ( UserAttrNone UserAttr = iota UserAttrUID UserAttrName UserAttrEmail UserAttrAdmin UserAttrCreated UserAttrUpdated )
Order enumeration.
func ParseUserAttr ¶
ParseUserAttr parses the user attribute string and returns the equivalent enumeration.
type WebhookAttr ¶
type WebhookAttr int
WebhookAttr defines webhook attributes that can be used for sorting and filtering.
const ( WebhookAttrNone WebhookAttr = iota // TODO [CODE-1364]: Remove once UID/Identifier migration is completed. WebhookAttrID // TODO [CODE-1363]: remove after identifier migration. WebhookAttrUID WebhookAttrIdentifier // TODO [CODE-1364]: Remove once UID/Identifier migration is completed. WebhookAttrDisplayName WebhookAttrCreated WebhookAttrUpdated )
func ParseWebhookAttr ¶
func ParseWebhookAttr(s string) WebhookAttr
ParseWebhookAttr parses the webhook attribute string and returns the equivalent enumeration.
func (WebhookAttr) String ¶
func (a WebhookAttr) String() string
String returns the string representation of the attribute.
type WebhookExecutionResult ¶
type WebhookExecutionResult string
WebhookExecutionResult defines the different results of a webhook execution.
const ( // WebhookExecutionResultSuccess describes a webhook execution result that succeeded. WebhookExecutionResultSuccess WebhookExecutionResult = "success" // WebhookExecutionResultRetriableError describes a webhook execution result that failed with a retriable error. WebhookExecutionResultRetriableError WebhookExecutionResult = "retriable_error" // WebhookExecutionResultFatalError describes a webhook execution result that failed with an unrecoverable error. WebhookExecutionResultFatalError WebhookExecutionResult = "fatal_error" )
func (WebhookExecutionResult) Enum ¶
func (WebhookExecutionResult) Enum() []interface{}
type WebhookParent ¶
type WebhookParent string
WebhookParent defines different types of parents of a webhook.
const ( // WebhookParentRepo describes a repo as webhook owner. WebhookParentRepo WebhookParent = "repo" // WebhookParentSpace describes a space as webhook owner. WebhookParentSpace WebhookParent = "space" )
func (WebhookParent) Enum ¶
func (WebhookParent) Enum() []interface{}
type WebhookTrigger ¶
type WebhookTrigger string
WebhookTrigger defines the different types of webhook triggers available.
const ( // WebhookTriggerBranchCreated gets triggered when a branch gets created. WebhookTriggerBranchCreated WebhookTrigger = "branch_created" // WebhookTriggerBranchUpdated gets triggered when a branch gets updated. WebhookTriggerBranchUpdated WebhookTrigger = "branch_updated" // WebhookTriggerBranchDeleted gets triggered when a branch gets deleted. WebhookTriggerBranchDeleted WebhookTrigger = "branch_deleted" // WebhookTriggerTagCreated gets triggered when a tag gets created. WebhookTriggerTagCreated WebhookTrigger = "tag_created" // WebhookTriggerTagUpdated gets triggered when a tag gets updated. WebhookTriggerTagUpdated WebhookTrigger = "tag_updated" // WebhookTriggerTagDeleted gets triggered when a tag gets deleted. WebhookTriggerTagDeleted WebhookTrigger = "tag_deleted" // WebhookTriggerPullReqCreated gets triggered when a pull request gets created. WebhookTriggerPullReqCreated WebhookTrigger = "pullreq_created" // WebhookTriggerPullReqReopened gets triggered when a pull request gets reopened. WebhookTriggerPullReqReopened WebhookTrigger = "pullreq_reopened" // WebhookTriggerPullReqBranchUpdated gets triggered when a pull request source branch gets updated. WebhookTriggerPullReqBranchUpdated WebhookTrigger = "pullreq_branch_updated" // WebhookTriggerPullReqClosed gets triggered when a pull request is closed. WebhookTriggerPullReqClosed WebhookTrigger = "pullreq_closed" // WebhookTriggerPullReqCommentCreated gets triggered when a pull request comment gets created. WebhookTriggerPullReqCommentCreated WebhookTrigger = "pullreq_comment_created" // WebhookTriggerPullReqMerged gets triggered when a pull request is merged. WebhookTriggerPullReqMerged WebhookTrigger = "pullreq_merged" // WebhookTriggerPullReqUpdated gets triggered when a pull request gets updated. WebhookTriggerPullReqUpdated WebhookTrigger = "pullreq_updated" )
func (WebhookTrigger) Enum ¶
func (WebhookTrigger) Enum() []interface{}
func (WebhookTrigger) Sanitize ¶
func (s WebhookTrigger) Sanitize() (WebhookTrigger, bool)
Source Files ¶
- check.go
- ci_status.go
- codeowner_violation.go
- common.go
- encoding.go
- git.go
- gitspace_access_type.go
- gitspace_action_type.go
- gitspace_cope_repo_type.go
- gitspace_entity_type.go
- gitspace_event_type.go
- gitspace_instance_state_type.go
- gitspace_state_type.go
- ide.go
- infra_event.go
- infra_provider_type.go
- infra_status.go
- job.go
- label.go
- membership.go
- membership_role.go
- order.go
- permission.go
- principal.go
- provisioning_type.go
- public_key.go
- public_resource.go
- pullreq.go
- repo.go
- resolver_kind.go
- resolver_type.go
- resource.go
- rule.go
- scm.go
- settings.go
- space.go
- sse.go
- token.go
- trigger_actions.go
- trigger_events.go
- user.go
- webhook.go