Documentation ¶
Overview ¶
Package router provides the routing engine for Vela to serve and process API requests.
Usage:
import "github.com/go-vela/server/router"
Package router Vela server ¶
API for the Vela server
Version: 0.0.0-dev Schemes: http, https Host: localhost Consumes: - application/json Produces: - application/json SecurityDefinitions: ApiKeyAuth: type: apiKey in: header name: Authorization
swagger:meta
nolint: dupl // ignore similar code with step
nolint: dupl // ignore similar code with service
Index ¶
- func AdminHandlers(base *gin.RouterGroup)
- func BuildHandlers(base *gin.RouterGroup)
- func DeploymentHandlers(base *gin.RouterGroup)
- func HookHandlers(base *gin.RouterGroup)
- func Load(options ...gin.HandlerFunc) *gin.Engine
- func LogServiceHandlers(base *gin.RouterGroup)
- func LogStepHandlers(base *gin.RouterGroup)
- func PipelineHandlers(base *gin.RouterGroup)
- func RepoHandlers(base *gin.RouterGroup)
- func SecretHandlers(base *gin.RouterGroup)
- func ServiceHandlers(base *gin.RouterGroup)
- func StepHandlers(base *gin.RouterGroup)
- func UserHandlers(base *gin.RouterGroup)
- func WorkerHandlers(base *gin.RouterGroup)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminHandlers ¶
func AdminHandlers(base *gin.RouterGroup)
AdminHandlers is a function that extends the provided base router group with the API handlers for admin functionality.
GET /api/v1/admin/builds GET /api/v1/admin/builds/queue PUT /api/v1/admin/build GET /api/v1/admin/deployments PUT /api/v1/admin/deployment GET /api/v1/admin/hooks PUT /api/v1/admin/hook GET /api/v1/admin/repos PUT /api/v1/admin/repo GET /api/v1/admin/secrets PUT /api/v1/admin/secret GET /api/v1/admin/services PUT /api/v1/admin/service GET /api/v1/admin/steps PUT /api/v1/admin/step GET /api/v1/admin/users PUT /api/v1/admin/user.
func BuildHandlers ¶
func BuildHandlers(base *gin.RouterGroup)
BuildHandlers is a function that extends the provided base router group with the API handlers for build functionality.
POST /api/v1/repos/:org/:repo/builds GET /api/v1/repos/:org/:repo/builds POST /api/v1/repos/:org/:repo/builds/:build GET /api/v1/repos/:org/:repo/builds/:build PUT /api/v1/repos/:org/:repo/builds/:build DELETE /api/v1/repos/:org/:repo/builds/:build DELETE /api/v1/repos/:org/:repo/builds/:build/cancel GET /api/v1/repos/:org/:repo/builds/:build/logs POST /api/v1/repos/:org/:repo/builds/:build/services GET /api/v1/repos/:org/:repo/builds/:build/services GET /api/v1/repos/:org/:repo/builds/:build/services/:service PUT /api/v1/repos/:org/:repo/builds/:build/services/:service DELETE /api/v1/repos/:org/:repo/builds/:build/services/:service POST /api/v1/repos/:org/:repo/builds/:build/services/:service/logs GET /api/v1/repos/:org/:repo/builds/:build/services/:service/logs PUT /api/v1/repos/:org/:repo/builds/:build/services/:service/logs DELETE /api/v1/repos/:org/:repo/builds/:build/services/:service/logs POST /api/v1/repos/:org/:repo/builds/:build/steps GET /api/v1/repos/:org/:repo/builds/:build/steps GET /api/v1/repos/:org/:repo/builds/:build/steps/:step PUT /api/v1/repos/:org/:repo/builds/:build/steps/:step DELETE /api/v1/repos/:org/:repo/builds/:build/steps/:step POST /api/v1/repos/:org/:repo/builds/:build/steps/:step/logs GET /api/v1/repos/:org/:repo/builds/:build/steps/:step/logs PUT /api/v1/repos/:org/:repo/builds/:build/steps/:step/logs DELETE /api/v1/repos/:org/:repo/builds/:build/steps/:step/logs .
func DeploymentHandlers ¶ added in v0.4.0
func DeploymentHandlers(base *gin.RouterGroup)
DeploymentHandlers is a function that extends the provided base router group with the API handlers for deployment functionality.
POST /api/v1/deployments/:org/:repo GET /api/v1/deployments/:org/:repo GET /api/v1/deployments/:org/:repo/:deployment .
func HookHandlers ¶ added in v0.2.0
func HookHandlers(base *gin.RouterGroup)
HookHandlers is a function that extends the provided base router group with the API handlers for hook functionality.
POST /api/v1/hooks/:org/:repo GET /api/v1/hooks/:org/:repo GET /api/v1/hooks/:org/:repo/:hook PUT /api/v1/hooks/:org/:repo/:hook DELETE /api/v1/hooks/:org/:repo/:hook .
func Load ¶
func Load(options ...gin.HandlerFunc) *gin.Engine
Load is a server function that returns the engine for processing web requests on the host it's running on.
func LogServiceHandlers ¶
func LogServiceHandlers(base *gin.RouterGroup)
LogServiceHandlers is a function that extends the provided base router group with the API handlers for service logs functionality.
POST /api/v1/repos/:org/:repo/builds/:build/services/:service/logs GET /api/v1/repos/:org/:repo/builds/:build/services/:service/logs PUT /api/v1/repos/:org/:repo/builds/:build/services/:service/logs DELETE /api/v1/repos/:org/:repo/builds/:build/services/:service/logs .
func LogStepHandlers ¶
func LogStepHandlers(base *gin.RouterGroup)
LogStepHandlers is a function that extends the provided base router group with the API handlers for step logs functionality.
POST /api/v1/repos/:org/:repo/builds/:build/steps/:step/logs GET /api/v1/repos/:org/:repo/builds/:build/steps/:step/logs PUT /api/v1/repos/:org/:repo/builds/:build/steps/:step/logs DELETE /api/v1/repos/:org/:repo/builds/:build/steps/:step/logs .
func PipelineHandlers ¶ added in v0.7.0
func PipelineHandlers(base *gin.RouterGroup)
PipelineHandlers is a function that extends the provided base router group with the API handlers for pipeline functionality.
GET /api/v1/pipelines/:org/:repo GET /api/v1/pipelines/:org/:repo/templates POST /api/v1/pipelines/:org/:repo/expand POST /api/v1/pipelines/:org/:repo/compile POST /api/v1/pipelines/:org/:repo/validate .
func RepoHandlers ¶
func RepoHandlers(base *gin.RouterGroup)
RepoHandlers is a function that extends the provided base router group with the API handlers for repo functionality.
POST /api/v1/repos GET /api/v1/repos GET /api/v1/repos/:org GET /api/v1/repos/:org/builds GET /api/v1/repos/:org/:repo PUT /api/v1/repos/:org/:repo DELETE /api/v1/repos/:org/:repo PATCH /api/v1/repos/:org/:repo/repair PATCH /api/v1/repos/:org/:repo/chown POST /api/v1/repos/:org/:repo/builds GET /api/v1/repos/:org/:repo/builds POST /api/v1/repos/:org/:repo/builds/:build GET /api/v1/repos/:org/:repo/builds/:build PUT /api/v1/repos/:org/:repo/builds/:build DELETE /api/v1/repos/:org/:repo/builds/:build GET /api/v1/repos/:org/:repo/builds/:build/logs POST /api/v1/repos/:org/:repo/builds/:build/services GET /api/v1/repos/:org/:repo/builds/:build/services GET /api/v1/repos/:org/:repo/builds/:build/services/:service PUT /api/v1/repos/:org/:repo/builds/:build/services/:service DELETE /api/v1/repos/:org/:repo/builds/:build/services/:service POST /api/v1/repos/:org/:repo/builds/:build/services/:service/logs GET /api/v1/repos/:org/:repo/builds/:build/services/:service/logs PUT /api/v1/repos/:org/:repo/builds/:build/services/:service/logs DELETE /api/v1/repos/:org/:repo/builds/:build/services/:service/logs POST /api/v1/repos/:org/:repo/builds/:build/steps GET /api/v1/repos/:org/:repo/builds/:build/steps GET /api/v1/repos/:org/:repo/builds/:build/steps/:step PUT /api/v1/repos/:org/:repo/builds/:build/steps/:step DELETE /api/v1/repos/:org/:repo/builds/:build/steps/:step POST /api/v1/repos/:org/:repo/builds/:build/steps/:step/logs GET /api/v1/repos/:org/:repo/builds/:build/steps/:step/logs PUT /api/v1/repos/:org/:repo/builds/:build/steps/:step/logs DELETE /api/v1/repos/:org/:repo/builds/:build/steps/:step/logs .
func SecretHandlers ¶
func SecretHandlers(base *gin.RouterGroup)
SecretHandlers is a function that extends the provided base router group with the API handlers for secret functionality.
POST /api/v1/secrets/:engine/:type/:org/:name GET /api/v1/secrets/:engine/:type/:org/:name GET /api/v1/secrets/:engine/:type/:org/:name/:secret PUT /api/v1/secrets/:engine/:type/:org/:name/:secret DELETE /api/v1/secrets/:engine/:type/:org/:name/:secret .
func ServiceHandlers ¶
func ServiceHandlers(base *gin.RouterGroup)
ServiceHandlers is a function that extends the provided base router group with the API handlers for service functionality.
POST /api/v1/repos/:org/:repo/builds/:build/services GET /api/v1/repos/:org/:repo/builds/:build/services GET /api/v1/repos/:org/:repo/builds/:build/services/:service PUT /api/v1/repos/:org/:repo/builds/:build/services/:service DELETE /api/v1/repos/:org/:repo/builds/:build/services/:service POST /api/v1/repos/:org/:repo/builds/:build/services/:service/logs GET /api/v1/repos/:org/:repo/builds/:build/services/:service/logs PUT /api/v1/repos/:org/:repo/builds/:build/services/:service/logs DELETE /api/v1/repos/:org/:repo/builds/:build/services/:service/logs .
func StepHandlers ¶
func StepHandlers(base *gin.RouterGroup)
StepHandlers is a function that extends the provided base router group with the API handlers for step functionality.
POST /api/v1/repos/:org/:repo/builds/:build/steps GET /api/v1/repos/:org/:repo/builds/:build/steps GET /api/v1/repos/:org/:repo/builds/:build/steps/:step PUT /api/v1/repos/:org/:repo/builds/:build/steps/:step DELETE /api/v1/repos/:org/:repo/builds/:build/steps/:step POST /api/v1/repos/:org/:repo/builds/:build/steps/:step/logs GET /api/v1/repos/:org/:repo/builds/:build/steps/:step/logs PUT /api/v1/repos/:org/:repo/builds/:build/steps/:step/logs DELETE /api/v1/repos/:org/:repo/builds/:build/steps/:step/logs .
func UserHandlers ¶
func UserHandlers(base *gin.RouterGroup)
UserHandlers is a function that extends the provided base router group with the API handlers for user functionality.
POST /api/v1/users GET /api/v1/users GET /api/v1/users/:user PUT /api/v1/users/:user DELETE /api/v1/users/:user GET /api/v1/users/:user/source/repos POST /api/v1/users/:user/token DELETE /api/v1/users/:user/token GET /api/v1/user PUT /api/v1/user GET /api/v1/user/source/repos POST /api/v1/user/token DELETE /api/v1/user/token .
func WorkerHandlers ¶ added in v0.7.0
func WorkerHandlers(base *gin.RouterGroup)
WorkerHandlers is a function that extends the provided base router group with the API handlers for worker functionality.
POST /api/v1/users GET /api/v1/workers GET /api/v1/workers/:worker PUT /api/v1/workers/:worker DELETE /api/v1/workers/:worker .
Types ¶
This section is empty.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package middleware provides the ability for injecting Vela resources into the middleware chain for the API.
|
Package middleware provides the ability for injecting Vela resources into the middleware chain for the API. |
build
Package build provides the ability for inserting Vela build resources into or extracting Vela build resources from the middleware chain for the API.
|
Package build provides the ability for inserting Vela build resources into or extracting Vela build resources from the middleware chain for the API. |
executors
Package executors provides the ability for inserting Vela executors resources into or extracting Vela build resources from the middleware chain for the API.
|
Package executors provides the ability for inserting Vela executors resources into or extracting Vela build resources from the middleware chain for the API. |
org
Package org provides the ability for inserting Vela org resources into or extracting Vela org resources from the middleware chain for the API.
|
Package org provides the ability for inserting Vela org resources into or extracting Vela org resources from the middleware chain for the API. |
perm
Package perm provides the ability for validating the access control to Vela resources in the middleware chain for the API.
|
Package perm provides the ability for validating the access control to Vela resources in the middleware chain for the API. |
repo
Package repo provides the ability for inserting Vela repo resources into or extracting Vela repo resources from the middleware chain for the API.
|
Package repo provides the ability for inserting Vela repo resources into or extracting Vela repo resources from the middleware chain for the API. |
service
Package service provides the ability for inserting Vela service resources into or extracting Vela service resources from the middleware chain for the API.
|
Package service provides the ability for inserting Vela service resources into or extracting Vela service resources from the middleware chain for the API. |
step
Package step provides the ability for inserting Vela step resources into or extracting Vela step resources from the middleware chain for the API.
|
Package step provides the ability for inserting Vela step resources into or extracting Vela step resources from the middleware chain for the API. |
token
Package token provides the ability for inserting Vela token resources into or extracting Vela token resources from the middleware chain for the API.
|
Package token provides the ability for inserting Vela token resources into or extracting Vela token resources from the middleware chain for the API. |
user
Package user provides the ability for inserting Vela user resources into or extracting Vela user resources from the middleware chain for the API.
|
Package user provides the ability for inserting Vela user resources into or extracting Vela user resources from the middleware chain for the API. |
worker
Package worker provides the ability for inserting Vela worker resources into or extracting Vela worker resources from the middleware chain for the API.
|
Package worker provides the ability for inserting Vela worker resources into or extracting Vela worker resources from the middleware chain for the API. |