types

package
v0.0.0-...-8914535 Latest Latest
Warning

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

Go to latest
Published: May 7, 2015 License: MIT Imports: 7 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ingredient

type Ingredient struct {
	Id         int     `json:"id"`
	Name       string  `json:"name" validate:"ingredient"`
	Amount     float64 `json:"amount"`
	AmountUnit string  `json:"amountunit"`
	URL        string  `json:"url" validate:"url"`
}

type Ingredients

type Ingredients []Ingredient

type InitialUserAttributes

type InitialUserAttributes struct {
	FirstName string
	LastName  string
	Gender    string
	Bio       string
	Birthday  time.Time
}

type Json

type Json map[string]interface{}

type JsonArray

type JsonArray []Json

type Recipe

type Recipe struct {
	Id           string      `json:"id"`
	Author       string      `json:"author"`
	Image        string      `json:"image" validate:"url"`
	URL          string      `json:"url"`
	Title        string      `json:"title" validate:"recipetitle"`
	Notes        string      `json:"notes" validate:"recipenotes"`
	Ingredients  Ingredients `json:"ingredients" validate:"existence"`
	CookTime     int         `json:"cooktime" validate:"time"`
	CookTimeUnit string      `json:"cooktimeunit" validate:"timeunit"`
	PrepTime     int         `json:"preptime" validate:"time"`
	PrepTimeUnit string      `json:"preptimeunit" validate:"timeunit"`
	Steps        Steps       `json:"steps" validate:"existence"`
	Tags         Tags        `json:"tags"`
	Private      bool        `json:"private"`
	Created      time.Time   `json:"created"`
	LastModified time.Time   `json:"last_modified"`
}

type Recipes

type Recipes []Recipe

type RicettaValidator

type RicettaValidator struct {
	Validator validate.V
	Constants vc
}

func NewValidator

func NewValidator(config *goconfig.ConfigFile) *RicettaValidator

type Step

type Step struct {
	Id          int    `json:"id"`
	Instruction string `json:"instruction" validate:"step"`
	Time        int    `json:"time" validate:"time"`
	TimeUnit    string `json:"timeunit" validate:"timeunit"`
}

type Steps

type Steps []Step

type Tag

type Tag struct {
	Name string `json:"name" validate:"tag"`
}

type Tags

type Tags []Tag

type UserLogin

type UserLogin struct {
	Handle   string `json:"handle" validate:"handle"`
	Password string `json:"password" validate:"password"`
}

type UserSignupProposal

type UserSignupProposal struct {
	Handle          string `json:"handle" validate:"handle"`
	Email           string `json:"email" validate:"email"`
	Password        string `json:"password" validate:"password"`
	ConfirmPassword string `json:"confirmpassword" validate:"password"`
}

Jump to

Keyboard shortcuts

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