Documentation ¶
Overview ¶
Package api provides the handlers for the Vela API.
Usage:
import "github.com/go-vela/server/api"
Index ¶
- func Authenticate(c *gin.Context)
- func AuthenticateCLI(c *gin.Context)
- func BaseMetrics() http.Handler
- func ChownRepo(c *gin.Context)
- func CreateBuild(c *gin.Context)
- func CreateHook(c *gin.Context)
- func CreateRepo(c *gin.Context)
- func CreateSecret(c *gin.Context)
- func CreateService(c *gin.Context)
- func CreateServiceLog(c *gin.Context)
- func CreateStep(c *gin.Context)
- func CreateStepLog(c *gin.Context)
- func CreateToken(c *gin.Context)
- func CreateUser(c *gin.Context)
- func CustomMetrics(c *gin.Context)
- func DeleteBuild(c *gin.Context)
- func DeleteHook(c *gin.Context)
- func DeleteRepo(c *gin.Context)
- func DeleteSecret(c *gin.Context)
- func DeleteService(c *gin.Context)
- func DeleteServiceLog(c *gin.Context)
- func DeleteStep(c *gin.Context)
- func DeleteStepLog(c *gin.Context)
- func DeleteToken(c *gin.Context)
- func DeleteUser(c *gin.Context)
- func GetBuild(c *gin.Context)
- func GetBuildLogs(c *gin.Context)
- func GetBuilds(c *gin.Context)
- func GetCurrentUser(c *gin.Context)
- func GetHook(c *gin.Context)
- func GetHooks(c *gin.Context)
- func GetRepo(c *gin.Context)
- func GetRepos(c *gin.Context)
- func GetSecret(c *gin.Context)
- func GetSecrets(c *gin.Context)
- func GetService(c *gin.Context)
- func GetServiceLog(c *gin.Context)
- func GetServices(c *gin.Context)
- func GetStep(c *gin.Context)
- func GetStepLog(c *gin.Context)
- func GetSteps(c *gin.Context)
- func GetUser(c *gin.Context)
- func GetUserSourceRepos(c *gin.Context)
- func GetUsers(c *gin.Context)
- func Health(c *gin.Context)
- func Login(c *gin.Context)
- func PostWebhook(c *gin.Context)
- func RepairRepo(c *gin.Context)
- func RestartBuild(c *gin.Context)
- func UpdateBuild(c *gin.Context)
- func UpdateHook(c *gin.Context)
- func UpdateRepo(c *gin.Context)
- func UpdateSecret(c *gin.Context)
- func UpdateService(c *gin.Context)
- func UpdateServiceLog(c *gin.Context)
- func UpdateStep(c *gin.Context)
- func UpdateStepLog(c *gin.Context)
- func UpdateUser(c *gin.Context)
- type HeaderLink
- type Pagination
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authenticate ¶
Authenticate represents the API handler to process a user logging in to Vela from the API or UI.
func AuthenticateCLI ¶
AuthenticateCLI represents the API handler to process a user logging in to Vela from the CLI.
func BaseMetrics ¶
BaseMetrics returns a Prometheus handler for serving go metrics
func ChownRepo ¶
ChownRepo represents the API handler to change the owner of a repo in the configured backend.
func CreateBuild ¶
CreateBuild represents the API handler to create a build in the configured backend.
func CreateHook ¶ added in v0.2.0
CreateHook represents the API handler to create a webhook in the configured backend.
func CreateRepo ¶
CreateRepo represents the API handler to create a repo in the configured backend.
func CreateSecret ¶
CreateSecret represents the API handler to create a secret in the configured backend.
func CreateService ¶
CreateService represents the API handler to create a service for a build in the configured backend.
func CreateServiceLog ¶
CreateServiceLog represents the API handler to create the logs for a service in the configured backend.
func CreateStep ¶
CreateStep represents the API handler to create a step for a build in the configured backend.
func CreateStepLog ¶
CreateStepLog represents the API handler to create the logs for a step in the configured backend.
func CreateToken ¶
CreateToken represents the API handler to create a user token in the configured backend.
func CreateUser ¶
CreateUser represents the API handler to create a user in the configured backend.
func CustomMetrics ¶
CustomMetrics returns custom Prometheus metrics from private functions
func DeleteBuild ¶
DeleteBuild represents the API handler to remove a build for a repo from the configured backend.
func DeleteHook ¶ added in v0.2.0
DeleteHook represents the API handler to remove a webhook from the configured backend.
func DeleteRepo ¶
DeleteRepo represents the API handler to remove a repo from the configured backend.
func DeleteSecret ¶
DeleteSecret deletes a secret from the provided secrets service.
func DeleteService ¶
DeleteService represents the API handler to remove a service for a build from the configured backend.
func DeleteServiceLog ¶
DeleteServiceLog represents the API handler to remove the logs for a service from the configured backend.
func DeleteStep ¶
DeleteStep represents the API handler to remove a step for a build from the configured backend.
func DeleteStepLog ¶
DeleteStepLog represents the API handler to remove the logs for a step from the configured backend.
func DeleteToken ¶
DeleteToken represents the API handler to revoke and recreate a user token in the configured backend.
func DeleteUser ¶
DeleteUser represents the API handler to remove a user from the configured backend.
func GetBuild ¶
GetBuild represents the API handler to capture a build for a repo from the configured backend.
func GetBuildLogs ¶
GetBuildLogs represents the API handler to capture a list of logs for a build from the configured backend.
func GetBuilds ¶
GetBuilds represents the API handler to capture a list of builds for a repo from the configured backend.
func GetCurrentUser ¶
GetCurrentUser represents the API handler to capture the currently authenticated user from the configured backend.
func GetHook ¶ added in v0.2.0
GetHook represents the API handler to capture a webhook from the configured backend.
func GetHooks ¶ added in v0.2.0
GetHooks represents the API handler to capture a list of webhooks from the configured backend.
func GetRepos ¶
GetRepos represents the API handler to capture a list of repos for a user from the configured backend.
func GetSecrets ¶
GetSecrets represents the API handler to capture a list of secrets from the configured backend.
func GetService ¶
GetService represents the API handler to capture a service for a build from the configured backend.
func GetServiceLog ¶
GetServiceLog represents the API handler to capture the logs for a service from the configured backend.
func GetServices ¶
GetServices represents the API handler to capture a list of services for a build from the configured backend.
func GetStep ¶
GetStep represents the API handler to capture a step for a build from the configured backend.
func GetStepLog ¶
GetStepLog represents the API handler to capture the logs for a step from the configured backend.
func GetSteps ¶
GetSteps represents the API handler to capture a list of steps for a build from the configured backend.
func GetUserSourceRepos ¶
GetUserSourceRepos represents the API handler to capture the list of repos for a user from the configured backend.
func GetUsers ¶
GetUsers represents the API handler to capture a list of users from the configured backend.
func PostWebhook ¶
PostWebhook represents the API handler to capture a webhook from a source control provider and publish it to the configure queue.
func RepairRepo ¶
RepairRepo represents the API handler to remove and then create a webhook for a repo.
func RestartBuild ¶
RestartBuild represents the API handler to restart an existing build in the configured backend.
func UpdateBuild ¶
UpdateBuild represents the API handler to update a build for a repo in the configured backend.
func UpdateHook ¶ added in v0.2.0
UpdateHook represents the API handler to update a webhook in the configured backend.
func UpdateRepo ¶
UpdateRepo represents the API handler to update a repo in the configured backend.
func UpdateSecret ¶
UpdateSecret updates a secret for the provided secrets service.
func UpdateService ¶
UpdateService represents the API handler to update a service for a build in the configured backend.
func UpdateServiceLog ¶
UpdateServiceLog represents the API handler to update the logs for a service in the configured backend.
func UpdateStep ¶
UpdateStep represents the API handler to update a step for a build in the configured backend.
func UpdateStepLog ¶
UpdateStepLog represents the API handler to update the logs for a step in the configured backend.
func UpdateUser ¶
UpdateUser represents the API handler to update a user in the configured backend.
Types ¶
type HeaderLink ¶
HeaderLink will hold the information needed to form a link element in the header
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