v1handlers

package
v0.1.50 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadDeployCreateRequest error = errors.New("error invalid create deploy request")

ErrBadDeployCreateRequest is an error type used when a create service request fails validation checks

View Source
var ErrBadEnvironmentCreateRequest error = errors.New("error invalid create environment request. environment name is required")

ErrBadEnvironmentCreateRequest is an error type used when a create environment request fails validation checks

View Source
var ErrBadServiceCreateRequest error = errors.New("error invalid create service request. service name and repo url are required")

ErrBadServiceCreateRequest is an error type used when a create servie request fails validation checks

View Source
var ErrInvalidBuildID error = errors.New("unable to lookup build, received invalid id parameter")

ErrInvalidBuildID is returned when the getByID method receives an id param that can't be converted to int

Functions

func RegisterBuildHandlers

func RegisterBuildHandlers(routerGroup *gin.RouterGroup, bc *v1controllers.BuildController)

RegisterBuildHandlers accepts a gin router group and attaches handlers for working with build entities

func RegisterDeployHandlers

func RegisterDeployHandlers(routerGroup *gin.RouterGroup, dc *v1controllers.DeployController)

RegisterDeployHandlers accepts a gin router group and attaches handlers for working with deploy entities

func RegisterEnvironmentHandlers

func RegisterEnvironmentHandlers(routerGroup *gin.RouterGroup, ec *v1controllers.EnvironmentController)

RegisterEnvironmentHandlers accepts a routergroup and will attach all the handlers for working with environment entities to it

func RegisterServiceHandlers

func RegisterServiceHandlers(routerGroup *gin.RouterGroup, sc *v1controllers.ServiceController)

RegisterServiceHandlers accepts a gin router and will attach handlers for working with Service entities to it

Types

type CreateDeployRequestBody

type CreateDeployRequestBody struct {
	VersionString string `json:"version_string" binding:"required"`
}

CreateDeployRequestBody is used to extract any additional data needed to create a new deploy from the request body. currently this is just the version string as the environment and service are determined from path params

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL