Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("No record found matching supplied criteria")
ErrNotFound represents the error when a database record cannot be found matching the criteria specified by the caller
Functions ¶
This section is empty.
Types ¶
type Note ¶
Note represents an individual comment (or note) on a recipe
type Recipe ¶
type Recipe struct { ID int64 Name string Description string Ingredients string Directions string Image string Tags Tags }
Recipe is the primary model class for recipe storage and retrieval
func (*Recipe) Create ¶
Create stores the recipe in the database as a new record using a dedicated transation that is committed if there are not errors.
func (*Recipe) CreateTx ¶
CreateTx stores the recipe in the database as a new record using the specified transaction.
func (*Recipe) Read ¶
Read retrieves the information about the recipe from the database, if found. If no recipe exists with the specified ID, a NoRecordFound error is returned.
type RecipeImage ¶
type RecipeImages ¶
type RecipeImages []RecipeImage
func (*RecipeImages) List ¶
func (imgs *RecipeImages) List(recipeID int64) error
type Recipes ¶
type Recipes []Recipe
Recipes represents a collection of Recipe objects