Documentation ¶
Index ¶
- Constants
- Variables
- type Apps
- type Config
- type Context
- type Controller
- func (cntl *Controller) Add(method, path string, h HandlerFunc, m ...echo.MiddlewareFunc)
- func (cntl *Controller) Child(prefix string) *Controller
- func (cntl *Controller) DELETE(path string, h HandlerFunc, m ...echo.MiddlewareFunc)
- func (cntl *Controller) GET(path string, h HandlerFunc, m ...echo.MiddlewareFunc)
- func (cntl *Controller) NewContext(c echo.Context) *Context
- func (cntl *Controller) POST(path string, h HandlerFunc, m ...echo.MiddlewareFunc)
- func (cntl *Controller) PUT(path string, h HandlerFunc, m ...echo.MiddlewareFunc)
- type Core
- type HandlerFunc
- type Response
- type Server
Constants ¶
View Source
const ( ResponseStateSuccess = "success" ResponseStateError = "error" )
Variables ¶
View Source
var (
ErrUnknownLogLevel = errors.New("Unknown log level")
)
Functions ¶
This section is empty.
Types ¶
type Apps ¶
type Apps struct { Auth auth.Application User user.Application }
type Config ¶
type Context ¶
func (*Context) JSONSuccess ¶
type Controller ¶
func (*Controller) Add ¶
func (cntl *Controller) Add(method, path string, h HandlerFunc, m ...echo.MiddlewareFunc)
func (*Controller) Child ¶
func (cntl *Controller) Child(prefix string) *Controller
func (*Controller) DELETE ¶
func (cntl *Controller) DELETE(path string, h HandlerFunc, m ...echo.MiddlewareFunc)
func (*Controller) GET ¶
func (cntl *Controller) GET(path string, h HandlerFunc, m ...echo.MiddlewareFunc)
func (*Controller) NewContext ¶
func (cntl *Controller) NewContext(c echo.Context) *Context
func (*Controller) POST ¶
func (cntl *Controller) POST(path string, h HandlerFunc, m ...echo.MiddlewareFunc)
func (*Controller) PUT ¶
func (cntl *Controller) PUT(path string, h HandlerFunc, m ...echo.MiddlewareFunc)
type HandlerFunc ¶
type Response ¶
type Response struct { State string `json:"state"` Result interface{} `json:"result"` }
func NewErrorResponse ¶
func NewSuccessResponse ¶
func NewSuccessResponse(result interface{}) *Response
type Server ¶
type Server struct { *Controller // contains filtered or unexported fields }
func (*Server) Base ¶
func (srv *Server) Base() *Controller
Source Files ¶
Click to show internal directories.
Click to hide internal directories.