Documentation ¶
Index ¶
- func WithError(err error) func(*Response) *Response
- func WithHttpCode(httpCode int) func(*Response) *Response
- func WithMessage(message string) func(*Response) *Response
- func WithPayload(payload interface{}) func(*Response) *Response
- func WithQuery(query interface{}) func(*Response) *Response
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithHttpCode ¶
func WithMessage ¶
func WithPayload ¶
Types ¶
type Response ¶
type Response struct { HttpCode int `json:"-"` Success bool `json:"success"` Message string `json:"message"` Payload interface{} `json:"payload,omitempty"` Query interface{} `json:"query,omitempty"` Error string `json:"error,omitempty"` ErrorCode string `json:"error_code,omitempty"` }
func NewResponse ¶
Click to show internal directories.
Click to hide internal directories.