model

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TypeRhum is the constant used for rhum spirits
	TypeRhum = "rhum"
	// TypeWhine is the constant used for rhum spirits
	TypeWhine = "wine"
	// TypeBeer is the constant used for rhum spirits
	TypeBeer = "beer"
	// TypeCalados is the constant used for rhum spirits
	TypeCalados = "calvados"
	// TypeChampagne is the constant used for rhum spirits
	TypeChampagne = "champagne"
	// TypeGin is the constant used for rhum spirits
	TypeGin = "gin"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Spirit

type Spirit struct {
	ID           bson.ObjectId `json:"id" bson:"_id,omitempty" `
	Name         string        `json:"name" bson:"name"`
	Distiller    string        `json:"distiller" bson:"distiller"`
	Bottler      string        `json:"bottler" bson:"bottler"`
	Country      string        `json:"country" bson:"country"`
	Region       string        `json:"region" bson:"region"`
	Composition  string        `json:"composition" bson:"composition"`
	SpiritType   string        `json:"type" bson:"type"`
	Age          uint8         `json:"age" bson:"age"`
	BottlingDate time.Time     `json:"bottlingDate" bson:"bottlingDate"`
	Score        float32       `json:"score" bson:"score"`
	Comment      string        `json:"comment" bson:"comment"`
}

Spirit is the structure to define a spirit

func (*Spirit) GetID

func (s *Spirit) GetID() string

GetID returns the ID of an Spirit as a string

Jump to

Keyboard shortcuts

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