handler

package
v16.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Null

func Null(c echo.Context) error

Null is a handler that always returns NoContent

Types

type FSHandler added in v16.12.0

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

The FSHandler type provides handlers for manipulating a filesystem

func NewFS added in v16.12.0

func NewFS(fs fs.FS) *FSHandler

NewFS return a new FSHandler type. You have to provide a filesystem to act on.

func (*FSHandler) DeleteFile added in v16.12.0

func (h *FSHandler) DeleteFile(c echo.Context) error

func (*FSHandler) GetFile added in v16.12.0

func (h *FSHandler) GetFile(c echo.Context) error

func (*FSHandler) ListFiles added in v16.12.0

func (h *FSHandler) ListFiles(c echo.Context) error

func (*FSHandler) PutFile added in v16.12.0

func (h *FSHandler) PutFile(c echo.Context) error

type PingHandler

type PingHandler struct{}

The PingHandler type provides a handler for a ping requesr

func NewPing

func NewPing() *PingHandler

NewPing returns a neww Ping type.

func (*PingHandler) Ping

func (p *PingHandler) Ping(c echo.Context) error

Ping returns pong @Summary Liveliness check @Description Liveliness check @ID ping @Produce text/plain @Success 200 {string} string "pong" @Router /ping [get]

type ProfilingHandler

type ProfilingHandler struct{}

The ProfilingHandler type provides a function to register the porfiling endpoints

func NewProfiling

func NewProfiling() *ProfilingHandler

NewProfiling returns a new Profiling type

func (*ProfilingHandler) Register

func (p *ProfilingHandler) Register(r *echo.Group)

Register registers the different golang profiling endpoinds with a router @Summary Retrieve profiling data from the application @Description Retrieve profiling data from the application @ID profiling @Produce text/html @Success 200 {string} string @Failure 404 {string} string @Router /profiling [get]

type PrometheusHandler

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

The PrometheusHandler type provides a handler function for reading the prometheus metrics

func NewPrometheus

func NewPrometheus(handler http.Handler) *PrometheusHandler

NewPrometheus returns a new Prometheus type. You have to provide a HTTP.Handler

func (*PrometheusHandler) Metrics

func (m *PrometheusHandler) Metrics(c echo.Context) error

Metrics godoc @Summary Prometheus metrics @Description Prometheus metrics @ID metrics @Produce text/plain @Success 200 {string} string @Router /metrics [get]

Directories

Path Synopsis
Package api implements various handlers for the API routes
Package api implements various handlers for the API routes

Jump to

Keyboard shortcuts

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