model

package
v0.0.0-...-49d137d Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ingredient

type Ingredient struct {
	Name   string
	Amount float32
	Unit   unit.Unit
}

type IngredientGroup

type IngredientGroup struct {
	Label string
	Items []Ingredient
}

type InstructionSet

type InstructionSet struct {
	Label   string
	Summary string
	Steps   []string
}

type Recipe

type Recipe struct {
	Name             string
	Permalink        string
	Intro            string
	IngredientGroups []IngredientGroup `yaml:"ingredients"`
	InstructionSets  []InstructionSet  `yaml:"directions"`
}

func Parse

func Parse(data []byte) (*Recipe, error)

func ParseFile

func ParseFile(path string) (*Recipe, error)

func (*Recipe) InferDefaults

func (r *Recipe) InferDefaults()

func (*Recipe) Normalize

func (r *Recipe) Normalize()

Jump to

Keyboard shortcuts

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