service

package
v0.0.0-...-eae78d9 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidParam = HttpError(http.StatusBadRequest, "InvalidParameter", "Invalid parameter.")
	ErrNotFound     = HttpError(http.StatusNotFound, "NotFound", "Request resource not found.")
	ErrDB           = HttpError(http.StatusInternalServerError, "DBError", "DB error.")
	ErrInnerServErr = HttpError(http.StatusInternalServerError,
		"InternalServerError", "Internal server error, please try again later.")
)

Functions

func BindValidPipe

func BindValidPipe(c *gin.Context) (pipe *model.Pipeline, err error)

----------------------------------------------------------------- BindPipe

func BindValidPlugin

func BindValidPlugin(c *gin.Context) (plugin *model.Plugin, err error)

----------------------------------------------------------------- BindPipe

func E

func E(c *gin.Context, e *httpError)

-------------------------------------------------------------------- Error response

func HttpError

func HttpError(code int, errCode, errMessage string) *httpError

func R

func R(c *gin.Context, body interface{})

Normal response

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *model.Config) *Service

func (*Service) DeletePipe

func (s *Service) DeletePipe(c *gin.Context)

delete pipe

func (*Service) DeletePlugin

func (s *Service) DeletePlugin(c *gin.Context)

delete build

func (*Service) GetBuild

func (s *Service) GetBuild(c *gin.Context)

get build

func (*Service) GetBuildInQueue

func (s *Service) GetBuildInQueue(c *gin.Context)

func (*Service) GetHook

func (s *Service) GetHook(c *gin.Context)

----------------------------------------------------------------- hook hook for git repo

func (*Service) GetLog

func (s *Service) GetLog(c *gin.Context)

----------------------------------------------------------------- log get whole build / single step log

func (*Service) GetMessage

func (s *Service) GetMessage(c *gin.Context)

----------------------------------------------------------------- message allow build step send message to master

func (*Service) GetPing

func (s *Service) GetPing(c *gin.Context)

func (*Service) GetPipe

func (s *Service) GetPipe(c *gin.Context)

get pipe

func (*Service) GetPlugin

func (s *Service) GetPlugin(c *gin.Context)

get build

func (*Service) PatchBuild

func (s *Service) PatchBuild(c *gin.Context)

pause/continue/stop build

func (*Service) PatchPipe

func (s *Service) PatchPipe(c *gin.Context)

update pipe

func (*Service) PatchPlugin

func (s *Service) PatchPlugin(c *gin.Context)

update build

func (*Service) PostBuild

func (s *Service) PostBuild(c *gin.Context)

----------------------------------------------------------------- build trigger build

func (*Service) PostPipe

func (s *Service) PostPipe(c *gin.Context)

----------------------------------------------------------------- pipe create pipe

func (*Service) PostPlugin

func (s *Service) PostPlugin(c *gin.Context)

----------------------------------------------------------------- plugin create build

Jump to

Keyboard shortcuts

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