model

package
v0.0.0-...-e13fbdd Latest Latest
Warning

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

Go to latest
Published: May 7, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

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   SpiritType    `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

type SpiritType

type SpiritType int

SpiritType is the type of spirit as typed enumeration

const (
	// TypeRhum is the constant used for rhum spirits = 0
	TypeRhum SpiritType = iota
	// TypeWine is the constant used for wine
	TypeWine
	// TypeWhisky is the constant used for whisky
	TypeWhisky
	// TypeChampagne is the constant used for champagne
	TypeChampagne
	// TypeGin is the constant used for gin
	TypeGin
)

Jump to

Keyboard shortcuts

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