Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct {
// contains filtered or unexported fields
}
func LoadCollection ¶
func LoadCollection(file string) (*Collection, error)
func NewCollection ¶
func NewCollection() *Collection
func (*Collection) Add ¶
func (c *Collection) Add(r ...Recipe)
func (*Collection) Export ¶
func (c *Collection) Export(dest string) error
func (*Collection) Get ¶
func (c *Collection) Get(rm ...RecipeMatcher)
func (*Collection) LoadRecipes ¶
func (c *Collection) LoadRecipes(file ...string) error
func (*Collection) Remove ¶
func (c *Collection) Remove(rs ...Recipe)
type Recipe ¶
type Recipe struct { UID string `json:"uid"` Created string `json:"created"` Hash string `json:"hash"` Name string `json:"name"` Description string `json:"description"` Ingredients string `json:"ingredients"` Directions string `json:"directions"` Notes string `json:"notes"` NutritionalInfo string `json:"nutritional_info"` PrepTime string `json:"prep_time"` CookTime string `json:"cook_time"` TotalTime string `json:"total_time"` Difficulty string `json:"difficulty"` Servings string `json:"servings"` Rating int `json:"rating"` Source string `json:"source"` SourceURL string `json:"source_url"` Photo string `json:"photo"` PhotoLarge string `json:"photo_large"` PhotoHash string `json:"photo_hash"` ImageURL string `json:"image_url"` Categories []string `json:"categories"` PhotoData string `json:"photo_data"` }
func (*Recipe) SetImageURL ¶
SetImageURL sets the recipe image from an image URL
type RecipeMatcher ¶
func HasCategory ¶
func HasCategory(category string) RecipeMatcher
func HasIngredient ¶
func HasIngredient(ingredient string) RecipeMatcher
func NameContains ¶
func NameContains(name string) RecipeMatcher
Click to show internal directories.
Click to hide internal directories.