Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEchoHandler ¶
func NewEchoHandler(s *server.EchoServer, p cache.Cache)
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
Click to show internal directories.
Click to hide internal directories.