Documentation ¶
Index ¶
- func MemberHref(memberID interface{}) string
- func MountMemberController(service *goa.Service, ctrl MemberController)
- type DataKindUUID
- type GenericData
- type GenericLinks
- type GenericLinksForMember
- type JSONAPIError
- type JSONAPIErrors
- type JSONAPILink
- type Member
- type MemberAttributes
- type MemberController
- type MemberRelationships
- type MemberSingle
- type RelationGeneric
- type RelationGenericList
- type RelationKindUUID
- type ShowMemberContext
- func (ctx *ShowMemberContext) BadRequest(r *JSONAPIErrors) error
- func (ctx *ShowMemberContext) InternalServerError(r *JSONAPIErrors) error
- func (ctx *ShowMemberContext) NotFound(r *JSONAPIErrors) error
- func (ctx *ShowMemberContext) NotModified() error
- func (ctx *ShowMemberContext) OK(r *MemberSingle) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MemberHref ¶
func MemberHref(memberID interface{}) string
MemberHref returns the resource href.
func MountMemberController ¶
func MountMemberController(service *goa.Service, ctrl MemberController)
MountMemberController "mounts" a Member resource controller on the given service.
Types ¶
type DataKindUUID ¶
type DataKindUUID struct { // UUID of the object ID uuid.UUID `form:"id" json:"id" xml:"id"` Type string `form:"type" json:"type" xml:"type"` }
DataKindUUID user type.
func (*DataKindUUID) Validate ¶
func (ut *DataKindUUID) Validate() (err error)
Validate validates the DataKindUUID type instance.
type GenericData ¶
type GenericData struct { // UUID of the object ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` Links *GenericLinks `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"` Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` }
GenericData user type.
type GenericLinks ¶
type GenericLinks struct { Meta map[string]interface{} `form:"meta,omitempty" json:"meta,omitempty" xml:"meta,omitempty"` Self *string `form:"self,omitempty" json:"self,omitempty" xml:"self,omitempty"` }
GenericLinks user type.
type GenericLinksForMember ¶
type GenericLinksForMember struct { Meta map[string]interface{} `form:"meta,omitempty" json:"meta,omitempty" xml:"meta,omitempty"` Self *string `form:"self,omitempty" json:"self,omitempty" xml:"self,omitempty"` }
GenericLinksForMember user type.
type JSONAPIError ¶
type JSONAPIError struct { // an application-specific error code, expressed as a string value. Code *string `form:"code,omitempty" json:"code,omitempty" xml:"code,omitempty"` // a human-readable explanation specific to this occurrence of the problem. // Like title, this field’s value can be localized. Detail string `form:"detail" json:"detail" xml:"detail"` // a unique identifier for this particular occurrence of the problem. ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // a links object containing the following members: // * about: a link that leads to further details about this particular occurrence of the problem. Links map[string]*JSONAPILink `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"` // a meta object containing non-standard meta-information about the error Meta map[string]interface{} `form:"meta,omitempty" json:"meta,omitempty" xml:"meta,omitempty"` // an object containing references to the source of the error, // optionally including any of the following members // // * pointer: a JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/data" for a primary data object, // or "/data/attributes/title" for a specific attribute]. // * parameter: a string indicating which URI query parameter caused the error. Source map[string]interface{} `form:"source,omitempty" json:"source,omitempty" xml:"source,omitempty"` // the HTTP status code applicable to this problem, expressed as a string value. Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` // a short, human-readable summary of the problem that SHOULD NOT // change from occurrence to occurrence of the problem, except for purposes of localization. Title *string `form:"title,omitempty" json:"title,omitempty" xml:"title,omitempty"` }
Error objects provide additional information about problems encountered while performing an operation. Error objects MUST be returned as an array keyed by errors in the top level of a JSON API document.
See. also http://jsonapi.org/format/#error-objects.
func (*JSONAPIError) Validate ¶
func (ut *JSONAPIError) Validate() (err error)
Validate validates the JSONAPIError type instance.
type JSONAPIErrors ¶
type JSONAPIErrors struct {
Errors []*JSONAPIError `form:"errors" json:"errors" xml:"errors"`
}
JSONAPIErrors media type (default view)
Identifier: application/vnd.jsonapierrors+json; view=default
func (*JSONAPIErrors) Validate ¶
func (mt *JSONAPIErrors) Validate() (err error)
Validate validates the JSONAPIErrors media type instance.
type JSONAPILink ¶
type JSONAPILink struct { // a string containing the link's URL. Href *string `form:"href,omitempty" json:"href,omitempty" xml:"href,omitempty"` // a meta object containing non-standard meta-information about the link. Meta map[string]interface{} `form:"meta,omitempty" json:"meta,omitempty" xml:"meta,omitempty"` }
type Member ¶
type Member struct { Attributes *MemberAttributes `form:"attributes" json:"attributes" xml:"attributes"` // The unique ID of the member ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` Links *GenericLinksForMember `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"` Relationships *MemberRelationships `form:"relationships,omitempty" json:"relationships,omitempty" xml:"relationships,omitempty"` // The type of the related resource Type string `form:"type" json:"type" xml:"type"` }
Member user type.
type MemberAttributes ¶
type MemberAttributes struct { // Name of the member Name string `form:"name" json:"name" xml:"name"` }
MemberAttributes user type.
func (*MemberAttributes) Validate ¶
func (ut *MemberAttributes) Validate() (err error)
Validate validates the MemberAttributes type instance.
type MemberController ¶
type MemberController interface { goa.Muxer Show(*ShowMemberContext) error }
MemberController is the controller interface for the Member actions.
type MemberRelationships ¶
type MemberRelationships struct { // A Member can link external accounts like github or stackoverflow. Accounts *RelationGeneric `form:"accounts,omitempty" json:"accounts,omitempty" xml:"accounts,omitempty"` }
MemberRelationships user type.
type MemberSingle ¶
type MemberSingle struct { Data *Member `form:"data" json:"data" xml:"data"` // An array of mixed types Included []interface{} `form:"included,omitempty" json:"included,omitempty" xml:"included,omitempty"` }
Holds a single response to a member request (default view)
Identifier: application/vnd.member+json; view=default
func (*MemberSingle) Validate ¶
func (mt *MemberSingle) Validate() (err error)
Validate validates the MemberSingle media type instance.
type RelationGeneric ¶
type RelationGeneric struct { Data *GenericData `form:"data,omitempty" json:"data,omitempty" xml:"data,omitempty"` Links *GenericLinks `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"` Meta map[string]interface{} `form:"meta,omitempty" json:"meta,omitempty" xml:"meta,omitempty"` }
RelationGeneric user type.
type RelationGenericList ¶
type RelationGenericList struct { Data []*GenericData `form:"data,omitempty" json:"data,omitempty" xml:"data,omitempty"` Links *GenericLinks `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"` Meta map[string]interface{} `form:"meta,omitempty" json:"meta,omitempty" xml:"meta,omitempty"` }
RelationGenericList user type.
type RelationKindUUID ¶
type RelationKindUUID struct { Data *DataKindUUID `form:"data,omitempty" json:"data,omitempty" xml:"data,omitempty"` Links *GenericLinks `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"` Meta map[string]interface{} `form:"meta,omitempty" json:"meta,omitempty" xml:"meta,omitempty"` }
RelationKindUUID user type.
func (*RelationKindUUID) Validate ¶
func (ut *RelationKindUUID) Validate() (err error)
Validate validates the RelationKindUUID type instance.
type ShowMemberContext ¶
type ShowMemberContext struct { context.Context *goa.ResponseData *goa.RequestData IfModifiedSince *string IfNoneMatch *string MemberID string }
ShowMemberContext provides the member show action context.
func NewShowMemberContext ¶
func NewShowMemberContext(ctx context.Context, r *http.Request, service *goa.Service) (*ShowMemberContext, error)
NewShowMemberContext parses the incoming request URL and body, performs validations and creates the context used by the member controller show action.
func (*ShowMemberContext) BadRequest ¶
func (ctx *ShowMemberContext) BadRequest(r *JSONAPIErrors) error
BadRequest sends a HTTP response with status code 400.
func (*ShowMemberContext) InternalServerError ¶
func (ctx *ShowMemberContext) InternalServerError(r *JSONAPIErrors) error
InternalServerError sends a HTTP response with status code 500.
func (*ShowMemberContext) NotFound ¶
func (ctx *ShowMemberContext) NotFound(r *JSONAPIErrors) error
NotFound sends a HTTP response with status code 404.
func (*ShowMemberContext) NotModified ¶
func (ctx *ShowMemberContext) NotModified() error
NotModified sends a HTTP response with status code 304.
func (*ShowMemberContext) OK ¶
func (ctx *ShowMemberContext) OK(r *MemberSingle) error
OK sends a HTTP response with status code 200.