Documentation ¶
Overview ¶
Package api provides the handlers for the Vela API.
Usage:
import "github.com/go-vela/server/api"
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseMetrics ¶
BaseMetrics returns a Prometheus handler for serving go metrics.
func CustomMetrics ¶
CustomMetrics returns custom Prometheus metrics from private functions.
func GetJWKS ¶ added in v0.24.0
GetJWKS represents the API handler for requests to public keys in the Vela OpenID service.
func GetOpenIDConfig ¶ added in v0.24.0
GetOpenIDConfig represents the API handler for requests for configurations in the Vela OpenID service.
Types ¶
type HeaderLink ¶
HeaderLink will hold the information needed to form a link element in the header.
type MetricsQueryParameters ¶ added in v0.15.0
type MetricsQueryParameters struct { // UserCount represents total platform users UserCount bool `form:"user_count"` // RepoCount represents total platform repos RepoCount bool `form:"repo_count"` // BuildCount represents total number of builds BuildCount bool `form:"build_count"` // RunningBuildCount represents total number of builds with status==running RunningBuildCount bool `form:"running_build_count"` // PendingBuildCount represents total number of builds with status==pending PendingBuildCount bool `form:"pending_build_count"` // QueuedBuildCount represents total number of builds currently in the queue QueuedBuildCount bool `form:"queued_build_count"` // FailureBuildCount represents total number of builds with status==failure FailureBuildCount bool `form:"failure_build_count"` // KilledBuildCount represents total number of builds with status==killed KilledBuildCount bool `form:"killed_build_count"` // SuccessBuildCount represents total number of builds with status==success SuccessBuildCount bool `form:"success_build_count"` // ErrorBuildCount represents total number of builds with status==error ErrorBuildCount bool `form:"error_build_count"` // StepImageCount represents total number of step images StepImageCount bool `form:"step_image_count"` // StepStatusCount represents total number of step statuses StepStatusCount bool `form:"step_status_count"` // ServiceImageCount represents total number of service images ServiceImageCount bool `form:"service_image_count"` // ServiceStatusCount represents total number of service statuses ServiceStatusCount bool `form:"service_status_count"` // WorkerBuildLimit represents total worker build limit WorkerBuildLimit bool `form:"worker_build_limit"` // ActiveWorkerCount represents total number of active workers ActiveWorkerCount bool `form:"active_worker_count"` // InactiveWorkerCount represents total number of inactive workers InactiveWorkerCount bool `form:"inactive_worker_count"` // IdleWorkerCount represents total number of workers with a status of idle // where worker RunningBuildIDs.length = 0 IdleWorkerCount bool `form:"idle_worker_count"` // AvailableWorkerCount represents total number of workers with a status of available, // where worker RunningBuildIDs.length > 0 and < worker BuildLimit AvailableWorkerCount bool `form:"available_worker_count"` // BusyWorkerCount represents total number of workers with a status of busy, // where worker BuildLimit == worker RunningBuildIDs.length BusyWorkerCount bool `form:"busy_worker_count"` // ErrorWorkerCount represents total number of workers with a status of error ErrorWorkerCount bool `form:"error_worker_count"` }
MetricsQueryParameters holds query parameter information pertaining to requested metrics.
type Pagination ¶
Pagination holds basic information pertaining to paginating results.
func (*Pagination) HasNext ¶
func (p *Pagination) HasNext() bool
HasNext will return true if there is a next page.
func (*Pagination) HasPages ¶
func (p *Pagination) HasPages() bool
HasPages returns true if there is need to deal with pagination.
func (*Pagination) HasPrev ¶
func (p *Pagination) HasPrev() bool
HasPrev will return true if there is a previous page.
func (*Pagination) NextPage ¶
func (p *Pagination) NextPage() int
NextPage returns the next page number.
func (*Pagination) PrevPage ¶
func (p *Pagination) PrevPage() int
PrevPage returns the previous page number.
func (*Pagination) SetHeaderLink ¶
func (p *Pagination) SetHeaderLink(c *gin.Context)
SetHeaderLink sets the Link HTTP header element to provide clients with paging information refs: - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link - https://tools.ietf.org/html/rfc5988
func (*Pagination) TotalPages ¶
func (p *Pagination) TotalPages() int
TotalPages will return the total number of pages.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package admin provides the admin handlers for the Vela API.
|
Package admin provides the admin handlers for the Vela API. |
Package auth provides the auth handlers (authenticate, login, ...) for the Vela API.
|
Package auth provides the auth handlers (authenticate, login, ...) for the Vela API. |
Package build provides the build handlers for the Vela API.
|
Package build provides the build handlers for the Vela API. |
Package dashboard provides the dashboard handlers for the Vela API.
|
Package dashboard provides the dashboard handlers for the Vela API. |
Package deployment provides the deployment handlers for the Vela API.
|
Package deployment provides the deployment handlers for the Vela API. |
Package hook provides the hook handlers for the Vela API.
|
Package hook provides the hook handlers for the Vela API. |
Package log provides the log handlers for the Vela API.
|
Package log provides the log handlers for the Vela API. |
Package pipeline provides the pipeline handlers for the Vela API.
|
Package pipeline provides the pipeline handlers for the Vela API. |
Package queue provides the queue handlers for the Vela API.
|
Package queue provides the queue handlers for the Vela API. |
Package repo provides the repo handlers for the Vela API.
|
Package repo provides the repo handlers for the Vela API. |
Package schedule provides the schedule handlers for the Vela API.
|
Package schedule provides the schedule handlers for the Vela API. |
Package scm provides the scm handlers for the Vela API.
|
Package scm provides the scm handlers for the Vela API. |
Package secret provides the secret handlers for the Vela API.
|
Package secret provides the secret handlers for the Vela API. |
Package service provides the service handlers for the Vela API.
|
Package service provides the service handlers for the Vela API. |
Package step provides the step handlers for the Vela API.
|
Package step provides the step handlers for the Vela API. |
actions
SPDX-License-Identifier: Apache-2.0
|
SPDX-License-Identifier: Apache-2.0 |
Package user provides the user handlers for the Vela API.
|
Package user provides the user handlers for the Vela API. |
Package webhook provides the webhook handlers for the Vela API.
|
Package webhook provides the webhook handlers for the Vela API. |
Package worker provides the worker handlers for the Vela API.
|
Package worker provides the worker handlers for the Vela API. |