server

package
v0.0.10 Latest Latest
Warning

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

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

Documentation

Index

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 BadRequestResponse(c *gin.Context, err error)

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 GinMetrics(c *gin.Context)

func RegisterMetrics added in v0.0.10

func RegisterMetrics()

func ServiceUnavailableResponse added in v0.0.6

func ServiceUnavailableResponse(c *gin.Context, err error)

func UnprocessableEntityResponse added in v0.0.6

func UnprocessableEntityResponse(c *gin.Context, message string)

Types

type Application

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

func New

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

Jump to

Keyboard shortcuts

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