controllers

package
v0.0.0-...-88979d5 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2018 License: MIT Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

func Watcher

func Watcher(accountID, bottleID int) websocket.Handler

Watcher echos 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

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.

Jump to

Keyboard shortcuts

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