Documentation ¶
Index ¶
- Variables
- func BadRequestResponse(c *gin.Context, err error)
- func BearerAuth(auth *auth.AuthTokenDB, handler gin.HandlerFunc) gin.HandlerFunc
- func GinMetrics(c *gin.Context)
- func RegisterMetrics()
- func ServiceUnavailableResponse(c *gin.Context, err error)
- func UnprocessableEntityResponse(c *gin.Context, message string)
- type Application
- type ErrorResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidRequest = errors.New("invalid request") ErrNotFound = errors.New("object not found") )
View Source
var (
ErrBadBearerToken = errors.New("missing or incorrectly formatted bearer token")
)
Functions ¶
func BadRequestResponse ¶ added in v0.0.6
func BearerAuth ¶ added in v0.0.5
func BearerAuth(auth *auth.AuthTokenDB, handler gin.HandlerFunc) gin.HandlerFunc
func GinMetrics ¶ added in v0.0.10
func RegisterMetrics ¶ added in v0.0.10
func RegisterMetrics()
func ServiceUnavailableResponse ¶ added in v0.0.6
func UnprocessableEntityResponse ¶ added in v0.0.6
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func New ¶
func New(art *artifactory.Artifactory, auth *auth.AuthTokenDB, workers *processor.WorkerDB, ) *Application
func (*Application) Start ¶
func (app *Application) Start(listen string) error
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
func NewErrorResponse ¶
func NewErrorResponse(message string) *ErrorResponse
Click to show internal directories.
Click to hide internal directories.