Documentation
¶
Index ¶
- Constants
- Variables
- func GetAllBuilderTypeStr() []string
- func GetAllJobStates() ([]JobState, JobState)
- func GetAllPrincipalTypes() ([]PrincipalType, PrincipalType)
- func GetAllRestartPolicyStr() []string
- func Sanitize[E constraints.Ordered](element E, all func() ([]E, E)) (E, bool)
- type ApplicationAttr
- type ApplicationDeploymentStatus
- type ApplicationSource
- type ApplicationStatus
- type ApplicationType
- type AuthProvider
- type BuilderType
- type DNSProvider
- type DeploymentStatus
- type EnvironmentAttr
- type GitProvider
- type JobPriority
- type JobState
- type Order
- type Permission
- type PrincipalType
- type ProjectAttr
- type ProjectRole
- type ResourceType
- type RestartPolicyType
- type SSEType
- type ServerType
- type TenantAttr
- type TenantRole
- type TokenType
- type TriggerAction
- type VariableType
- type VolumeAttr
- type VolumeFormAction
Constants ¶
const ( ApplicationStatusRunning = "running" ApplicationStatusPaused = "paused" ApplicationStatusSleeping = "sleeping" ApplicationStatusError = "error" )
const ( ApplicationDeploymentStatusNeedsDeployment = "needs deployment" ApplicationDeploymentStatusDeploying = "deploying" ApplicationDeploymentStatusFailed = "failed" ApplicationDeploymentStatusSuccess = "success" )
const ( DeploymentStatusPending = "pending" DeploymentStatusRunning = "running" DeploymentStatusSuccess = "success" DeploymentStatusSkipped = "skipped" DeploymentStatusFailed = "failed" DeploymentStatusCancelled = "cancelled" )
Variables ¶
var DNSProviders = sortEnum([]DNSProvider{ DNSProviderNone, DNSProviderCloudflare, })
var DNSProvidersStr = []string{ string(DNSProviderNone), string(DNSProviderCloudflare), }
var ProjectRoles = sortEnum([]ProjectRole{ ProjectRoleViewer, ProjectRoleContributor, ProjectRoleOwner, })
var ProjectRolesStr = []string{ string(ProjectRoleViewer), string(ProjectRoleContributor), string(ProjectRoleOwner), }
var TenantRoles = sortEnum([]TenantRole{ TenantRoleAdmin, TenantRoleMember, })
var TenantRolesStr = []string{ string(TenantRoleMember), string(TenantRoleAdmin), }
var VariableTypesStr = []string{ string(VariableTypeBuild), string(VariableTypeRun), string(VariableTypeBuildAndRun), }
Functions ¶
func GetAllBuilderTypeStr ¶
func GetAllBuilderTypeStr() []string
func GetAllJobStates ¶
func GetAllPrincipalTypes ¶
func GetAllPrincipalTypes() ([]PrincipalType, PrincipalType)
func GetAllRestartPolicyStr ¶
func GetAllRestartPolicyStr() []string
func Sanitize ¶
func Sanitize[E constraints.Ordered](element E, all func() ([]E, E)) (E, bool)
Types ¶
type ApplicationAttr ¶
type ApplicationAttr int
ApplicationAttr defines application attributes that can be used for sorting and filtering.
const ( ApplicationAttrNone ApplicationAttr = iota ApplicationAttrCreated ApplicationAttrUpdated ApplicationAttrDeleted )
ApplicationAttr enumeration.
func ParseApplicationAttr ¶
func ParseApplicationAttr(s string) ApplicationAttr
ParseApplicationAttr parses the application attribute string and returns the equivalent enumeration.
func (ApplicationAttr) String ¶
func (a ApplicationAttr) String() string
String returns the string representation of the attribute.
type ApplicationDeploymentStatus ¶
type ApplicationDeploymentStatus string
type ApplicationSource ¶
type ApplicationSource string
const ( ApplicationSourceGit ApplicationSource = "Git" ApplicationSourceGithub ApplicationSource = "GitHub" ApplicationSourceTemplate ApplicationSource = "Template" )
type ApplicationStatus ¶
type ApplicationStatus string
type ApplicationType ¶
type ApplicationType string
const ( ApplicationTypeStateless ApplicationType = "Stateless" ApplicationTypeStateful ApplicationType = "Stateful" ApplicationTypePostgresHA ApplicationType = "PostgresHA" )
type AuthProvider ¶
type AuthProvider string
const ( AuthProviderPassword AuthProvider = "password" AuthProviderGithub AuthProvider = "github" AuthProviderGitlab AuthProvider = "gitlab" AuthProviderGoogle AuthProvider = "google" )
func ProviderFromString ¶
func ProviderFromString(s string) AuthProvider
type BuilderType ¶
type BuilderType string
BuilderType represents the type of the Builder.
const ( BuilderTypeDockerfile BuilderType = "Dockerfile" BuilderTypeNixpacks BuilderType = "Nixpacks" BuilderTypeStatic BuilderType = "Static" )
type DNSProvider ¶
type DNSProvider string
const ( DNSProviderNone DNSProvider = "none" DNSProviderCloudflare DNSProvider = "cloudflare" )
func DNSProviderFromString ¶
func DNSProviderFromString(s string) DNSProvider
type DeploymentStatus ¶
type DeploymentStatus string
func (DeploymentStatus) ToApplicationDeploymentStatus ¶
func (s DeploymentStatus) ToApplicationDeploymentStatus() ApplicationDeploymentStatus
type EnvironmentAttr ¶
type EnvironmentAttr int
EnvironmentAttr defines project attibutes that can be used for sorting and filtering.
const ( EnvironmentAttrNone EnvironmentAttr = iota EnvironmentAttrUID EnvironmentAttrCreated EnvironmentAttrUpdated EnvironmentAttrDeleted )
Order enumeration.
func ParseEnvironmentAttr ¶
func ParseEnvironmentAttr(s string) EnvironmentAttr
ParseEnvironmentAttr parses the space attribute string and returns the equivalent enumeration.
func (EnvironmentAttr) String ¶
func (a EnvironmentAttr) String() string
String returns the string representation of the attribute.
type GitProvider ¶
type GitProvider string
const ( GitHubProvider GitProvider = "GITHUB" GitLabProvider GitProvider = "GITLAB" )
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 Order ¶
type Order int
Order defines the sort order.
func ParseOrder ¶
ParseOrder parses the order string and returns an order enumeration.
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" )
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 ProjectAttr ¶
type ProjectAttr int
ProjectAttr defines project attibutes that can be used for sorting and filtering.
const ( ProjectAttrNone ProjectAttr = iota ProjectAttrUID ProjectAttrCreated ProjectAttrUpdated ProjectAttrDeleted )
Order enumeration.
func ParseProjectAttr ¶
func ParseProjectAttr(s string) ProjectAttr
ParseProjectAttr parses the space attribute string and returns the equivalent enumeration.
func (ProjectAttr) String ¶
func (a ProjectAttr) String() string
String returns the string representation of the attribute.
type ProjectRole ¶
type ProjectRole string
const ( ProjectRoleViewer ProjectRole = "reader" ProjectRoleContributor ProjectRole = "contributor" ProjectRoleOwner ProjectRole = "owner" )
func ProjectRoleFromString ¶
func ProjectRoleFromString(s string) ProjectRole
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" )
type RestartPolicyType ¶
type RestartPolicyType string
const ( RestartPolicyTypeOnFailure RestartPolicyType = "ON_FAILURE" RestartPolicyTypeAlways RestartPolicyType = "ALWAYS" RestartPolicyTypeNever RestartPolicyType = "NEVER" )
type ServerType ¶
type ServerType string
const ( ServerTypeK8s ServerType = "k8s" ServerTypeDocker ServerType = "docker" )
type TenantAttr ¶
type TenantAttr int
TenantAttr defines tenant attibutes that can be used for sorting and filtering.
const ( TenantAttrNone TenantAttr = iota TenantAttrUID TenantAttrCreated TenantAttrUpdated TenantAttrDeleted )
Order enumeration.
func ParseTenantAttr ¶
func ParseTenantAttr(s string) TenantAttr
ParseTenantAttr parses the space attribute string and returns the equivalent enumeration.
func (TenantAttr) String ¶
func (a TenantAttr) String() string
String returns the string representation of the attribute.
type TenantRole ¶
type TenantRole string
const ( TenantRoleAdmin TenantRole = "admin" TenantRoleMember TenantRole = "member" )
func TenantRoleFromString ¶
func TenantRoleFromString(s string) TenantRole
type TriggerAction ¶
type TriggerAction string
const ( TriggerActionCreate TriggerAction = "Created" TriggerActionManual TriggerAction = "Manual" TriggerActionHook TriggerAction = "Hook" )
type VariableType ¶
type VariableType string
const ( // VariableTypeBuild represents a build variable VariableTypeBuild VariableType = "build" // VariableTypeRun represents a run variable VariableTypeRun VariableType = "run" // VariableTypeBuildAndRun represents a build and run variable VariableTypeBuildAndRun VariableType = "build_run" )
type VolumeAttr ¶
type VolumeAttr int
VolumeAttr defines volume attributes that can be used for sorting and filtering.
const ( VolumeAttrNone VolumeAttr = iota VolumeAttrCreated VolumeAttrUpdated VolumeAttrDeleted )
VolumeAttr enumeration.
func ParseVolumeAttr ¶
func ParseVolumeAttr(s string) VolumeAttr
ParseVolumeAttr parses the volume attribute string and returns the equivalent enumeration.
func (VolumeAttr) String ¶
func (a VolumeAttr) String() string
String returns the string representation of the attribute.
type VolumeFormAction ¶
type VolumeFormAction string
const ( VolumeFormActionCreate VolumeFormAction = "create" VolumeFormActionUpdate VolumeFormAction = "update" VolumeFormActionDelete VolumeFormAction = "delete" VolumeFormActionAttach VolumeFormAction = "attach" )
Source Files
¶
- application.go
- application_source.go
- application_status.go
- application_type.go
- auth.go
- builder.go
- common.go
- deployment_status.go
- dns_provider.go
- environment.go
- git_provider.go
- job.go
- order.go
- permission.go
- principal.go
- project.go
- project_role.go
- restart_policy.go
- server.go
- sse.go
- tenant.go
- tenant_role.go
- token.go
- trigger_action.go
- varibale_type.go
- volume.go
- volume_form_action.go