Documentation ¶
Index ¶
- type Container
- func ErrorResponse(mi MessageItem, statusCode int) *Container
- func ListResponse(data []interface{}) *Container
- func Response(data interface{}) *Container
- func ResponseWithStatusCode(data interface{}, statusCode int) *Container
- func WithDataOnly(data interface{}) *Container
- func WithErrorOnly(mi MessageItem, statusCode int) *Container
- type MessageItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { Errors []MessageItem `json:"errors,omitempty"` Data interface{} `json:"data,omitempty"` Warnings []MessageItem `json:"warnings,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` // contains filtered or unexported fields }
func ErrorResponse ¶
func ErrorResponse(mi MessageItem, statusCode int) *Container
func ListResponse ¶
func ListResponse(data []interface{}) *Container
func ResponseWithStatusCode ¶ added in v0.8.2
func WithDataOnly ¶ added in v0.8.2
func WithDataOnly(data interface{}) *Container
func WithErrorOnly ¶ added in v0.8.2
func WithErrorOnly(mi MessageItem, statusCode int) *Container
func (*Container) GetHeaders ¶
func (*Container) IsDecorated ¶ added in v0.8.2
type MessageItem ¶
Click to show internal directories.
Click to hide internal directories.