api

package
v0.0.0-...-f39fe76 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEchoHandler

func NewEchoHandler(s *server.EchoServer, p cache.Cache)

func Run

func Run(conf config.Config)

func Shutdown

func Shutdown() error

Types

type EchoHandler

type EchoHandler struct {
	Server *server.EchoServer
	Cache  cache.Cache
}

func (*EchoHandler) AddKeyValue

func (h *EchoHandler) AddKeyValue(c echo.Context) error

AddKeyValue godoc @Summary create key value @Description create an pair of key value @Accept json @Produce json @Success 204 @Failure 400 {object} errors.HTTPError @Router /keys [put]

func (*EchoHandler) GetKeyValue

func (h *EchoHandler) GetKeyValue(c echo.Context) error

GetKeyValue godoc @Summary GetKeyValue a key @Description get string by key @ID get-value-by-key @Accept json @Produce json @Param key path int true "key" @Success 200 {object} model.KeyValue @Failure 400 {object} errors.HTTPError @Router /keys/{key} [get]

func (*EchoHandler) Top

func (h *EchoHandler) Top(c echo.Context) error

Jump to

Keyboard shortcuts

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