Documentation ¶
Overview ¶
Package router provides the routing engine for Vela to serve and process API requests.
Usage:
import "github.com/go-vela/server/router"
Index ¶
- func AdminHandlers(base *gin.RouterGroup)
- func BuildHandlers(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 RepoHandlers(base *gin.RouterGroup)
- func SecretHandlers(base *gin.RouterGroup)
- func ServiceHandlers(base *gin.RouterGroup)
- func StepHandlers(base *gin.RouterGroup)
- func UserHandlers(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/repos GET /api/v1/admin/secrets GET /api/v1/admin/steps GET /api/v1/admin/users
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 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 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 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/: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
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. |
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. |