Documentation ¶
Index ¶
- type Attribute
- type Base
- type DashboardPayload
- type EntriesGroup
- type Entry
- type Error
- func Error401Unauthorized() *Error
- func Error403Forbidden() *Error
- func Error404NotFound() *Error
- func Error405MethodNotAllowed() *Error
- func Error408RequestTimeout() *Error
- func Error409Conflict() *Error
- func Error415UnsupportedMediaType() *Error
- func Error500InternalServerError() *Error
- func Error502BadGateway() *Error
- func Error503ServiceUnavailable() *Error
- type ErrorResource
- type Model
- type ModelsGroup
- type Request
- func (req *Request) Receive() *Request
- func (req *Request) WithIncluded(resources ...RestfulResource) *Request
- func (req *Request) WithResource(resource RestfulResource) *Request
- func (req *Request) WithResourceArr(resources interface{}) *Request
- func (req *Request) WithResources(resources ...RestfulResource) *Request
- type Response
- func (res *Response) Send()
- func (res *Response) WithHeader(key, val string) *Response
- func (res *Response) WithLinks(links *Links) *Response
- func (res *Response) WithResource(resource RestfulResource) *Response
- func (res *Response) WithResourceArr(resources interface{}) *Response
- func (res *Response) WithResources(resources ...RestfulResource) *Response
- func (res *Response) WithStatus(status int) *Response
- type RestfulResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute struct { Type string `json:"type"` Default interface{} `json:"default,omitempty"` }
type DashboardPayload ¶
type DashboardPayload struct { Base Base `json:"base"` Entries []EntriesGroup `json:"entries"` Models []ModelsGroup `json:"models"` }
type EntriesGroup ¶
type Error ¶
type Error struct { Status int `json:"status"` Title string `json:"title"` Detail string `json:"detail"` Source string `json:"source"` }
func Error403Forbidden ¶
func Error403Forbidden() *Error
func Error404NotFound ¶
func Error404NotFound() *Error
func Error405MethodNotAllowed ¶
func Error405MethodNotAllowed() *Error
func Error408RequestTimeout ¶
func Error408RequestTimeout() *Error
func Error409Conflict ¶
func Error409Conflict() *Error
func Error415UnsupportedMediaType ¶
func Error415UnsupportedMediaType() *Error
func Error500InternalServerError ¶
func Error500InternalServerError() *Error
func Error502BadGateway ¶
func Error502BadGateway() *Error
func Error503ServiceUnavailable ¶
func Error503ServiceUnavailable() *Error
type ErrorResource ¶
type ErrorResource struct { *Resource Errors []*Error `json:"errors"` }
func NewErrorResource ¶
func NewErrorResource(errors ...*Error) *ErrorResource
type ModelsGroup ¶
type Request ¶
type Request struct { Resources interface{} `json:"data"` Included interface{} `json:"included"` // contains filtered or unexported fields }
func NewRequest ¶
func NewRequest() *Request
func (*Request) WithIncluded ¶
func (req *Request) WithIncluded(resources ...RestfulResource) *Request
func (*Request) WithResource ¶
func (req *Request) WithResource(resource RestfulResource) *Request
func (*Request) WithResourceArr ¶
func (*Request) WithResources ¶
func (req *Request) WithResources(resources ...RestfulResource) *Request
type Response ¶
type Response struct { Resources interface{} `json:"data"` Links *Links `json:"links"` // contains filtered or unexported fields }
func NewResponse ¶
func NewResponse() *Response
func Writer ¶
func Writer(w http.ResponseWriter) *Response
func (*Response) WithHeader ¶
func (*Response) WithResource ¶
func (res *Response) WithResource(resource RestfulResource) *Response
func (*Response) WithResourceArr ¶
func (*Response) WithResources ¶
func (res *Response) WithResources(resources ...RestfulResource) *Response
func (*Response) WithStatus ¶
type RestfulResource ¶
Click to show internal directories.
Click to hide internal directories.