Documentation ¶
Index ¶
- func ToAccountLink(accountID int) *app.AccountLink
- func ToAccountMedia(account *store.AccountModel) *app.Account
- func ToAccountMediaTiny(account *store.AccountModel) *app.AccountTiny
- func ToBottleMedia(a *store.AccountModel, b *store.BottleModel) *app.Bottle
- func ToBottleMediaTiny(bottle *store.BottleModel) *app.BottleTiny
- func Watcher(accountID, bottleID int) websocket.Handler
- type AccountController
- func (b *AccountController) Create(c *app.CreateAccountContext) error
- func (b *AccountController) Delete(c *app.DeleteAccountContext) error
- func (b *AccountController) List(c *app.ListAccountContext) error
- func (b *AccountController) Show(c *app.ShowAccountContext) error
- func (b *AccountController) Update(c *app.UpdateAccountContext) error
- type BottleController
- func (b *BottleController) Create(ctx *app.CreateBottleContext) error
- func (b *BottleController) Delete(ctx *app.DeleteBottleContext) error
- func (b *BottleController) List(ctx *app.ListBottleContext) error
- func (b *BottleController) Rate(ctx *app.RateBottleContext) error
- func (b *BottleController) Show(ctx *app.ShowBottleContext) error
- func (b *BottleController) Update(ctx *app.UpdateBottleContext) error
- func (b *BottleController) Watch(ctx *app.WatchBottleContext) error
- type HealthController
- type JsController
- type PublicController
- type SwaggerController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToAccountLink ¶
func ToAccountLink(accountID int) *app.AccountLink
ToAccountLink builds an account link from an account model.
func ToAccountMedia ¶
func ToAccountMedia(account *store.AccountModel) *app.Account
ToAccountMedia builds an account media type from an account model.
func ToAccountMediaTiny ¶
func ToAccountMediaTiny(account *store.AccountModel) *app.AccountTiny
ToAccountMediaTiny builds an account media type with tiny view from an account model.
func ToBottleMedia ¶
func ToBottleMedia(a *store.AccountModel, b *store.BottleModel) *app.Bottle
ToBottleMedia converts a bottle model into a bottle media type
func ToBottleMediaTiny ¶
func ToBottleMediaTiny(bottle *store.BottleModel) *app.BottleTiny
ToBottleMediaTiny builds an bottle media type with tiny view from an bottle model.
Types ¶
type AccountController ¶
type AccountController struct { *goa.Controller // contains filtered or unexported fields }
AccountController implements the account resource.
func NewAccount ¶
func NewAccount(service *goa.Service, db *store.DB) *AccountController
NewAccount creates a account controller.
func (*AccountController) Create ¶
func (b *AccountController) Create(c *app.CreateAccountContext) error
Create records a new account.
func (*AccountController) Delete ¶
func (b *AccountController) Delete(c *app.DeleteAccountContext) error
Delete removes a account from the database.
func (*AccountController) List ¶
func (b *AccountController) List(c *app.ListAccountContext) error
List retrieves all the accounts.
func (*AccountController) Show ¶
func (b *AccountController) Show(c *app.ShowAccountContext) error
Show retrieves the account with the given id.
func (*AccountController) Update ¶
func (b *AccountController) Update(c *app.UpdateAccountContext) error
Update updates a account field(s).
type BottleController ¶
type BottleController struct { *goa.Controller // contains filtered or unexported fields }
BottleController implements the bottle resource.
func NewBottle ¶
func NewBottle(service *goa.Service, db *store.DB) *BottleController
NewBottle creates a bottle controller.
func (*BottleController) Create ¶
func (b *BottleController) Create(ctx *app.CreateBottleContext) error
Create records a new bottle.
func (*BottleController) Delete ¶
func (b *BottleController) Delete(ctx *app.DeleteBottleContext) error
Delete removes a bottle from the database.
func (*BottleController) List ¶
func (b *BottleController) List(ctx *app.ListBottleContext) error
List lists all the bottles in the account optionally filtering by year.
func (*BottleController) Rate ¶
func (b *BottleController) Rate(ctx *app.RateBottleContext) error
Rate rates a bottle.
func (*BottleController) Show ¶
func (b *BottleController) Show(ctx *app.ShowBottleContext) error
Show retrieves the bottle with the given id.
func (*BottleController) Update ¶
func (b *BottleController) Update(ctx *app.UpdateBottleContext) error
Update updates a bottle field(s).
func (*BottleController) Watch ¶
func (b *BottleController) Watch(ctx *app.WatchBottleContext) error
Watch watches the bottle with the given id.
type HealthController ¶
type HealthController struct { *goa.Controller // contains filtered or unexported fields }
HealthController implements the account resource.
func NewHealth ¶
func NewHealth(service *goa.Service, db *store.DB) *HealthController
NewHealth creates a account controller.
func (*HealthController) Health ¶
func (b *HealthController) Health(c *app.HealthHealthContext) error
Health performs the health-check.
type JsController ¶
type JsController struct {
*goa.Controller
}
JsController implements the js resource.
type PublicController ¶
type PublicController struct {
*goa.Controller
}
PublicController implements the public resource.
func NewPublic ¶
func NewPublic(service *goa.Service) *PublicController
NewPublic creates a public controller.
type SwaggerController ¶
type SwaggerController struct {
*goa.Controller
}
SwaggerController implements the swagger resource.
func NewSwagger ¶
func NewSwagger(service *goa.Service) *SwaggerController
NewSwagger creates a swagger controller.