Documentation
¶
Overview ¶
Package constants provides the defined constant types for Vela.
Usage:
import "github.com/go-vela/types/constants"
Index ¶
Constants ¶
View Source
const ( // Badge for unknown state // <svg xmlns="http://www.w3.org/2000/svg" width="92" height="20"> // <linearGradient id="b" x2="0" y2="100%"> // <stop offset="0" stop-color="#bbb" stop-opacity=".1"/> // <stop offset="1" stop-opacity=".1"/> // </linearGradient> // <path d="M0 3 a3 3 0 014-3h28v20H3 a3 3 0 01-3-3V3z" fill="#555555"/> // <path d="M92 17 a3 3 0 01-3 3H32V0h56 a3 3 0 014 3v12z" fill="#9f9f9f"/> // <rect width="100%" height="100%" rx="3" fill="url(#b)"/> // <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> // <text x="16" y="14" fill="#010101" fill-opacity=".3" textLength="24" lengthAdjust="spacing">vela</text> // <text x="16" y="13" textLength="24" lengthAdjust="spacing">vela</text> // <text x="62" y="14" fill="#010101" fill-opacity=".3" textLength="52" lengthAdjust="spacing">unknown</text> // <text x="62" y="13" textLength="52" lengthAdjust="spacing">unknown</text> // </g> // </svg> BadgeUnknown = `` /* 872-byte string literal not displayed */ // Badge for success state // <svg xmlns="http://www.w3.org/2000/svg" width="85" height="20"> // <linearGradient id="a" x2="0" y2="100%"> // <stop offset="0" stop-color="#bbb" stop-opacity=".1"/> // <stop offset="1" stop-opacity=".1"/> // </linearGradient> // <path d="M0 3 a3 3 0 014-3h30v20H3 a3 3 0 01-3-3V3z" fill="#555555"/> // <path d="M85 17 a3 3 0 01-3 3H32V0h49 a3 3 0 014 3v12z" fill="#44cc11"/> // <rect width="100%" height="100%" rx="3" fill="url(#a)"/> // <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> // <text x="16" y="14" fill="#010101" fill-opacity=".3" textLength="24" lengthAdjust="spacing">vela</text> // <text x="16" y="13" textlength="24" lengthadjust="spacing">vela</text> // <text x="58" y="14" fill="#010101" fill-opacity=".3" textlength="46" lengthadjust="spacing">success</text> // <text x="58" y="13" textlength="46" lengthadjust="spacing">success</text> // </g> // </svg> BadgeSuccess = `` /* 872-byte string literal not displayed */ // Badge for failed state // <svg xmlns="http://www.w3.org/2000/svg" width="73" height="20"> // <linearGradient id="a" x2="0" y2="100%"> // <stop offset="0" stop-color="#bbb" stop-opacity=".1"/> // <stop offset="1" stop-opacity=".1"/> // </linearGradient> // <path d="M0 3 a3 3 0 014-3h30v20H3 a3 3 0 01-3-3V3z" fill="#555555"/> // <path d="M73 17 a3 3 0 01-3 3H32V0h37 a3 3 0 014 3v12z" fill="#fe7d37"/> // <rect width="100%" height="100%" rx="3" fill="url(#a)"/> // <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> // <text x="16" y="14" fill="#010101" fill-opacity=".3" textLength="24" lengthAdjust="spacing">vela</text> // <text x="16" y="13" textlength="24" lengthadjust="spacing">vela</text> // <text x="52" y="14" fill="#010101" fill-opacity=".3" textlength="46" lengthadjust="spacing">failed</text> // <text x="52" y="13" textlength="46" lengthadjust="spacing">failed</text> // </g> // </svg> BadgeFailed = `` /* 870-byte string literal not displayed */ // Badge for error state // <svg xmlns="http://www.w3.org/2000/svg" width="69" height="20"> // <linearGradient id="a" x2="0" y2="100%"> // <stop offset="0" stop-color="#bbb" stop-opacity=".1"/> // <stop offset="1" stop-opacity=".1"/> // </linearGradient> // <path d="M0 3 a3 3 0 014-3h30v20H3 a3 3 0 01-3-3V3z" fill="#555555"/> // <path d="M69 17 a3 3 0 01-3 3H32V0h33 a3 3 0 014 3v12z" fill="#e05d44"/> // <rect width="100%" height="100%" rx="3" fill="url(#a)"/> // <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> // <text x="16" y="14" fill="#010101" fill-opacity=".3" textLength="24" lengthAdjust="spacing">vela</text> // <text x="16" y="13" textlength="24" lengthadjust="spacing">vela</text> // <text x="50" y="14" fill="#010101" fill-opacity=".3" textlength="46" lengthadjust="spacing">error</text> // <text x="50" y="13" textlength="46" lengthadjust="spacing">error</text> // </g> // </svg> BadgeError = `` /* 868-byte string literal not displayed */ // Badge for running status // <svg xmlns="http://www.w3.org/2000/svg" width="88" height="20"> // <linearGradient id="b" x2="0" y2="100%"> // <stop offset="0" stop-color="#bbb" stop-opacity=".1"/> // <stop offset="1" stop-opacity=".1"/> // </linearGradient> // <path d="M0 3 a3 3 0 014-3h28v20H3 a3 3 0 01-3-3V3z" fill="#555555"/> // <path d="M88 17 a3 3 0 01-3 3H32V0h52 a3 3 0 014 3v12z" fill="#dfb317"/> // <rect width="100%" height="100%" rx="3" fill="url(#b)"/> // <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> // <text x="16" y="14" fill="#010101" fill-opacity=".3" textLength="24" lengthAdjust="spacing">vela</text> // <text x="16" y="13" textLength="24" lengthAdjust="spacing">vela</text> // <text x="59" y="14" fill="#010101" fill-opacity=".3" textLength="46" lengthAdjust="spacing">running</text> // <text x="59" y="13" textLength="46" lengthAdjust="spacing">running</text> // </g> // </svg> BadgeRunning = `` /* 872-byte string literal not displayed */ )
Constants for build badges. nolint:lll,godot // due to providing pretty printed svgs
View Source
const ( // DriverPostgres defines the driver type when integrating with a PostgreSQL database. DriverPostgres = "postgres" // DriverSqlite defines the driver type when integrating with a SQLite database. DriverSqlite = "sqlite3" )
Server database drivers.
View Source
const ( // DriverDarwin defines the driver type when integrating with a darwin distribution. DriverDarwin = "darwin" // DriverLinux defines the driver type when integrating with a linux distribution. DriverLinux = "linux" // DriverLocal defines the driver type when integrating with a local system. DriverLocal = "local" // DriverWindows defines the driver type when integrating with a windows distribution. DriverWindows = "windows" )
Worker executor drivers.
View Source
const ( // DriverKafka defines the driver type when integrating with a Kafka queue. DriverKafka = "kafka" // DriverRedis defines the driver type when integrating with a Redis queue. DriverRedis = "redis" )
Server and worker queue drivers.
View Source
const ( // DriverDocker defines the driver type when integrating with a Docker runtime. DriverDocker = "docker" // DriverKubernetes defines the driver type when integrating with a Kubernetes runtime. DriverKubernetes = "kubernetes" )
Worker runtime drivers.
View Source
const ( // DriverNative defines the driver type when integrating with a Vela secret service. DriverNative = "native" // DriverVault defines the driver type when integrating with a Vault secret service. DriverVault = "vault" )
Server and worker secret drivers.
View Source
const ( // DriverGitHub defines the driver type when integrating with a Github source code system. DriverGithub = "github" // DriverGitLab defines the driver type when integrating with a Gitlab source code system. DriverGitlab = "gitlab" )
Server source drivers.
View Source
const ( // EventPush defines the event type for build and repo push events. EventPush = "push" // EventPull defines the event type for build and repo pull_request events. EventPull = "pull_request" // EventTag defines the event type for build and repo tag events. EventTag = "tag" // EventDeploy defines the event type for build and repo deployment events. EventDeploy = "deployment" // EventComment defines the event type for comments added to a pull request. EventComment = "comment" )
Build and repo events.
View Source
const ( // BuildTimeoutMin defines the minimum value in minutes for repo build timeout. BuildTimeoutMin = 1 // BuildTimeoutMax defines the maximum value in minutes for repo build timeout. BuildTimeoutMax = 90 // BuildTimeoutDefault defines the default value in minutes for repo build timeout. BuildTimeoutDefault = 30 // FavoritesMaxSize defines the maximum size in characters for user favorites. FavoritesMaxSize = 5000 )
Limits and constraints.
View Source
const ( // MatcherFilepath defines the ruleset type for the filepath matcher. MatcherFilepath = "filepath" // MatcherRegex defines the ruleset type for the regex matcher. MatcherRegex = "regexp" )
Ruleset matchers.
View Source
const ( // OperatorAnd defines the ruleset type for the and operator. OperatorAnd = "and" // OperatorOr defines the ruleset type for the or operator. OperatorOr = "or" )
Ruleset operators.
View Source
const ( // PipelineStages defines the type for a pipeline with stages. PipelineStage = "stages" // PipelineStep defines the type for a pipeline with steps. PipelineStep = "steps" // PipelineTemplate defines the type for a pipeline as a template. PipelineTemplate = "template" )
Pipeline types.
View Source
const ( // PullAlways defines the pull policy type for // a service or step to always pull an image. PullAlways = "always" // PullNotPresent defines the pull policy type for // a service or step to only pull an image if it doesn't exist. PullNotPresent = "not_present" // PullOnStart defines the pull policy type for // a service or step to only pull an image before the container starts. PullOnStart = "on_start" // PullNever defines the pull policy type for // a service or step to never pull an image. PullNever = "never" )
Service and step pull policies.
View Source
const ( // SecretOrg defines the secret type for a secret scoped to a specific org. SecretOrg = "org" // SecretRepo defines the secret type for a secret scoped to a specific repo. SecretRepo = "repo" SecretShared = "shared" // SecretMask defines the secret mask to be used in place of secret values returned to users. SecretMask = "[secure]" )
Secret types.
View Source
const ( // StatusError defines the status type for build and step error statuses. StatusError = "error" // StatusFailure defines the status type for build and step failure statuses. StatusFailure = "failure" // StatusKilled defines the status type for build and step killed statuses. StatusKilled = "killed" // StatusCanceled defines the status type for build and step canceled statuses. StatusCanceled = "canceled" // StatusPending defines the status type for build and step pending statuses. StatusPending = "pending" // StatusRunning defines the status type for build and step running statuses. StatusRunning = "running" // StatusSuccess defines the status type for build and step success statuses. StatusSuccess = "success" )
Build and step statuses.
View Source
const ( // TableBuild defines the table type for the database builds table. TableBuild = "builds" // TableHook defines the table type for the database hooks table. TableHook = "hooks" // TableLog defines the table type for the database logs table. TableLog = "logs" // TableRepo defines the table type for the database repos table. TableRepo = "repos" // TableSecret defines the table type for the database secrets table. TableSecret = "secrets" // TableService defines the table type for the database services table. TableService = "services" // TableStep defines the table type for the database steps table. TableStep = "steps" // TableUser defines the table type for the database users table. TableUser = "users" // TableWorker defines the table type for the database workers table. TableWorker = "workers" )
Database tables.
View Source
const ( // VisibilityPublic defines the visibility type for allowing any // users in Vela to access their repo regardless of the access // defined in the source control system. VisibilityPublic = "public" // VisibilityPrivate defines the visibility type for only allowing // users in Vela with pre-defined access in the source control // system to access their repo. VisibilityPrivate = "private" )
Repo visibility types.
View Source
const ( // WorkspaceDefault defines the default workspace path for a service or a step. WorkspaceDefault = "/vela/src" // WorkspaceMount defines the mount workspace path for a service or a step. WorkspaceMount = "/vela" )
Service and Step workspace paths.
View Source
const (
// DefaultRoute defines the default route all workers listen on.
DefaultRoute = "vela"
)
Queue types.
View Source
const (
// RefreshTokenName is the name associated with the refresh token.
RefreshTokenName = "vela_refresh_token"
)
Constants for tokens.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.