Documentation ¶
Overview ¶
Package response provides data structure to build HTTP JSON response structure.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { // Errors represents list of errors that are visible in response. Errors []error `json:"errors"` // Meta represents auxiliary data that is visible in response. Meta interface{} `json:"meta"` }
Error represents error response.
type Success ¶
type Success struct { // Data represents any primary data that is visible in response. Data interface{} `json:"data"` // Meta represents auxiliary data that is visible in response. Meta interface{} `json:"meta"` }
Success represents success response.
func NewSuccess ¶
func NewSuccess(data, meta interface{}) *Success
NewSuccess creates an instance of Success response.
Click to show internal directories.
Click to hide internal directories.