Documentation ¶
Index ¶
- func AccountHref(accountID interface{}) string
- func BottleHref(accountID, bottleID interface{}) string
- func MountAccountController(service *goa.Service, ctrl AccountController)
- func MountBottleController(service *goa.Service, ctrl BottleController)
- func MountHealthController(service *goa.Service, ctrl HealthController)
- func MountJsController(service *goa.Service, ctrl JsController)
- func MountPublicController(service *goa.Service, ctrl PublicController)
- func MountSwaggerController(service *goa.Service, ctrl SwaggerController)
- type Account
- type AccountCollection
- type AccountController
- type AccountLink
- type AccountLinkCollection
- type AccountTiny
- type AccountTinyCollection
- type Bottle
- type BottleCollection
- type BottleController
- type BottleFull
- type BottleLinks
- type BottleLinksArray
- type BottlePayload
- type BottleTiny
- type BottleTinyCollection
- type CreateAccountContext
- type CreateAccountPayload
- type CreateBottleContext
- type CreateBottlePayload
- type DeleteAccountContext
- type DeleteBottleContext
- type HealthController
- type HealthHealthContext
- type JsController
- type ListAccountContext
- type ListBottleContext
- type PublicController
- type RateBottleContext
- type RateBottlePayload
- type ShowAccountContext
- type ShowBottleContext
- type SwaggerController
- type UpdateAccountContext
- type UpdateAccountPayload
- type UpdateBottleContext
- type WatchBottleContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountHref ¶
func AccountHref(accountID interface{}) string
AccountHref returns the resource href.
func BottleHref ¶
func BottleHref(accountID, bottleID interface{}) string
BottleHref returns the resource href.
func MountAccountController ¶
func MountAccountController(service *goa.Service, ctrl AccountController)
MountAccountController "mounts" a Account resource controller on the given service.
func MountBottleController ¶
func MountBottleController(service *goa.Service, ctrl BottleController)
MountBottleController "mounts" a Bottle resource controller on the given service.
func MountHealthController ¶
func MountHealthController(service *goa.Service, ctrl HealthController)
MountHealthController "mounts" a Health resource controller on the given service.
func MountJsController ¶
func MountJsController(service *goa.Service, ctrl JsController)
MountJsController "mounts" a Js resource controller on the given service.
func MountPublicController ¶
func MountPublicController(service *goa.Service, ctrl PublicController)
MountPublicController "mounts" a Public resource controller on the given service.
func MountSwaggerController ¶
func MountSwaggerController(service *goa.Service, ctrl SwaggerController)
MountSwaggerController "mounts" a Swagger resource controller on the given service.
Types ¶
type Account ¶
type Account struct { // Date of creation CreatedAt time.Time `form:"created_at" json:"created_at" xml:"created_at"` // Email of account owner CreatedBy string `form:"created_by" json:"created_by" xml:"created_by"` // API href of account Href string `form:"href" json:"href" xml:"href"` // ID of account ID int `form:"id" json:"id" xml:"id"` // Name of account Name string `form:"name" json:"name" xml:"name"` }
A tenant account (default view)
Identifier: application/vnd.account+json; view=default
type AccountCollection ¶
type AccountCollection []*Account
AccountCollection is the media type for an array of Account (default view)
Identifier: application/vnd.account+json; type=collection; view=default
func (AccountCollection) Validate ¶
func (mt AccountCollection) Validate() (err error)
Validate validates the AccountCollection media type instance.
type AccountController ¶
type AccountController interface { goa.Muxer Create(*CreateAccountContext) error Delete(*DeleteAccountContext) error List(*ListAccountContext) error Show(*ShowAccountContext) error Update(*UpdateAccountContext) error }
AccountController is the controller interface for the Account actions.
type AccountLink ¶
type AccountLink struct { // API href of account Href string `form:"href" json:"href" xml:"href"` // ID of account ID int `form:"id" json:"id" xml:"id"` }
A tenant account (link view)
Identifier: application/vnd.account+json; view=link
func (*AccountLink) Validate ¶
func (mt *AccountLink) Validate() (err error)
Validate validates the AccountLink media type instance.
type AccountLinkCollection ¶
type AccountLinkCollection []*AccountLink
AccountCollection is the media type for an array of Account (link view)
Identifier: application/vnd.account+json; type=collection; view=link
func (AccountLinkCollection) Validate ¶
func (mt AccountLinkCollection) Validate() (err error)
Validate validates the AccountLinkCollection media type instance.
type AccountTiny ¶
type AccountTiny struct { // API href of account Href string `form:"href" json:"href" xml:"href"` // ID of account ID int `form:"id" json:"id" xml:"id"` // Name of account Name string `form:"name" json:"name" xml:"name"` }
A tenant account (tiny view)
Identifier: application/vnd.account+json; view=tiny
func (*AccountTiny) Validate ¶
func (mt *AccountTiny) Validate() (err error)
Validate validates the AccountTiny media type instance.
type AccountTinyCollection ¶
type AccountTinyCollection []*AccountTiny
AccountCollection is the media type for an array of Account (tiny view)
Identifier: application/vnd.account+json; type=collection; view=tiny
func (AccountTinyCollection) Validate ¶
func (mt AccountTinyCollection) Validate() (err error)
Validate validates the AccountTinyCollection media type instance.
type Bottle ¶
type Bottle struct { // Account that owns bottle Account *AccountTiny `form:"account,omitempty" json:"account,omitempty" xml:"account,omitempty"` // API href of bottle Href string `form:"href" json:"href" xml:"href"` // ID of bottle ID int `form:"id" json:"id" xml:"id"` // Links to related resources Links *BottleLinks `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"` Name string `form:"name" json:"name" xml:"name"` // Rating of bottle between 1 and 5 Rating *int `form:"rating,omitempty" json:"rating,omitempty" xml:"rating,omitempty"` Varietal string `form:"varietal" json:"varietal" xml:"varietal"` Vineyard string `form:"vineyard" json:"vineyard" xml:"vineyard"` Vintage int `form:"vintage" json:"vintage" xml:"vintage"` }
A bottle of wine (default view)
Identifier: application/vnd.bottle+json; view=default
type BottleCollection ¶
type BottleCollection []*Bottle
BottleCollection is the media type for an array of Bottle (default view)
Identifier: application/vnd.bottle+json; type=collection; view=default
func (BottleCollection) Validate ¶
func (mt BottleCollection) Validate() (err error)
Validate validates the BottleCollection media type instance.
type BottleController ¶
type BottleController interface { goa.Muxer Create(*CreateBottleContext) error Delete(*DeleteBottleContext) error List(*ListBottleContext) error Rate(*RateBottleContext) error Show(*ShowBottleContext) error Update(*UpdateBottleContext) error Watch(*WatchBottleContext) error }
BottleController is the controller interface for the Bottle actions.
type BottleFull ¶
type BottleFull struct { // Account that owns bottle Account *Account `form:"account,omitempty" json:"account,omitempty" xml:"account,omitempty"` Color string `form:"color" json:"color" xml:"color"` Country *string `form:"country,omitempty" json:"country,omitempty" xml:"country,omitempty"` // Date of creation CreatedAt time.Time `form:"created_at" json:"created_at" xml:"created_at"` // API href of bottle Href string `form:"href" json:"href" xml:"href"` // ID of bottle ID int `form:"id" json:"id" xml:"id"` // Links to related resources Links *BottleLinks `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"` Name string `form:"name" json:"name" xml:"name"` // Rating of bottle between 1 and 5 Rating *int `form:"rating,omitempty" json:"rating,omitempty" xml:"rating,omitempty"` Region *string `form:"region,omitempty" json:"region,omitempty" xml:"region,omitempty"` Review *string `form:"review,omitempty" json:"review,omitempty" xml:"review,omitempty"` Sweetness *int `form:"sweetness,omitempty" json:"sweetness,omitempty" xml:"sweetness,omitempty"` // Date of last update UpdatedAt *time.Time `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` Varietal string `form:"varietal" json:"varietal" xml:"varietal"` Vineyard string `form:"vineyard" json:"vineyard" xml:"vineyard"` Vintage int `form:"vintage" json:"vintage" xml:"vintage"` }
A bottle of wine (full view)
Identifier: application/vnd.bottle+json; view=full
func (*BottleFull) Validate ¶
func (mt *BottleFull) Validate() (err error)
Validate validates the BottleFull media type instance.
type BottleLinks ¶
type BottleLinks struct {
Account *AccountLink `form:"account,omitempty" json:"account,omitempty" xml:"account,omitempty"`
}
BottleLinks contains links to related resources of Bottle.
func (*BottleLinks) Validate ¶
func (ut *BottleLinks) Validate() (err error)
Validate validates the BottleLinks type instance.
type BottleLinksArray ¶
type BottleLinksArray []*BottleLinks
BottleLinksArray contains links to related resources of BottleCollection.
func (BottleLinksArray) Validate ¶
func (ut BottleLinksArray) Validate() (err error)
Validate validates the BottleLinksArray type instance.
type BottlePayload ¶
type BottlePayload struct { Color *string `form:"color,omitempty" json:"color,omitempty" xml:"color,omitempty"` Country *string `form:"country,omitempty" json:"country,omitempty" xml:"country,omitempty"` Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` Region *string `form:"region,omitempty" json:"region,omitempty" xml:"region,omitempty"` Review *string `form:"review,omitempty" json:"review,omitempty" xml:"review,omitempty"` Sweetness *int `form:"sweetness,omitempty" json:"sweetness,omitempty" xml:"sweetness,omitempty"` Varietal *string `form:"varietal,omitempty" json:"varietal,omitempty" xml:"varietal,omitempty"` Vineyard *string `form:"vineyard,omitempty" json:"vineyard,omitempty" xml:"vineyard,omitempty"` Vintage *int `form:"vintage,omitempty" json:"vintage,omitempty" xml:"vintage,omitempty"` }
BottlePayload user type.
func (*BottlePayload) Validate ¶
func (ut *BottlePayload) Validate() (err error)
Validate validates the BottlePayload type instance.
type BottleTiny ¶
type BottleTiny struct { // API href of bottle Href string `form:"href" json:"href" xml:"href"` // ID of bottle ID int `form:"id" json:"id" xml:"id"` // Links to related resources Links *BottleLinks `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"` Name string `form:"name" json:"name" xml:"name"` // Rating of bottle between 1 and 5 Rating *int `form:"rating,omitempty" json:"rating,omitempty" xml:"rating,omitempty"` }
A bottle of wine (tiny view)
Identifier: application/vnd.bottle+json; view=tiny
func (*BottleTiny) Validate ¶
func (mt *BottleTiny) Validate() (err error)
Validate validates the BottleTiny media type instance.
type BottleTinyCollection ¶
type BottleTinyCollection []*BottleTiny
BottleCollection is the media type for an array of Bottle (tiny view)
Identifier: application/vnd.bottle+json; type=collection; view=tiny
func (BottleTinyCollection) Validate ¶
func (mt BottleTinyCollection) Validate() (err error)
Validate validates the BottleTinyCollection media type instance.
type CreateAccountContext ¶
type CreateAccountContext struct { context.Context *goa.ResponseData *goa.RequestData Payload *CreateAccountPayload }
CreateAccountContext provides the account create action context.
func NewCreateAccountContext ¶
func NewCreateAccountContext(ctx context.Context, r *http.Request, service *goa.Service) (*CreateAccountContext, error)
NewCreateAccountContext parses the incoming request URL and body, performs validations and creates the context used by the account controller create action.
func (*CreateAccountContext) BadRequest ¶
func (ctx *CreateAccountContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*CreateAccountContext) Created ¶
func (ctx *CreateAccountContext) Created() error
Created sends a HTTP response with status code 201.
type CreateAccountPayload ¶
type CreateAccountPayload struct { // Name of account Name string `form:"name" json:"name" xml:"name"` }
CreateAccountPayload is the account create action payload.
func (*CreateAccountPayload) Validate ¶
func (payload *CreateAccountPayload) Validate() (err error)
Validate runs the validation rules defined in the design.
type CreateBottleContext ¶
type CreateBottleContext struct { context.Context *goa.ResponseData *goa.RequestData AccountID int Payload *CreateBottlePayload }
CreateBottleContext provides the bottle create action context.
func NewCreateBottleContext ¶
func NewCreateBottleContext(ctx context.Context, r *http.Request, service *goa.Service) (*CreateBottleContext, error)
NewCreateBottleContext parses the incoming request URL and body, performs validations and creates the context used by the bottle controller create action.
func (*CreateBottleContext) BadRequest ¶
func (ctx *CreateBottleContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*CreateBottleContext) Created ¶
func (ctx *CreateBottleContext) Created() error
Created sends a HTTP response with status code 201.
func (*CreateBottleContext) NotFound ¶
func (ctx *CreateBottleContext) NotFound() error
NotFound sends a HTTP response with status code 404.
type CreateBottlePayload ¶
type CreateBottlePayload struct { Color string `form:"color" json:"color" xml:"color"` Country *string `form:"country,omitempty" json:"country,omitempty" xml:"country,omitempty"` Name string `form:"name" json:"name" xml:"name"` Region *string `form:"region,omitempty" json:"region,omitempty" xml:"region,omitempty"` Review *string `form:"review,omitempty" json:"review,omitempty" xml:"review,omitempty"` Sweetness *int `form:"sweetness,omitempty" json:"sweetness,omitempty" xml:"sweetness,omitempty"` Varietal string `form:"varietal" json:"varietal" xml:"varietal"` Vineyard string `form:"vineyard" json:"vineyard" xml:"vineyard"` Vintage int `form:"vintage" json:"vintage" xml:"vintage"` }
CreateBottlePayload is the bottle create action payload.
func (*CreateBottlePayload) Validate ¶
func (payload *CreateBottlePayload) Validate() (err error)
Validate runs the validation rules defined in the design.
type DeleteAccountContext ¶
type DeleteAccountContext struct { context.Context *goa.ResponseData *goa.RequestData AccountID int }
DeleteAccountContext provides the account delete action context.
func NewDeleteAccountContext ¶
func NewDeleteAccountContext(ctx context.Context, r *http.Request, service *goa.Service) (*DeleteAccountContext, error)
NewDeleteAccountContext parses the incoming request URL and body, performs validations and creates the context used by the account controller delete action.
func (*DeleteAccountContext) BadRequest ¶
func (ctx *DeleteAccountContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*DeleteAccountContext) NoContent ¶
func (ctx *DeleteAccountContext) NoContent() error
NoContent sends a HTTP response with status code 204.
func (*DeleteAccountContext) NotFound ¶
func (ctx *DeleteAccountContext) NotFound() error
NotFound sends a HTTP response with status code 404.
type DeleteBottleContext ¶
type DeleteBottleContext struct { context.Context *goa.ResponseData *goa.RequestData AccountID int BottleID int }
DeleteBottleContext provides the bottle delete action context.
func NewDeleteBottleContext ¶
func NewDeleteBottleContext(ctx context.Context, r *http.Request, service *goa.Service) (*DeleteBottleContext, error)
NewDeleteBottleContext parses the incoming request URL and body, performs validations and creates the context used by the bottle controller delete action.
func (*DeleteBottleContext) BadRequest ¶
func (ctx *DeleteBottleContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*DeleteBottleContext) NoContent ¶
func (ctx *DeleteBottleContext) NoContent() error
NoContent sends a HTTP response with status code 204.
func (*DeleteBottleContext) NotFound ¶
func (ctx *DeleteBottleContext) NotFound() error
NotFound sends a HTTP response with status code 404.
type HealthController ¶
type HealthController interface { goa.Muxer Health(*HealthHealthContext) error }
HealthController is the controller interface for the Health actions.
type HealthHealthContext ¶
type HealthHealthContext struct { context.Context *goa.ResponseData *goa.RequestData }
HealthHealthContext provides the health health action context.
func NewHealthHealthContext ¶
func NewHealthHealthContext(ctx context.Context, r *http.Request, service *goa.Service) (*HealthHealthContext, error)
NewHealthHealthContext parses the incoming request URL and body, performs validations and creates the context used by the health controller health action.
func (*HealthHealthContext) OK ¶
func (ctx *HealthHealthContext) OK(resp []byte) error
OK sends a HTTP response with status code 200.
type JsController ¶
type JsController interface { goa.Muxer goa.FileServer }
JsController is the controller interface for the Js actions.
type ListAccountContext ¶
type ListAccountContext struct { context.Context *goa.ResponseData *goa.RequestData }
ListAccountContext provides the account list action context.
func NewListAccountContext ¶
func NewListAccountContext(ctx context.Context, r *http.Request, service *goa.Service) (*ListAccountContext, error)
NewListAccountContext parses the incoming request URL and body, performs validations and creates the context used by the account controller list action.
func (*ListAccountContext) OK ¶
func (ctx *ListAccountContext) OK(r AccountCollection) error
OK sends a HTTP response with status code 200.
func (*ListAccountContext) OKLink ¶
func (ctx *ListAccountContext) OKLink(r AccountLinkCollection) error
OKLink sends a HTTP response with status code 200.
func (*ListAccountContext) OKTiny ¶
func (ctx *ListAccountContext) OKTiny(r AccountTinyCollection) error
OKTiny sends a HTTP response with status code 200.
type ListBottleContext ¶
type ListBottleContext struct { context.Context *goa.ResponseData *goa.RequestData AccountID int Years []int }
ListBottleContext provides the bottle list action context.
func NewListBottleContext ¶
func NewListBottleContext(ctx context.Context, r *http.Request, service *goa.Service) (*ListBottleContext, error)
NewListBottleContext parses the incoming request URL and body, performs validations and creates the context used by the bottle controller list action.
func (*ListBottleContext) BadRequest ¶
func (ctx *ListBottleContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ListBottleContext) NotFound ¶
func (ctx *ListBottleContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*ListBottleContext) OK ¶
func (ctx *ListBottleContext) OK(r BottleCollection) error
OK sends a HTTP response with status code 200.
func (*ListBottleContext) OKTiny ¶
func (ctx *ListBottleContext) OKTiny(r BottleTinyCollection) error
OKTiny sends a HTTP response with status code 200.
type PublicController ¶
type PublicController interface { goa.Muxer goa.FileServer }
PublicController is the controller interface for the Public actions.
type RateBottleContext ¶
type RateBottleContext struct { context.Context *goa.ResponseData *goa.RequestData AccountID int BottleID int Payload *RateBottlePayload }
RateBottleContext provides the bottle rate action context.
func NewRateBottleContext ¶
func NewRateBottleContext(ctx context.Context, r *http.Request, service *goa.Service) (*RateBottleContext, error)
NewRateBottleContext parses the incoming request URL and body, performs validations and creates the context used by the bottle controller rate action.
func (*RateBottleContext) BadRequest ¶
func (ctx *RateBottleContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*RateBottleContext) NoContent ¶
func (ctx *RateBottleContext) NoContent() error
NoContent sends a HTTP response with status code 204.
func (*RateBottleContext) NotFound ¶
func (ctx *RateBottleContext) NotFound() error
NotFound sends a HTTP response with status code 404.
type RateBottlePayload ¶
type RateBottlePayload struct { // Rating of bottle between 1 and 5 Rating int `form:"rating" json:"rating" xml:"rating"` }
RateBottlePayload is the bottle rate action payload.
func (*RateBottlePayload) Validate ¶
func (payload *RateBottlePayload) Validate() (err error)
Validate runs the validation rules defined in the design.
type ShowAccountContext ¶
type ShowAccountContext struct { context.Context *goa.ResponseData *goa.RequestData AccountID int }
ShowAccountContext provides the account show action context.
func NewShowAccountContext ¶
func NewShowAccountContext(ctx context.Context, r *http.Request, service *goa.Service) (*ShowAccountContext, error)
NewShowAccountContext parses the incoming request URL and body, performs validations and creates the context used by the account controller show action.
func (*ShowAccountContext) BadRequest ¶
func (ctx *ShowAccountContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ShowAccountContext) NotFound ¶
func (ctx *ShowAccountContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*ShowAccountContext) OK ¶
func (ctx *ShowAccountContext) OK(r *Account) error
OK sends a HTTP response with status code 200.
func (*ShowAccountContext) OKLink ¶
func (ctx *ShowAccountContext) OKLink(r *AccountLink) error
OKLink sends a HTTP response with status code 200.
func (*ShowAccountContext) OKTiny ¶
func (ctx *ShowAccountContext) OKTiny(r *AccountTiny) error
OKTiny sends a HTTP response with status code 200.
type ShowBottleContext ¶
type ShowBottleContext struct { context.Context *goa.ResponseData *goa.RequestData AccountID int BottleID int }
ShowBottleContext provides the bottle show action context.
func NewShowBottleContext ¶
func NewShowBottleContext(ctx context.Context, r *http.Request, service *goa.Service) (*ShowBottleContext, error)
NewShowBottleContext parses the incoming request URL and body, performs validations and creates the context used by the bottle controller show action.
func (*ShowBottleContext) BadRequest ¶
func (ctx *ShowBottleContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ShowBottleContext) NotFound ¶
func (ctx *ShowBottleContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*ShowBottleContext) OK ¶
func (ctx *ShowBottleContext) OK(r *Bottle) error
OK sends a HTTP response with status code 200.
func (*ShowBottleContext) OKFull ¶
func (ctx *ShowBottleContext) OKFull(r *BottleFull) error
OKFull sends a HTTP response with status code 200.
func (*ShowBottleContext) OKTiny ¶
func (ctx *ShowBottleContext) OKTiny(r *BottleTiny) error
OKTiny sends a HTTP response with status code 200.
type SwaggerController ¶
type SwaggerController interface { goa.Muxer goa.FileServer }
SwaggerController is the controller interface for the Swagger actions.
type UpdateAccountContext ¶
type UpdateAccountContext struct { context.Context *goa.ResponseData *goa.RequestData AccountID int Payload *UpdateAccountPayload }
UpdateAccountContext provides the account update action context.
func NewUpdateAccountContext ¶
func NewUpdateAccountContext(ctx context.Context, r *http.Request, service *goa.Service) (*UpdateAccountContext, error)
NewUpdateAccountContext parses the incoming request URL and body, performs validations and creates the context used by the account controller update action.
func (*UpdateAccountContext) BadRequest ¶
func (ctx *UpdateAccountContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*UpdateAccountContext) NoContent ¶
func (ctx *UpdateAccountContext) NoContent() error
NoContent sends a HTTP response with status code 204.
func (*UpdateAccountContext) NotFound ¶
func (ctx *UpdateAccountContext) NotFound() error
NotFound sends a HTTP response with status code 404.
type UpdateAccountPayload ¶
type UpdateAccountPayload struct { // Name of account Name string `form:"name" json:"name" xml:"name"` }
UpdateAccountPayload is the account update action payload.
func (*UpdateAccountPayload) Validate ¶
func (payload *UpdateAccountPayload) Validate() (err error)
Validate runs the validation rules defined in the design.
type UpdateBottleContext ¶
type UpdateBottleContext struct { context.Context *goa.ResponseData *goa.RequestData AccountID int BottleID int Payload *BottlePayload }
UpdateBottleContext provides the bottle update action context.
func NewUpdateBottleContext ¶
func NewUpdateBottleContext(ctx context.Context, r *http.Request, service *goa.Service) (*UpdateBottleContext, error)
NewUpdateBottleContext parses the incoming request URL and body, performs validations and creates the context used by the bottle controller update action.
func (*UpdateBottleContext) BadRequest ¶
func (ctx *UpdateBottleContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*UpdateBottleContext) NoContent ¶
func (ctx *UpdateBottleContext) NoContent() error
NoContent sends a HTTP response with status code 204.
func (*UpdateBottleContext) NotFound ¶
func (ctx *UpdateBottleContext) NotFound() error
NotFound sends a HTTP response with status code 404.
type WatchBottleContext ¶
type WatchBottleContext struct { context.Context *goa.ResponseData *goa.RequestData AccountID int BottleID int }
WatchBottleContext provides the bottle watch action context.
func NewWatchBottleContext ¶
func NewWatchBottleContext(ctx context.Context, r *http.Request, service *goa.Service) (*WatchBottleContext, error)
NewWatchBottleContext parses the incoming request URL and body, performs validations and creates the context used by the bottle controller watch action.
func (*WatchBottleContext) BadRequest ¶
func (ctx *WatchBottleContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.