Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrorPayload ¶
type ErrorPayload struct {
Errors []ErrorPayloadItem `json:"errors"`
}
ErrorPayload represents a uniform format for all error API responses.
func NewErrAPIPayloadFromError ¶
func NewErrAPIPayloadFromError(err error, code, detail string) ErrorPayload
func NewErrAPIPayloadFromMessage ¶
func NewErrAPIPayloadFromMessage(code, title, detail string) ErrorPayload
type ErrorPayloadItem ¶
type ErrorPayloadItem struct { Code string `json:"code"` Title string `json:"title"` Detail string `json:"detail"` }
ErrorPayloadItem represents a uniform format for a single error used in API responses.
type ExecuteInput ¶
type SuccessPayload ¶
type SuccessPayload struct { Data interface{} `json:"data"` Meta *Meta `json:"meta,omitempty"` Links Links `json:"links,omitempty"` }
SuccessPayload represents a uniform format for all successful API responses.
func NewSuccessPayload ¶
func NewSuccessPayload(data interface{}) SuccessPayload
Click to show internal directories.
Click to hide internal directories.