rest

package
v0.0.0-...-87b546a Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseOptions

func ParseOptions(r *http.Request) meta.ImageOptions

func ProvideRoutes

func ProvideRoutes(rest RestfulHandler) *chi.Mux

Types

type RestfulHandler

type RestfulHandler interface {
	// Endpoint handlers:
	Get(http.ResponseWriter, *http.Request)
	GetCropped(http.ResponseWriter, *http.Request)
	GetResized(http.ResponseWriter, *http.Request)
	GetThumbnail(http.ResponseWriter, *http.Request)
	Post(http.ResponseWriter, *http.Request)
	// Middleware:
	Authenticator(next http.Handler) http.Handler
	Authorizer(next http.Handler) http.Handler
	CacheController(next http.Handler) http.Handler
	// Health
	HealthZ(http.ResponseWriter, *http.Request)
	ReadyZ(http.ResponseWriter, *http.Request)
}

func NewHandler

func NewHandler(service service.ContentService, auth service.AuthService, config env.CommonConfig) RestfulHandler

Jump to

Keyboard shortcuts

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