handler

package
v0.0.0-...-acc543f Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(lc fx.Lifecycle, logger *zap.Logger, config *Config, echo *echo.Echo) (*http.Server, error)

Types

type Config

type Config struct {
	Port int32 `yaml:"port"`
}

type Handler

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

func NewHandler

func NewHandler(p HandlerParams) *Handler

func (*Handler) GetHealthz

func (h *Handler) GetHealthz(c echo.Context) error

func (*Handler) GetMetrics

func (h *Handler) GetMetrics(c echo.Context) error

type HandlerParams

type HandlerParams struct {
	fx.In

	Log       *zap.Logger
	Cache     *cache.Cache        `optional:"true"`
	Statsd    *statsd.Client      `optional:"true"`
	Validator *validator.Validate `optional:"true"`
}

type PinsHandler

type PinsHandler struct {
	PI *pi.PI
}

func NewPinsHandler

func NewPinsHandler(pi *pi.PI) *PinsHandler

func (*PinsHandler) GetPinStatus

func (p *PinsHandler) GetPinStatus(c echo.Context) error

func (*PinsHandler) TogglePin

func (p *PinsHandler) TogglePin(c echo.Context) error

Jump to

Keyboard shortcuts

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