handler

package
v0.0.0-...-10b8de3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorCustomizer

type ErrorCustomizer interface {
	InvalidRequestParameterError(error) interface{}
	UserAuthenticationError(error) interface{}
	ServerError(error) interface{}
	NoDataError(error) interface{}
}

ErrorCustomizer used to transform low-level errors before render them to http response. It could be used to provide app-specific error code or i18n. Values returned by interface methods are marshalled into response. Note, that with current implementation, JSON marshaller used to marshall errors. Errors may be any structures, not necessary implement error interface. ErrorCustomizer implementation should hide low-level details (stack trace, technical error details) from the end user.

func NewErrorCustomizer

func NewErrorCustomizer() ErrorCustomizer

type Handler

type Handler interface {
	Login(c echo.Context) error
	GetProfile(c echo.Context) error
	GetDictionaries(c echo.Context) error
	SearchAppointments(c echo.Context) error
	GetAppointment(c echo.Context) error
	GetAppointmentDocx(c echo.Context) error
	SaveAppointment(c echo.Context) error
}

func New

func New(cfg config.Config, dao store.Dao, ec ErrorCustomizer) Handler

Jump to

Keyboard shortcuts

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