Documentation ¶
Index ¶
- func FromPlainJson(data []byte, v interface{}) error
- func Logging(l *logging.Logger) echo.MiddlewareFunc
- func ToPlainJson(v interface{}) ([]byte, error)
- func Traffic(acceptTraffic *atomic.Bool) echo.MiddlewareFunc
- type ErrorMessage
- type Response
- func (res *Response) Marshal() []byte
- func (res *Response) Send() error
- func (res *Response) SetError(err error) *Response
- func (res *Response) SetErrorWithText(errText string) *Response
- func (res *Response) SetHttpCode(value int) *Response
- func (res *Response) SetResponseBody(data interface{}) *Response
- func (res *Response) Unmarshal(v interface{}) error
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromPlainJson ¶
func ToPlainJson ¶
Types ¶
type ErrorMessage ¶
type Response ¶
type Response struct { IsError bool `json:"is_error"` Message string `json:"message"` Data json.RawMessage `json:"data"` // contains filtered or unexported fields }
func NewResponse ¶
func NewResponse(c echo.Context) *Response
func (*Response) SetErrorWithText ¶
func (*Response) SetHttpCode ¶
func (*Response) SetResponseBody ¶
Click to show internal directories.
Click to hide internal directories.