controllers

package
v0.0.0-...-557f343 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToAccountLink(account *store.AccountModel) *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 Watcher

func Watcher(accountID, bottleID int) websocket.Handler

Echo the data received on the WebSocket.

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

Create records a new account.

func (*AccountController) Delete

Delete removes a account from the database.

func (*AccountController) List

List retrieves all the accounts.

func (*AccountController) Show

Show retrieves the account with the given id.

func (*AccountController) Update

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

Create records a new bottle.

func (*BottleController) Delete

Delete removes a bottle from the database.

func (*BottleController) List

List lists all the bottles in the account optionally filtering by year.

func (*BottleController) Rate

Rate rates a bottle.

func (*BottleController) Show

Show retrieves the bottle with the given id.

func (*BottleController) Update

Update updates a bottle field(s).

func (*BottleController) Watch

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

Health performs the health-check.

type JsController

type JsController struct {
	*goa.Controller
}

JsController implements the js resource.

func NewJs

func NewJs(service *goa.Service) *JsController

NewJs creates a js controller.

type PublicController

type PublicController struct {
	*goa.Controller
}

PublicController implements the public resource.

func NewPublic

func NewPublic(service *goa.Service) *PublicController

NewPublicController creates a public controller.

type SwaggerController

type SwaggerController struct {
	*goa.Controller
}

SwaggerController implements the swagger resource.

func NewSwagger

func NewSwagger(service *goa.Service) *SwaggerController

NewSwaggerController creates a swagger controller.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL