Documentation ¶
Index ¶
- type DB
- func (db *DB) CheckUser(name string, passwordHash string) (string, error)
- func (db *DB) ContainsUsername(name string) bool
- func (db *DB) CreateIngredient(ingredient model.Ingredient) error
- func (db *DB) CreateRecipe(recipe model.Recipe) error
- func (db *DB) CreateTag(tag model.Tag) error
- func (db *DB) CreateUser(user model.User) error
- func (db *DB) DeleteRecipe(id string) (int, error)
- func (db *DB) GetAllIngredients() ([]model.Ingredient, error)
- func (db *DB) GetAllRecipes() ([]model.Recipe, error)
- func (db *DB) GetAllTags() ([]model.Tag, error)
- func (db *DB) GetSingleRecipe(id string) (model.Recipe, error)
- func (db *DB) GetUserById(id string) (model.User, error)
- func (db *DB) Open(uri string) error
- func (db *DB) QueryTest(id int) (model.Test, error)
- func (db *DB) ReplaceRecipe(recipe model.Recipe) (int, error)
- func (db *DB) Setup()
- type DBError
- type Persistence
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) ContainsUsername ¶
func (*DB) CreateIngredient ¶
func (db *DB) CreateIngredient(ingredient model.Ingredient) error
func (*DB) GetAllIngredients ¶
func (db *DB) GetAllIngredients() ([]model.Ingredient, error)
Click to show internal directories.
Click to hide internal directories.