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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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