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: description: Bearer token type: apiKey in: header name: Authorization CookieAuth: description: Refresh token sent as cookie (swagger 2.0 doesn't support cookie auth) type: apiKey in: header name: vela_refresh_token
swagger:meta
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 ScheduleHandler(base *gin.RouterGroup)
- func ScmHandlers(base *gin.RouterGroup)
- func SearchHandlers(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/queue GET /api/v1/admin/build/:id PUT /api/v1/admin/build PUT /api/v1/admin/clean PUT /api/v1/admin/deployment PUT /api/v1/admin/hook PUT /api/v1/admin/repo PUT /api/v1/admin/secret PUT /api/v1/admin/service PUT /api/v1/admin/step 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 GET /api/v1/repos/:org/:repo/builds/:build/token 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 POST /api/v1/hooks/:org/:repo/:hook/redeliver .
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.
POST /api/v1/pipelines/:org/:repo GET /api/v1/pipelines/:org/:repo GET /api/v1/pipelines/:org/:repo/:pipeline PUT /api/v1/pipelines/:org/:repo/:pipeline DELETE /api/v1/pipelines/:org/:repo/:pipeline GET /api/v1/pipelines/:org/:repo/:pipeline/templates POST /api/v1/pipelines/:org/:repo/:pipeline/expand POST /api/v1/pipelines/:org/:repo/:pipeline/compile POST /api/v1/pipelines/:org/:repo/:pipeline/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 DELETE /api/v1/repos/:org/:repo/builds/:build/cancel GET /api/v1/repos/:org/:repo/builds/:build/logs GET /api/v1/repos/:org/:repo/builds/:build/token 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 ScheduleHandler ¶ added in v0.20.0
func ScheduleHandler(base *gin.RouterGroup)
ScheduleHandler is a function that extends the provided base router group with the API handlers for schedule functionality.
POST /api/v1/schedules/:org/:repo GET /api/v1/schedules/:org/:repo GET /api/v1/schedules/:org/:repo/:schedule PUT /api/v1/schedules/:org/:repo/:schedule DELETE /api/v1/schedules/:org/:repo/:schedule .
func ScmHandlers ¶ added in v0.12.0
func ScmHandlers(base *gin.RouterGroup)
ScmHandlers is a function that extends the provided base router group with the API handlers for source code management functionality.
GET /api/v1/scm/orgs/:org/sync GET /api/v1/scm/repos/:org/:repo/sync .
func SearchHandlers ¶ added in v0.17.0
func SearchHandlers(base *gin.RouterGroup)
SearchHandlers is a function that extends the provided base router group with the API handlers for resource search functionality.
GET /api/v1/search/builds/:id .
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/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 POST /api/v1/workers/:worker/refresh 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. |
auth
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. |
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. |
claims
Package claims provides the ability for inserting token claims resources into or extracting token claims resources from the middleware chain for the API.
|
Package claims provides the ability for inserting token claims resources into or extracting token claims 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. |
pipeline
Package pipeline provides the ability for inserting Vela pipeline resources into or extracting Vela pipeline resources from the middleware chain for the API.
|
Package pipeline provides the ability for inserting Vela pipeline resources into or extracting Vela pipeline resources from 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. |
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. |