Documentation ¶
Index ¶
- func ReturnDataMessage(c echo.Context, code int, msg string, data interface{}) error
- func ReturnDataMessageU(c echo.Context, code int, msg string, data interface{}) error
- func ReturnError(c echo.Context, err error) error
- func ReturnErrorU(c echo.Context, err error) error
- func ReturnListDataMessage(c echo.Context, code int, msg string, data []interface{}) error
- func ReturnListDataMessageU(c echo.Context, code int, msg string, data []interface{}) error
- func ReturnMessage(c echo.Context, code int, msg string) error
- func ReturnMessageU(c echo.Context, code int, msg string) error
- func TryGetQueryString(c echo.Context, names ...string) string
- type Controller
- type ControllerMethod
- type EchoServer
- type HTTPDataResponse
- type HTTPListResponse
- type HTTPPageResponse
- type HTTPResponse
- type HttpDataResponse
- type HttpListResponse
- type HttpPageResponse
- type HttpResponse
- type MethodType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReturnDataMessage ¶
func ReturnDataMessageU ¶
func ReturnError ¶
func ReturnErrorU ¶
func ReturnListDataMessage ¶
func ReturnListDataMessageU ¶
func ReturnMessage ¶
func ReturnMessageU ¶
Types ¶
type Controller ¶
type Controller struct { Context *echo.Echo Group *echo.Group // contains filtered or unexported fields }
/defin controller
func (*Controller) AddHandle ¶
func (c *Controller) AddHandle(m MethodType, p string, h echo.HandlerFunc)
func (*Controller) RegisterController ¶
func (c *Controller) RegisterController()
type ControllerMethod ¶
type ControllerMethod struct { Method MethodType Path string Handle echo.HandlerFunc }
/define api function
type EchoServer ¶
type EchoServer struct { Context *echo.Echo // contains filtered or unexported fields }
/define server
func (*EchoServer) NewController ¶
func (c *EchoServer) NewController(path string) *Controller
func (*EchoServer) RegisterController ¶
func (c *EchoServer) RegisterController()
func (*EchoServer) Start ¶
func (c *EchoServer) Start(host string, port string)
func (*EchoServer) StartUrl ¶
func (c *EchoServer) StartUrl(url string)
type HTTPDataResponse ¶
type HTTPDataResponse struct { HttpResponse Data interface{} `json:"Data"` }
type HTTPListResponse ¶
type HTTPListResponse struct { HttpResponse Data []interface{} `json:"Data"` }
type HTTPPageResponse ¶
type HTTPResponse ¶
type HttpDataResponse ¶
type HttpDataResponse struct { HttpResponse Data interface{} `json:"data"` }
type HttpListResponse ¶
type HttpListResponse struct { HttpResponse Data []interface{} `json:"data"` }
type HttpPageResponse ¶
type HttpResponse ¶
type MethodType ¶
type MethodType uint32
/define http method
const ( GET MethodType = 1 + iota POST PUT DELETE )
Click to show internal directories.
Click to hide internal directories.