github.com/goadesign/goa/examples/cellar/gen/sommelier/views
views
import "github.com/goadesign/goa/examples/cellar/gen/sommelier/views"
Overview
Index
- type ComponentView
- type StoredBottleCollection
- type StoredBottleCollectionView
- type StoredBottleView
- type WineryView
Package files
type ComponentView
type ComponentView struct {
// Grape varietal
Varietal *string
// Percentage of varietal in wine
Percentage *uint32
}
ComponentView is a type that runs validations on a projected type.
func (*ComponentView) Validate
func (result *ComponentView) Validate() (err error)
Validate runs the validations defined on ComponentView.
type StoredBottleCollection
type StoredBottleCollection struct {
// Type to project
Projected StoredBottleCollectionView
// View to render
View string
}
StoredBottleCollection is the viewed result type that is projected based on a view.
func (StoredBottleCollection) Validate
func (result StoredBottleCollection) Validate() (err error)
Validate runs the validations defined on the viewed result type StoredBottleCollection.
type StoredBottleCollectionView
type StoredBottleCollectionView []*StoredBottleView
StoredBottleCollectionView is a type that runs validations on a projected type.
func (StoredBottleCollectionView) Validate
func (result StoredBottleCollectionView) Validate() (err error)
Validate runs the validations defined on StoredBottleCollectionView using the “default” view.
func (StoredBottleCollectionView) ValidateTiny
func (result StoredBottleCollectionView) ValidateTiny() (err error)
ValidateTiny runs the validations defined on StoredBottleCollectionView using the “tiny” view.
type StoredBottleView
type StoredBottleView struct {
// ID is the unique id of the bottle.
ID *string
// Name of bottle
Name *string
// Winery that produces wine
Winery *WineryView
// Vintage of bottle
Vintage *uint32
// Composition is the list of grape varietals and associated percentage.
Composition []*ComponentView
// Description of bottle
Description *string
// Rating of bottle from 1 (worst) to 5 (best)
Rating *uint32
}
StoredBottleView is a type that runs validations on a projected type.
func (*StoredBottleView) Validate
func (result *StoredBottleView) Validate() (err error)
Validate runs the validations defined on StoredBottleView using the “default” view.
func (*StoredBottleView) ValidateTiny
func (result *StoredBottleView) ValidateTiny() (err error)
ValidateTiny runs the validations defined on StoredBottleView using the “tiny” view.
type WineryView
type WineryView struct {
// Name of winery
Name *string
// Region of winery
Region *string
// Country of winery
Country *string
// Winery website URL
URL *string
}
WineryView is a type that runs validations on a projected type.
func (*WineryView) Validate
func (result *WineryView) Validate() (err error)
Validate runs the validations defined on WineryView using the “default” view.
func (*WineryView) ValidateTiny
func (result *WineryView) ValidateTiny() (err error)
ValidateTiny runs the validations defined on WineryView using the “tiny” view.
Generated by godoc2md