Versions in this module Expand all Collapse all v1 v1.2.0 Aug 26, 2016 Changes in this version type User + PasswordHash string v1.1.1 Aug 18, 2016 v1.1.0 Aug 16, 2016 Changes in this version + const SortDirAsc + const SortDirDesc + const SortRecipeByID + const SortRecipeByName + const SortRecipeByRating + const SortTagByFrequency + const SortTagByText type RecipeImageModel + func (m *RecipeImageModel) ReadMainImage(recipeID int64) (*RecipeImage, error) + func (m *RecipeImageModel) ReadMainImageTx(recipeID int64, tx *sqlx.Tx) (*RecipeImage, error) + func (m *RecipeImageModel) UpdateMainImage(image *RecipeImage) error + func (m *RecipeImageModel) UpdateMainImageTx(image *RecipeImage, tx *sqlx.Tx) error + type RecipesFilter struct + Count int64 + Page int64 + Query string + SortBy string + SortDir string + Tags []string type SearchModel + func (m *SearchModel) FindRecipes(filter RecipesFilter) (*Recipes, int64, error) + func (m *SearchModel) FindTags(filter TagsFilter) (*[]string, error) + type TagsFilter struct + Count int64 + SortBy string + SortDir string v1.0.0 Aug 3, 2016 Changes in this version + var ErrNotFound = errors.New("No record found matching supplied criteria") + type Model struct + Images *RecipeImageModel + Notes *NoteModel + Recipes *RecipeModel + Search *SearchModel + Tags *TagModel + Users *UserModel + func New(cfg *conf.Config) *Model + func (m *Model) TearDown() + type Note struct + CreatedAt time.Time + ID int64 + ModifiedAt time.Time + Note string + RecipeID int64 + type NoteModel struct + func (m *NoteModel) Create(note *Note) error + func (m *NoteModel) CreateTx(note *Note, tx *sqlx.Tx) error + func (m *NoteModel) Delete(id int64) error + func (m *NoteModel) DeleteAll(recipeID int64) error + func (m *NoteModel) DeleteAllTx(recipeID int64, tx *sqlx.Tx) error + func (m *NoteModel) DeleteTx(id int64, tx *sqlx.Tx) error + func (m *NoteModel) List(recipeID int64) (*Notes, error) + func (m *NoteModel) Update(note *Note) error + func (m *NoteModel) UpdateTx(note *Note, tx *sqlx.Tx) error + type Notes []Note + type Recipe struct + AvgRating float64 + Directions string + ID int64 + Ingredients string + MainImage RecipeImage + Name string + NutritionInfo string + ServingSize string + SourceURL string + Tags []string + type RecipeImage struct + CreatedAt time.Time + ID int64 + ModifiedAt time.Time + Name string + RecipeID int64 + ThumbnailURL string + URL string + type RecipeImageModel struct + func NewRecipeImageModel(model *Model) *RecipeImageModel + func (m *RecipeImageModel) Create(imageInfo *RecipeImage, imageData []byte) error + func (m *RecipeImageModel) CreateTx(imageInfo *RecipeImage, imageData []byte, tx *sqlx.Tx) error + func (m *RecipeImageModel) Delete(id int64) error + func (m *RecipeImageModel) DeleteAll(recipeID int64) error + func (m *RecipeImageModel) DeleteAllTx(recipeID int64, tx *sqlx.Tx) error + func (m *RecipeImageModel) DeleteTx(id int64, tx *sqlx.Tx) error + func (m *RecipeImageModel) List(recipeID int64) (*RecipeImages, error) + func (m *RecipeImageModel) ReadTx(id int64, tx *sqlx.Tx) (*RecipeImage, error) + type RecipeImages []RecipeImage + type RecipeModel struct + func (m *RecipeModel) Create(recipe *Recipe) error + func (m *RecipeModel) CreateTx(recipe *Recipe, tx *sqlx.Tx) error + func (m *RecipeModel) Delete(id int64) error + func (m *RecipeModel) DeleteTx(id int64, tx *sqlx.Tx) error + func (m *RecipeModel) Read(id int64) (*Recipe, error) + func (m *RecipeModel) SetRating(id int64, rating float64) error + func (m *RecipeModel) Update(recipe *Recipe) error + func (m *RecipeModel) UpdateMainImage(recipe *Recipe) error + func (m *RecipeModel) UpdateMainImageTx(recipe *Recipe, tx *sqlx.Tx) error + func (m *RecipeModel) UpdateTx(recipe *Recipe, tx *sqlx.Tx) error + type Recipes []Recipe + type SearchFilter struct + Query string + SortBy SortBy + SortDesc bool + Tags []string + type SearchModel struct + func (m *SearchModel) Find(filter SearchFilter, page int64, count int64) (*Recipes, int64, error) + type SortBy int + const SortByID + const SortByName + const SortByRandom + const SortByRating + type TagModel struct + func (m *TagModel) Create(recipeID int64, tag string) error + func (m *TagModel) CreateTx(recipeID int64, tag string, tx *sqlx.Tx) error + func (m *TagModel) DeleteAll(recipeID int64) error + func (m *TagModel) DeleteAllTx(recipeID int64, tx *sqlx.Tx) error + func (m *TagModel) List(recipeID int64) (*[]string, error) + func (m *TagModel) ListAll() (*[]string, error) + func (m *TagModel) ListMostUsed(count int) (*[]string, error) + type User struct + ID int64 + Username string + type UserModel struct + func (m *UserModel) Authenticate(username, password string) (*User, error) + func (m *UserModel) Create(username, password string) error + func (m *UserModel) CreateTx(username, password string, tx *sqlx.Tx) error + func (m *UserModel) Read(id int64) (*User, error) Other modules containing this package gopkg.in/chadweimer/gomp.v0 gopkg.in/chadweimer/gomp.v2