server

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadBearerToken = errors.New("missing or incorrectly formatted bearer token")
)

Functions

func BearerAuth added in v0.0.5

func BearerAuth(auth *auth.AuthTokenDB, handler gin.HandlerFunc) gin.HandlerFunc

Types

type Application

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

func New

func New(artifactory *artifactory.Artifactory, auth *auth.AuthTokenDB) *Application

func (*Application) Start

func (app *Application) Start(listen string) error

type CreateBuildJobRequest

type CreateBuildJobRequest struct {
	CommitHash string               `json:"commit_hash"`
	Flags      []firmware.BuildFlag `json:"flags"`
}

func (*CreateBuildJobRequest) Validate

func (req *CreateBuildJobRequest) Validate() []error

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

func NewErrorResponse

func NewErrorResponse(message string) *ErrorResponse

type GetBuildStatusRequest

type GetBuildStatusRequest struct {
	CommitHash string               `json:"commit_hash"`
	Flags      []firmware.BuildFlag `json:"flags"`
}

func (*GetBuildStatusRequest) Validate

func (req *GetBuildStatusRequest) Validate() []error

type ValidationErrorResponse

type ValidationErrorResponse struct {
	Error            string   `json:"error"`
	ValidationErrors []string `json:"validation_errors"`
}

func NewValidationErrorResponse

func NewValidationErrorResponse(message string, errs []error) *ValidationErrorResponse

Jump to

Keyboard shortcuts

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