Documentation ¶
Index ¶
- func AccountsDataHref(id interface{}) string
- func AccountsHref(id interface{}) string
- func BottlesDataHref(id interface{}) string
- func BottlesHref(id interface{}) string
- func MountAccountsController(service *goa.Service, ctrl AccountsController)
- func MountAccountsDataController(service *goa.Service, ctrl AccountsDataController)
- func MountActionsController(service *goa.Service, ctrl ActionsController)
- func MountBottlesController(service *goa.Service, ctrl BottlesController)
- func MountBottlesDataController(service *goa.Service, ctrl BottlesDataController)
- func MountJsController(service *goa.Service, ctrl JsController)
- func MountMethodController(service *goa.Service, ctrl MethodController)
- func MountResponseController(service *goa.Service, ctrl ResponseController)
- func MountSecurityController(service *goa.Service, ctrl SecurityController)
- func MountSwaggerController(service *goa.Service, ctrl SwaggerController)
- func MountValidationController(service *goa.Service, ctrl ValidationController)
- func NewUserTokenSecurity() *goa.APIKeySecurity
- func ResponseHref(id interface{}) string
- func UseUserTokenMiddleware(service *goa.Service, middleware goa.Middleware)
- type Account
- type AccountCollection
- type Accountmedia
- type AccountsController
- type AccountsDataController
- type ActionsController
- type AddAccountsContext
- type AddAccountsDataContext
- type AddAccountsDataPayload
- type AddAccountsPayload
- type AddBottlesContext
- type AddBottlesDataContext
- type AddBottlesDataPayload
- type AddBottlesPayload
- type ArrayResponseContext
- type Article
- type Bottle
- type BottleCollection
- type BottleRelation
- type BottleRelationCollection
- type Bottlemedia
- type BottlesController
- type BottlesDataController
- type Category
- type Categorymedia
- type Data
- type DeleteAccountsContext
- type DeleteAccountsDataContext
- type DeleteBottlesContext
- type DeleteBottlesDataContext
- type Error
- type ErrorValue
- type EtcMethodContext
- type FollowMethodContext
- type HashResponseContext
- type HelloActionsContext
- type IDActionsContext
- type Integer
- type JsController
- type ListAccountsContext
- type ListAccountsDataContext
- type ListBottlesContext
- type ListBottlesDataContext
- type ListMethodContext
- type ListRelationBottlesContext
- type ListResponseContext
- type Message
- type MethodController
- type MethodMethodContext
- type NestedResponseContext
- type OK
- type PingActionsContext
- type ResponseController
- type SecurityController
- type SecuritySecurityContext
- type ShowAccountsContext
- type ShowAccountsDataContext
- type ShowBottlesContext
- type ShowBottlesDataContext
- type ShowResponseContext
- type SwaggerController
- type UpdateAccountsContext
- type UpdateAccountsDataContext
- type UpdateAccountsDataPayload
- type UpdateAccountsPayload
- type UpdateBottlesContext
- type UpdateBottlesDataContext
- type UpdateBottlesDataPayload
- type UpdateBottlesPayload
- type User
- type UserCollection
- type UserTiny
- type UserTinyCollection
- type Validation
- type ValidationController
- type ValidationValidationContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountsDataHref ¶
func AccountsDataHref(id interface{}) string
AccountsDataHref returns the resource href.
func AccountsHref ¶
func AccountsHref(id interface{}) string
AccountsHref returns the resource href.
func BottlesDataHref ¶
func BottlesDataHref(id interface{}) string
BottlesDataHref returns the resource href.
func MountAccountsController ¶
func MountAccountsController(service *goa.Service, ctrl AccountsController)
MountAccountsController "mounts" a Accounts resource controller on the given service.
func MountAccountsDataController ¶
func MountAccountsDataController(service *goa.Service, ctrl AccountsDataController)
MountAccountsDataController "mounts" a AccountsData resource controller on the given service.
func MountActionsController ¶
func MountActionsController(service *goa.Service, ctrl ActionsController)
MountActionsController "mounts" a Actions resource controller on the given service.
func MountBottlesController ¶
func MountBottlesController(service *goa.Service, ctrl BottlesController)
MountBottlesController "mounts" a Bottles resource controller on the given service.
func MountBottlesDataController ¶
func MountBottlesDataController(service *goa.Service, ctrl BottlesDataController)
MountBottlesDataController "mounts" a BottlesData 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 MountMethodController ¶
func MountMethodController(service *goa.Service, ctrl MethodController)
MountMethodController "mounts" a Method resource controller on the given service.
func MountResponseController ¶
func MountResponseController(service *goa.Service, ctrl ResponseController)
MountResponseController "mounts" a Response resource controller on the given service.
func MountSecurityController ¶
func MountSecurityController(service *goa.Service, ctrl SecurityController)
MountSecurityController "mounts" a Security 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.
func MountValidationController ¶
func MountValidationController(service *goa.Service, ctrl ValidationController)
MountValidationController "mounts" a Validation resource controller on the given service.
func NewUserTokenSecurity ¶
func NewUserTokenSecurity() *goa.APIKeySecurity
NewUserTokenSecurity creates a userToken security definition.
func ResponseHref ¶
func ResponseHref(id interface{}) string
ResponseHref returns the resource href.
func UseUserTokenMiddleware ¶
func UseUserTokenMiddleware(service *goa.Service, middleware goa.Middleware)
UseUserTokenMiddleware mounts the userToken auth middleware onto the service.
Types ¶
type Account ¶
type Account struct { // メールアドレス Email string `form:"email" json:"email" xml:"email"` // id ID int `form:"id" json:"id" xml:"id"` // 名前 Name string `form:"name" json:"name" xml:"name"` }
celler 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 Accountmedia ¶
type Accountmedia struct { Data []*Account `form:"data" json:"data" xml:"data"` Status int `form:"status" json:"status" xml:"status"` }
example (default view)
Identifier: application/vnd.accountmedia+json; view=default
func (*Accountmedia) Validate ¶
func (mt *Accountmedia) Validate() (err error)
Validate validates the Accountmedia media type instance.
type AccountsController ¶
type AccountsController interface { goa.Muxer Add(*AddAccountsContext) error Delete(*DeleteAccountsContext) error List(*ListAccountsContext) error Show(*ShowAccountsContext) error Update(*UpdateAccountsContext) error }
AccountsController is the controller interface for the Accounts actions.
type AccountsDataController ¶
type AccountsDataController interface { goa.Muxer Add(*AddAccountsDataContext) error Delete(*DeleteAccountsDataContext) error List(*ListAccountsDataContext) error Show(*ShowAccountsDataContext) error Update(*UpdateAccountsDataContext) error }
AccountsDataController is the controller interface for the AccountsData actions.
type ActionsController ¶
type ActionsController interface { goa.Muxer Hello(*HelloActionsContext) error ID(*IDActionsContext) error Ping(*PingActionsContext) error }
ActionsController is the controller interface for the Actions actions.
type AddAccountsContext ¶
type AddAccountsContext struct { context.Context *goa.ResponseData *goa.RequestData Payload *AddAccountsPayload }
AddAccountsContext provides the accounts add action context.
func NewAddAccountsContext ¶
func NewAddAccountsContext(ctx context.Context, r *http.Request, service *goa.Service) (*AddAccountsContext, error)
NewAddAccountsContext parses the incoming request URL and body, performs validations and creates the context used by the accounts controller add action.
func (*AddAccountsContext) BadRequest ¶
func (ctx *AddAccountsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*AddAccountsContext) OK ¶
func (ctx *AddAccountsContext) OK(r *Account) error
OK sends a HTTP response with status code 200.
type AddAccountsDataContext ¶
type AddAccountsDataContext struct { context.Context *goa.ResponseData *goa.RequestData Payload *AddAccountsDataPayload }
AddAccountsDataContext provides the accounts_data add action context.
func NewAddAccountsDataContext ¶
func NewAddAccountsDataContext(ctx context.Context, r *http.Request, service *goa.Service) (*AddAccountsDataContext, error)
NewAddAccountsDataContext parses the incoming request URL and body, performs validations and creates the context used by the accounts_data controller add action.
func (*AddAccountsDataContext) BadRequest ¶
func (ctx *AddAccountsDataContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*AddAccountsDataContext) OK ¶
func (ctx *AddAccountsDataContext) OK(r *Accountmedia) error
OK sends a HTTP response with status code 200.
type AddAccountsDataPayload ¶
type AddAccountsDataPayload struct { // email Email string `form:"email" json:"email" xml:"email"` // 名前 Name string `form:"name" json:"name" xml:"name"` }
AddAccountsDataPayload is the accounts_data add action payload.
func (*AddAccountsDataPayload) Validate ¶
func (payload *AddAccountsDataPayload) Validate() (err error)
Validate runs the validation rules defined in the design.
type AddAccountsPayload ¶
type AddAccountsPayload struct { // email Email string `form:"email" json:"email" xml:"email"` // 名前 Name string `form:"name" json:"name" xml:"name"` }
AddAccountsPayload is the accounts add action payload.
func (*AddAccountsPayload) Validate ¶
func (payload *AddAccountsPayload) Validate() (err error)
Validate runs the validation rules defined in the design.
type AddBottlesContext ¶
type AddBottlesContext struct { context.Context *goa.ResponseData *goa.RequestData Payload *AddBottlesPayload }
AddBottlesContext provides the bottles add action context.
func NewAddBottlesContext ¶
func NewAddBottlesContext(ctx context.Context, r *http.Request, service *goa.Service) (*AddBottlesContext, error)
NewAddBottlesContext parses the incoming request URL and body, performs validations and creates the context used by the bottles controller add action.
func (*AddBottlesContext) BadRequest ¶
func (ctx *AddBottlesContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*AddBottlesContext) Created ¶
func (ctx *AddBottlesContext) Created() error
Created sends a HTTP response with status code 201.
type AddBottlesDataContext ¶
type AddBottlesDataContext struct { context.Context *goa.ResponseData *goa.RequestData Payload *AddBottlesDataPayload }
AddBottlesDataContext provides the bottles_data add action context.
func NewAddBottlesDataContext ¶
func NewAddBottlesDataContext(ctx context.Context, r *http.Request, service *goa.Service) (*AddBottlesDataContext, error)
NewAddBottlesDataContext parses the incoming request URL and body, performs validations and creates the context used by the bottles_data controller add action.
func (*AddBottlesDataContext) BadRequest ¶
func (ctx *AddBottlesDataContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*AddBottlesDataContext) Created ¶
func (ctx *AddBottlesDataContext) Created() error
Created sends a HTTP response with status code 201.
type AddBottlesDataPayload ¶
type AddBottlesDataPayload struct { // アカウントID AccountID int `form:"account_id" json:"account_id" xml:"account_id"` // ボトル名 Name string `form:"name" json:"name" xml:"name"` // 数量 Quantity int `form:"quantity" json:"quantity" xml:"quantity"` }
AddBottlesDataPayload is the bottles_data add action payload.
func (*AddBottlesDataPayload) Validate ¶
func (payload *AddBottlesDataPayload) Validate() (err error)
Validate runs the validation rules defined in the design.
type AddBottlesPayload ¶
type AddBottlesPayload struct { // アカウントID AccountID int `form:"account_id" json:"account_id" xml:"account_id"` // ボトル名 Name string `form:"name" json:"name" xml:"name"` // 数量 Quantity int `form:"quantity" json:"quantity" xml:"quantity"` }
AddBottlesPayload is the bottles add action payload.
func (*AddBottlesPayload) Validate ¶
func (payload *AddBottlesPayload) Validate() (err error)
Validate runs the validation rules defined in the design.
type ArrayResponseContext ¶
type ArrayResponseContext struct { context.Context *goa.ResponseData *goa.RequestData }
ArrayResponseContext provides the response array action context.
func NewArrayResponseContext ¶
func NewArrayResponseContext(ctx context.Context, r *http.Request, service *goa.Service) (*ArrayResponseContext, error)
NewArrayResponseContext parses the incoming request URL and body, performs validations and creates the context used by the response controller array action.
func (*ArrayResponseContext) BadRequest ¶
func (ctx *ArrayResponseContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ArrayResponseContext) OK ¶
func (ctx *ArrayResponseContext) OK(r []int) error
OK sends a HTTP response with status code 200.
type Article ¶
type Article struct { Data []*Data `form:"data" json:"data" xml:"data"` Response *OK `form:"response" json:"response" xml:"response"` }
example (default view)
Identifier: application/vnd.article+json; view=default
type Bottle ¶
type Bottle struct { Account *Account `form:"account" json:"account" xml:"account"` // id ID int `form:"id" json:"id" xml:"id"` // ボトル名 Name string `form:"name" json:"name" xml:"name"` // 数量 Quantity int `form:"quantity" json:"quantity" xml:"quantity"` }
celler bottles (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 BottleRelation ¶
type BottleRelation struct { Account *Account `form:"account" json:"account" xml:"account"` Categories []*Category `form:"categories" json:"categories" xml:"categories"` // id ID int `form:"id" json:"id" xml:"id"` // ボトル名 Name string `form:"name" json:"name" xml:"name"` // 数量 Quantity int `form:"quantity" json:"quantity" xml:"quantity"` }
celler bottles (relation view)
Identifier: application/vnd.bottle+json; view=relation
func (*BottleRelation) Validate ¶
func (mt *BottleRelation) Validate() (err error)
Validate validates the BottleRelation media type instance.
type BottleRelationCollection ¶
type BottleRelationCollection []*BottleRelation
BottleCollection is the media type for an array of Bottle (relation view)
Identifier: application/vnd.bottle+json; type=collection; view=relation
func (BottleRelationCollection) Validate ¶
func (mt BottleRelationCollection) Validate() (err error)
Validate validates the BottleRelationCollection media type instance.
type Bottlemedia ¶
type Bottlemedia struct { Data []*Bottle `form:"data" json:"data" xml:"data"` Status int `form:"status" json:"status" xml:"status"` }
example (default view)
Identifier: application/vnd.bottlemedia+json; view=default
func (*Bottlemedia) Validate ¶
func (mt *Bottlemedia) Validate() (err error)
Validate validates the Bottlemedia media type instance.
type BottlesController ¶
type BottlesController interface { goa.Muxer Add(*AddBottlesContext) error Delete(*DeleteBottlesContext) error List(*ListBottlesContext) error ListRelation(*ListRelationBottlesContext) error Show(*ShowBottlesContext) error Update(*UpdateBottlesContext) error }
BottlesController is the controller interface for the Bottles actions.
type BottlesDataController ¶
type BottlesDataController interface { goa.Muxer Add(*AddBottlesDataContext) error Delete(*DeleteBottlesDataContext) error List(*ListBottlesDataContext) error Show(*ShowBottlesDataContext) error Update(*UpdateBottlesDataContext) error }
BottlesDataController is the controller interface for the BottlesData actions.
type Category ¶
type Category struct { // id ID int `form:"id" json:"id" xml:"id"` // 名前 Name string `form:"name" json:"name" xml:"name"` }
celler account (default view)
Identifier: application/vnd.category+json; view=default
type Categorymedia ¶
type Categorymedia struct { Data []*Category `form:"data" json:"data" xml:"data"` Status int `form:"status" json:"status" xml:"status"` }
example (default view)
Identifier: application/vnd.categorymedia+json; view=default
func (*Categorymedia) Validate ¶
func (mt *Categorymedia) Validate() (err error)
Validate validates the Categorymedia media type instance.
type Data ¶
type Data struct { Body string `form:"body" json:"body" xml:"body"` Title string `form:"title" json:"title" xml:"title"` }
Data user type.
type DeleteAccountsContext ¶
type DeleteAccountsContext struct { context.Context *goa.ResponseData *goa.RequestData ID int }
DeleteAccountsContext provides the accounts delete action context.
func NewDeleteAccountsContext ¶
func NewDeleteAccountsContext(ctx context.Context, r *http.Request, service *goa.Service) (*DeleteAccountsContext, error)
NewDeleteAccountsContext parses the incoming request URL and body, performs validations and creates the context used by the accounts controller delete action.
func (*DeleteAccountsContext) BadRequest ¶
func (ctx *DeleteAccountsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*DeleteAccountsContext) NotFound ¶
func (ctx *DeleteAccountsContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*DeleteAccountsContext) OK ¶
func (ctx *DeleteAccountsContext) OK(resp []byte) error
OK sends a HTTP response with status code 200.
type DeleteAccountsDataContext ¶
type DeleteAccountsDataContext struct { context.Context *goa.ResponseData *goa.RequestData ID int }
DeleteAccountsDataContext provides the accounts_data delete action context.
func NewDeleteAccountsDataContext ¶
func NewDeleteAccountsDataContext(ctx context.Context, r *http.Request, service *goa.Service) (*DeleteAccountsDataContext, error)
NewDeleteAccountsDataContext parses the incoming request URL and body, performs validations and creates the context used by the accounts_data controller delete action.
func (*DeleteAccountsDataContext) BadRequest ¶
func (ctx *DeleteAccountsDataContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*DeleteAccountsDataContext) NotFound ¶
func (ctx *DeleteAccountsDataContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*DeleteAccountsDataContext) OK ¶
func (ctx *DeleteAccountsDataContext) OK(resp []byte) error
OK sends a HTTP response with status code 200.
type DeleteBottlesContext ¶
type DeleteBottlesContext struct { context.Context *goa.ResponseData *goa.RequestData ID int }
DeleteBottlesContext provides the bottles delete action context.
func NewDeleteBottlesContext ¶
func NewDeleteBottlesContext(ctx context.Context, r *http.Request, service *goa.Service) (*DeleteBottlesContext, error)
NewDeleteBottlesContext parses the incoming request URL and body, performs validations and creates the context used by the bottles controller delete action.
func (*DeleteBottlesContext) BadRequest ¶
func (ctx *DeleteBottlesContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*DeleteBottlesContext) NotFound ¶
func (ctx *DeleteBottlesContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*DeleteBottlesContext) OK ¶
func (ctx *DeleteBottlesContext) OK(resp []byte) error
OK sends a HTTP response with status code 200.
type DeleteBottlesDataContext ¶
type DeleteBottlesDataContext struct { context.Context *goa.ResponseData *goa.RequestData ID int }
DeleteBottlesDataContext provides the bottles_data delete action context.
func NewDeleteBottlesDataContext ¶
func NewDeleteBottlesDataContext(ctx context.Context, r *http.Request, service *goa.Service) (*DeleteBottlesDataContext, error)
NewDeleteBottlesDataContext parses the incoming request URL and body, performs validations and creates the context used by the bottles_data controller delete action.
func (*DeleteBottlesDataContext) BadRequest ¶
func (ctx *DeleteBottlesDataContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*DeleteBottlesDataContext) NotFound ¶
func (ctx *DeleteBottlesDataContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*DeleteBottlesDataContext) OK ¶
func (ctx *DeleteBottlesDataContext) OK(resp []byte) error
OK sends a HTTP response with status code 200.
type Error ¶
type Error struct {
Response *ErrorValue `form:"response" json:"response" xml:"response"`
}
Error media type (default view)
Identifier: application/vnd.error+json; view=default
type ErrorValue ¶
type ErrorValue struct { Code string `form:"code" json:"code" xml:"code"` Detail string `form:"detail" json:"detail" xml:"detail"` Status int `form:"status" json:"status" xml:"status"` }
ErrorValue user type.
func (*ErrorValue) Validate ¶
func (ut *ErrorValue) Validate() (err error)
Validate validates the ErrorValue type instance.
type EtcMethodContext ¶
type EtcMethodContext struct { context.Context *goa.ResponseData *goa.RequestData ID int Type int }
EtcMethodContext provides the method etc action context.
func NewEtcMethodContext ¶
func NewEtcMethodContext(ctx context.Context, r *http.Request, service *goa.Service) (*EtcMethodContext, error)
NewEtcMethodContext parses the incoming request URL and body, performs validations and creates the context used by the method controller etc action.
func (*EtcMethodContext) BadRequest ¶
func (ctx *EtcMethodContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*EtcMethodContext) OK ¶
func (ctx *EtcMethodContext) OK(resp []byte) error
OK sends a HTTP response with status code 200.
type FollowMethodContext ¶
type FollowMethodContext struct { context.Context *goa.ResponseData *goa.RequestData }
FollowMethodContext provides the method follow action context.
func NewFollowMethodContext ¶
func NewFollowMethodContext(ctx context.Context, r *http.Request, service *goa.Service) (*FollowMethodContext, error)
NewFollowMethodContext parses the incoming request URL and body, performs validations and creates the context used by the method controller follow action.
func (*FollowMethodContext) BadRequest ¶
func (ctx *FollowMethodContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*FollowMethodContext) OK ¶
func (ctx *FollowMethodContext) OK(r *Message) error
OK sends a HTTP response with status code 200.
type HashResponseContext ¶
type HashResponseContext struct { context.Context *goa.ResponseData *goa.RequestData }
HashResponseContext provides the response hash action context.
func NewHashResponseContext ¶
func NewHashResponseContext(ctx context.Context, r *http.Request, service *goa.Service) (*HashResponseContext, error)
NewHashResponseContext parses the incoming request URL and body, performs validations and creates the context used by the response controller hash action.
func (*HashResponseContext) BadRequest ¶
func (ctx *HashResponseContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
type HelloActionsContext ¶
type HelloActionsContext struct { context.Context *goa.ResponseData *goa.RequestData Name string }
HelloActionsContext provides the actions hello action context.
func NewHelloActionsContext ¶
func NewHelloActionsContext(ctx context.Context, r *http.Request, service *goa.Service) (*HelloActionsContext, error)
NewHelloActionsContext parses the incoming request URL and body, performs validations and creates the context used by the actions controller hello action.
func (*HelloActionsContext) BadRequest ¶
func (ctx *HelloActionsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*HelloActionsContext) OK ¶
func (ctx *HelloActionsContext) OK(r *Message) error
OK sends a HTTP response with status code 200.
type IDActionsContext ¶
type IDActionsContext struct { context.Context *goa.ResponseData *goa.RequestData ID int }
IDActionsContext provides the actions id action context.
func NewIDActionsContext ¶
func NewIDActionsContext(ctx context.Context, r *http.Request, service *goa.Service) (*IDActionsContext, error)
NewIDActionsContext parses the incoming request URL and body, performs validations and creates the context used by the actions controller id action.
func (*IDActionsContext) BadRequest ¶
func (ctx *IDActionsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*IDActionsContext) NotFound ¶
func (ctx *IDActionsContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*IDActionsContext) OK ¶
func (ctx *IDActionsContext) OK(r *Integer) error
OK sends a HTTP response with status code 200.
type Integer ¶
type Integer struct { // id ID int `form:"id" json:"id" xml:"id"` }
example (default view)
Identifier: application/vnd.integer+json; view=default
type JsController ¶
type JsController interface { goa.Muxer goa.FileServer }
JsController is the controller interface for the Js actions.
type ListAccountsContext ¶
type ListAccountsContext struct { context.Context *goa.ResponseData *goa.RequestData }
ListAccountsContext provides the accounts list action context.
func NewListAccountsContext ¶
func NewListAccountsContext(ctx context.Context, r *http.Request, service *goa.Service) (*ListAccountsContext, error)
NewListAccountsContext parses the incoming request URL and body, performs validations and creates the context used by the accounts controller list action.
func (*ListAccountsContext) BadRequest ¶
func (ctx *ListAccountsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ListAccountsContext) OK ¶
func (ctx *ListAccountsContext) OK(r AccountCollection) error
OK sends a HTTP response with status code 200.
type ListAccountsDataContext ¶
type ListAccountsDataContext struct { context.Context *goa.ResponseData *goa.RequestData }
ListAccountsDataContext provides the accounts_data list action context.
func NewListAccountsDataContext ¶
func NewListAccountsDataContext(ctx context.Context, r *http.Request, service *goa.Service) (*ListAccountsDataContext, error)
NewListAccountsDataContext parses the incoming request URL and body, performs validations and creates the context used by the accounts_data controller list action.
func (*ListAccountsDataContext) BadRequest ¶
func (ctx *ListAccountsDataContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ListAccountsDataContext) OK ¶
func (ctx *ListAccountsDataContext) OK(r *Accountmedia) error
OK sends a HTTP response with status code 200.
type ListBottlesContext ¶
type ListBottlesContext struct { context.Context *goa.ResponseData *goa.RequestData }
ListBottlesContext provides the bottles list action context.
func NewListBottlesContext ¶
func NewListBottlesContext(ctx context.Context, r *http.Request, service *goa.Service) (*ListBottlesContext, error)
NewListBottlesContext parses the incoming request URL and body, performs validations and creates the context used by the bottles controller list action.
func (*ListBottlesContext) BadRequest ¶
func (ctx *ListBottlesContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ListBottlesContext) OK ¶
func (ctx *ListBottlesContext) OK(r BottleCollection) error
OK sends a HTTP response with status code 200.
func (*ListBottlesContext) OKRelation ¶
func (ctx *ListBottlesContext) OKRelation(r BottleRelationCollection) error
OKRelation sends a HTTP response with status code 200.
type ListBottlesDataContext ¶
type ListBottlesDataContext struct { context.Context *goa.ResponseData *goa.RequestData }
ListBottlesDataContext provides the bottles_data list action context.
func NewListBottlesDataContext ¶
func NewListBottlesDataContext(ctx context.Context, r *http.Request, service *goa.Service) (*ListBottlesDataContext, error)
NewListBottlesDataContext parses the incoming request URL and body, performs validations and creates the context used by the bottles_data controller list action.
func (*ListBottlesDataContext) BadRequest ¶
func (ctx *ListBottlesDataContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ListBottlesDataContext) OK ¶
func (ctx *ListBottlesDataContext) OK(r *Bottlemedia) error
OK sends a HTTP response with status code 200.
type ListMethodContext ¶
type ListMethodContext struct { context.Context *goa.ResponseData *goa.RequestData }
ListMethodContext provides the method list action context.
func NewListMethodContext ¶
func NewListMethodContext(ctx context.Context, r *http.Request, service *goa.Service) (*ListMethodContext, error)
NewListMethodContext parses the incoming request URL and body, performs validations and creates the context used by the method controller list action.
func (*ListMethodContext) BadRequest ¶
func (ctx *ListMethodContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ListMethodContext) OK ¶
func (ctx *ListMethodContext) OK(r UserCollection) error
OK sends a HTTP response with status code 200.
func (*ListMethodContext) OKTiny ¶
func (ctx *ListMethodContext) OKTiny(r UserTinyCollection) error
OKTiny sends a HTTP response with status code 200.
type ListRelationBottlesContext ¶
type ListRelationBottlesContext struct { context.Context *goa.ResponseData *goa.RequestData }
ListRelationBottlesContext provides the bottles listRelation action context.
func NewListRelationBottlesContext ¶
func NewListRelationBottlesContext(ctx context.Context, r *http.Request, service *goa.Service) (*ListRelationBottlesContext, error)
NewListRelationBottlesContext parses the incoming request URL and body, performs validations and creates the context used by the bottles controller listRelation action.
func (*ListRelationBottlesContext) BadRequest ¶
func (ctx *ListRelationBottlesContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ListRelationBottlesContext) OK ¶
func (ctx *ListRelationBottlesContext) OK(r BottleCollection) error
OK sends a HTTP response with status code 200.
func (*ListRelationBottlesContext) OKRelation ¶
func (ctx *ListRelationBottlesContext) OKRelation(r BottleRelationCollection) error
OKRelation sends a HTTP response with status code 200.
type ListResponseContext ¶
type ListResponseContext struct { context.Context *goa.ResponseData *goa.RequestData }
ListResponseContext provides the response list action context.
func NewListResponseContext ¶
func NewListResponseContext(ctx context.Context, r *http.Request, service *goa.Service) (*ListResponseContext, error)
NewListResponseContext parses the incoming request URL and body, performs validations and creates the context used by the response controller list action.
func (*ListResponseContext) BadRequest ¶
func (ctx *ListResponseContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ListResponseContext) OK ¶
func (ctx *ListResponseContext) OK(r UserCollection) error
OK sends a HTTP response with status code 200.
func (*ListResponseContext) OKTiny ¶
func (ctx *ListResponseContext) OKTiny(r UserTinyCollection) error
OKTiny sends a HTTP response with status code 200.
type Message ¶
type Message struct { // メッセージ Message string `form:"message" json:"message" xml:"message"` }
example (default view)
Identifier: application/vnd.message+json; view=default
type MethodController ¶
type MethodController interface { goa.Muxer Etc(*EtcMethodContext) error Follow(*FollowMethodContext) error List(*ListMethodContext) error Method(*MethodMethodContext) error }
MethodController is the controller interface for the Method actions.
type MethodMethodContext ¶
type MethodMethodContext struct { context.Context *goa.ResponseData *goa.RequestData }
MethodMethodContext provides the method method action context.
func NewMethodMethodContext ¶
func NewMethodMethodContext(ctx context.Context, r *http.Request, service *goa.Service) (*MethodMethodContext, error)
NewMethodMethodContext parses the incoming request URL and body, performs validations and creates the context used by the method controller method action.
func (*MethodMethodContext) BadRequest ¶
func (ctx *MethodMethodContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*MethodMethodContext) OK ¶
func (ctx *MethodMethodContext) OK(r *Message) error
OK sends a HTTP response with status code 200.
type NestedResponseContext ¶
type NestedResponseContext struct { context.Context *goa.ResponseData *goa.RequestData Test string }
NestedResponseContext provides the response nested action context.
func NewNestedResponseContext ¶
func NewNestedResponseContext(ctx context.Context, r *http.Request, service *goa.Service) (*NestedResponseContext, error)
NewNestedResponseContext parses the incoming request URL and body, performs validations and creates the context used by the response controller nested action.
func (*NestedResponseContext) BadRequest ¶
func (ctx *NestedResponseContext) BadRequest(r *Error) error
BadRequest sends a HTTP response with status code 400.
func (*NestedResponseContext) OK ¶
func (ctx *NestedResponseContext) OK(r *Article) error
OK sends a HTTP response with status code 200.
type PingActionsContext ¶
type PingActionsContext struct { context.Context *goa.ResponseData *goa.RequestData }
PingActionsContext provides the actions ping action context.
func NewPingActionsContext ¶
func NewPingActionsContext(ctx context.Context, r *http.Request, service *goa.Service) (*PingActionsContext, error)
NewPingActionsContext parses the incoming request URL and body, performs validations and creates the context used by the actions controller ping action.
func (*PingActionsContext) BadRequest ¶
func (ctx *PingActionsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*PingActionsContext) OK ¶
func (ctx *PingActionsContext) OK(r *Message) error
OK sends a HTTP response with status code 200.
type ResponseController ¶
type ResponseController interface { goa.Muxer Array(*ArrayResponseContext) error Hash(*HashResponseContext) error List(*ListResponseContext) error Nested(*NestedResponseContext) error Show(*ShowResponseContext) error }
ResponseController is the controller interface for the Response actions.
type SecurityController ¶
type SecurityController interface { goa.Muxer Security(*SecuritySecurityContext) error }
SecurityController is the controller interface for the Security actions.
type SecuritySecurityContext ¶
type SecuritySecurityContext struct { context.Context *goa.ResponseData *goa.RequestData }
SecuritySecurityContext provides the security security action context.
func NewSecuritySecurityContext ¶
func NewSecuritySecurityContext(ctx context.Context, r *http.Request, service *goa.Service) (*SecuritySecurityContext, error)
NewSecuritySecurityContext parses the incoming request URL and body, performs validations and creates the context used by the security controller security action.
func (*SecuritySecurityContext) BadRequest ¶
func (ctx *SecuritySecurityContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*SecuritySecurityContext) OK ¶
func (ctx *SecuritySecurityContext) OK(r *Message) error
OK sends a HTTP response with status code 200.
func (*SecuritySecurityContext) Unauthorized ¶
func (ctx *SecuritySecurityContext) Unauthorized() error
Unauthorized sends a HTTP response with status code 401.
type ShowAccountsContext ¶
type ShowAccountsContext struct { context.Context *goa.ResponseData *goa.RequestData ID int }
ShowAccountsContext provides the accounts show action context.
func NewShowAccountsContext ¶
func NewShowAccountsContext(ctx context.Context, r *http.Request, service *goa.Service) (*ShowAccountsContext, error)
NewShowAccountsContext parses the incoming request URL and body, performs validations and creates the context used by the accounts controller show action.
func (*ShowAccountsContext) BadRequest ¶
func (ctx *ShowAccountsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ShowAccountsContext) NotFound ¶
func (ctx *ShowAccountsContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*ShowAccountsContext) OK ¶
func (ctx *ShowAccountsContext) OK(r *Account) error
OK sends a HTTP response with status code 200.
type ShowAccountsDataContext ¶
type ShowAccountsDataContext struct { context.Context *goa.ResponseData *goa.RequestData ID int }
ShowAccountsDataContext provides the accounts_data show action context.
func NewShowAccountsDataContext ¶
func NewShowAccountsDataContext(ctx context.Context, r *http.Request, service *goa.Service) (*ShowAccountsDataContext, error)
NewShowAccountsDataContext parses the incoming request URL and body, performs validations and creates the context used by the accounts_data controller show action.
func (*ShowAccountsDataContext) BadRequest ¶
func (ctx *ShowAccountsDataContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ShowAccountsDataContext) NotFound ¶
func (ctx *ShowAccountsDataContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*ShowAccountsDataContext) OK ¶
func (ctx *ShowAccountsDataContext) OK(r *Accountmedia) error
OK sends a HTTP response with status code 200.
type ShowBottlesContext ¶
type ShowBottlesContext struct { context.Context *goa.ResponseData *goa.RequestData ID int }
ShowBottlesContext provides the bottles show action context.
func NewShowBottlesContext ¶
func NewShowBottlesContext(ctx context.Context, r *http.Request, service *goa.Service) (*ShowBottlesContext, error)
NewShowBottlesContext parses the incoming request URL and body, performs validations and creates the context used by the bottles controller show action.
func (*ShowBottlesContext) BadRequest ¶
func (ctx *ShowBottlesContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ShowBottlesContext) NotFound ¶
func (ctx *ShowBottlesContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*ShowBottlesContext) OK ¶
func (ctx *ShowBottlesContext) OK(r *Bottle) error
OK sends a HTTP response with status code 200.
func (*ShowBottlesContext) OKRelation ¶
func (ctx *ShowBottlesContext) OKRelation(r *BottleRelation) error
OKRelation sends a HTTP response with status code 200.
type ShowBottlesDataContext ¶
type ShowBottlesDataContext struct { context.Context *goa.ResponseData *goa.RequestData ID int }
ShowBottlesDataContext provides the bottles_data show action context.
func NewShowBottlesDataContext ¶
func NewShowBottlesDataContext(ctx context.Context, r *http.Request, service *goa.Service) (*ShowBottlesDataContext, error)
NewShowBottlesDataContext parses the incoming request URL and body, performs validations and creates the context used by the bottles_data controller show action.
func (*ShowBottlesDataContext) BadRequest ¶
func (ctx *ShowBottlesDataContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ShowBottlesDataContext) NotFound ¶
func (ctx *ShowBottlesDataContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*ShowBottlesDataContext) OK ¶
func (ctx *ShowBottlesDataContext) OK(r *Bottlemedia) error
OK sends a HTTP response with status code 200.
type ShowResponseContext ¶
type ShowResponseContext struct { context.Context *goa.ResponseData *goa.RequestData ID string }
ShowResponseContext provides the response show action context.
func NewShowResponseContext ¶
func NewShowResponseContext(ctx context.Context, r *http.Request, service *goa.Service) (*ShowResponseContext, error)
NewShowResponseContext parses the incoming request URL and body, performs validations and creates the context used by the response controller show action.
func (*ShowResponseContext) BadRequest ¶
func (ctx *ShowResponseContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ShowResponseContext) OK ¶
func (ctx *ShowResponseContext) OK(r *User) error
OK sends a HTTP response with status code 200.
func (*ShowResponseContext) OKTiny ¶
func (ctx *ShowResponseContext) OKTiny(r *UserTiny) 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 UpdateAccountsContext ¶
type UpdateAccountsContext struct { context.Context *goa.ResponseData *goa.RequestData ID int Payload *UpdateAccountsPayload }
UpdateAccountsContext provides the accounts update action context.
func NewUpdateAccountsContext ¶
func NewUpdateAccountsContext(ctx context.Context, r *http.Request, service *goa.Service) (*UpdateAccountsContext, error)
NewUpdateAccountsContext parses the incoming request URL and body, performs validations and creates the context used by the accounts controller update action.
func (*UpdateAccountsContext) BadRequest ¶
func (ctx *UpdateAccountsContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*UpdateAccountsContext) NotFound ¶
func (ctx *UpdateAccountsContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*UpdateAccountsContext) OK ¶
func (ctx *UpdateAccountsContext) OK(resp []byte) error
OK sends a HTTP response with status code 200.
type UpdateAccountsDataContext ¶
type UpdateAccountsDataContext struct { context.Context *goa.ResponseData *goa.RequestData ID int Payload *UpdateAccountsDataPayload }
UpdateAccountsDataContext provides the accounts_data update action context.
func NewUpdateAccountsDataContext ¶
func NewUpdateAccountsDataContext(ctx context.Context, r *http.Request, service *goa.Service) (*UpdateAccountsDataContext, error)
NewUpdateAccountsDataContext parses the incoming request URL and body, performs validations and creates the context used by the accounts_data controller update action.
func (*UpdateAccountsDataContext) BadRequest ¶
func (ctx *UpdateAccountsDataContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*UpdateAccountsDataContext) NotFound ¶
func (ctx *UpdateAccountsDataContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*UpdateAccountsDataContext) OK ¶
func (ctx *UpdateAccountsDataContext) OK(resp []byte) error
OK sends a HTTP response with status code 200.
type UpdateAccountsDataPayload ¶
type UpdateAccountsDataPayload struct { // email Email string `form:"email" json:"email" xml:"email"` // 名前 Name string `form:"name" json:"name" xml:"name"` }
UpdateAccountsDataPayload is the accounts_data update action payload.
func (*UpdateAccountsDataPayload) Validate ¶
func (payload *UpdateAccountsDataPayload) Validate() (err error)
Validate runs the validation rules defined in the design.
type UpdateAccountsPayload ¶
type UpdateAccountsPayload struct { // email Email string `form:"email" json:"email" xml:"email"` // 名前 Name string `form:"name" json:"name" xml:"name"` }
UpdateAccountsPayload is the accounts update action payload.
func (*UpdateAccountsPayload) Validate ¶
func (payload *UpdateAccountsPayload) Validate() (err error)
Validate runs the validation rules defined in the design.
type UpdateBottlesContext ¶
type UpdateBottlesContext struct { context.Context *goa.ResponseData *goa.RequestData ID int Payload *UpdateBottlesPayload }
UpdateBottlesContext provides the bottles update action context.
func NewUpdateBottlesContext ¶
func NewUpdateBottlesContext(ctx context.Context, r *http.Request, service *goa.Service) (*UpdateBottlesContext, error)
NewUpdateBottlesContext parses the incoming request URL and body, performs validations and creates the context used by the bottles controller update action.
func (*UpdateBottlesContext) BadRequest ¶
func (ctx *UpdateBottlesContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*UpdateBottlesContext) NotFound ¶
func (ctx *UpdateBottlesContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*UpdateBottlesContext) OK ¶
func (ctx *UpdateBottlesContext) OK(resp []byte) error
OK sends a HTTP response with status code 200.
type UpdateBottlesDataContext ¶
type UpdateBottlesDataContext struct { context.Context *goa.ResponseData *goa.RequestData ID int Payload *UpdateBottlesDataPayload }
UpdateBottlesDataContext provides the bottles_data update action context.
func NewUpdateBottlesDataContext ¶
func NewUpdateBottlesDataContext(ctx context.Context, r *http.Request, service *goa.Service) (*UpdateBottlesDataContext, error)
NewUpdateBottlesDataContext parses the incoming request URL and body, performs validations and creates the context used by the bottles_data controller update action.
func (*UpdateBottlesDataContext) BadRequest ¶
func (ctx *UpdateBottlesDataContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*UpdateBottlesDataContext) NotFound ¶
func (ctx *UpdateBottlesDataContext) NotFound() error
NotFound sends a HTTP response with status code 404.
func (*UpdateBottlesDataContext) OK ¶
func (ctx *UpdateBottlesDataContext) OK(resp []byte) error
OK sends a HTTP response with status code 200.
type UpdateBottlesDataPayload ¶
type UpdateBottlesDataPayload struct { // ボトル名 Name string `form:"name" json:"name" xml:"name"` // 数量 Quantity int `form:"quantity" json:"quantity" xml:"quantity"` }
UpdateBottlesDataPayload is the bottles_data update action payload.
func (*UpdateBottlesDataPayload) Validate ¶
func (payload *UpdateBottlesDataPayload) Validate() (err error)
Validate runs the validation rules defined in the design.
type UpdateBottlesPayload ¶
type UpdateBottlesPayload struct { // ボトル名 Name string `form:"name" json:"name" xml:"name"` // 数量 Quantity int `form:"quantity" json:"quantity" xml:"quantity"` }
UpdateBottlesPayload is the bottles update action payload.
func (*UpdateBottlesPayload) Validate ¶
func (payload *UpdateBottlesPayload) Validate() (err error)
Validate runs the validation rules defined in the design.
type User ¶
type User struct { // メールアドレス Email string `form:"email" json:"email" xml:"email"` // id ID int `form:"id" json:"id" xml:"id"` // 名前 Name string `form:"name" json:"name" xml:"name"` }
example (default view)
Identifier: application/vnd.user+json; view=default
type UserCollection ¶
type UserCollection []*User
UserCollection is the media type for an array of User (default view)
Identifier: application/vnd.user+json; type=collection; view=default
func (UserCollection) Validate ¶
func (mt UserCollection) Validate() (err error)
Validate validates the UserCollection media type instance.
type UserTiny ¶
type UserTiny struct { // id ID int `form:"id" json:"id" xml:"id"` // 名前 Name string `form:"name" json:"name" xml:"name"` }
example (tiny view)
Identifier: application/vnd.user+json; view=tiny
type UserTinyCollection ¶
type UserTinyCollection []*UserTiny
UserCollection is the media type for an array of User (tiny view)
Identifier: application/vnd.user+json; type=collection; view=tiny
func (UserTinyCollection) Validate ¶
func (mt UserTinyCollection) Validate() (err error)
Validate validates the UserTinyCollection media type instance.
type Validation ¶
type Validation struct { // デフォルト値 DefaultType string `form:"defaultType" json:"defaultType" xml:"defaultType"` // メールアドレス Email string `form:"email" json:"email" xml:"email"` // 列挙型 EnumType string `form:"enumType" json:"enumType" xml:"enumType"` // id ID int `form:"id" json:"id" xml:"id"` // 数字(1〜10) IntegerType int `form:"integerType" json:"integerType" xml:"integerType"` // デフォルト値 Reg string `form:"reg" json:"reg" xml:"reg"` // 文字(1~10文字) StringType string `form:"stringType" json:"stringType" xml:"stringType"` }
example (default view)
Identifier: application/vnd.validation+json; view=default
func (*Validation) Validate ¶
func (mt *Validation) Validate() (err error)
Validate validates the Validation media type instance.
type ValidationController ¶
type ValidationController interface { goa.Muxer Validation(*ValidationValidationContext) error }
ValidationController is the controller interface for the Validation actions.
type ValidationValidationContext ¶
type ValidationValidationContext struct { context.Context *goa.ResponseData *goa.RequestData DefaultType string Email string EnumType string ID int IntegerType int Reg string StringType string }
ValidationValidationContext provides the validation validation action context.
func NewValidationValidationContext ¶
func NewValidationValidationContext(ctx context.Context, r *http.Request, service *goa.Service) (*ValidationValidationContext, error)
NewValidationValidationContext parses the incoming request URL and body, performs validations and creates the context used by the validation controller validation action.
func (*ValidationValidationContext) BadRequest ¶
func (ctx *ValidationValidationContext) BadRequest(r error) error
BadRequest sends a HTTP response with status code 400.
func (*ValidationValidationContext) OK ¶
func (ctx *ValidationValidationContext) OK(r *Validation) error
OK sends a HTTP response with status code 200.