Documentation ¶
Index ¶
- func CreateTables(db *sql.DB) error
- func NewSqlite3DB(file string) (*sql.DB, error)
- type InMemStore
- func (s InMemStore) DeleteShoppingList(id string) error
- func (s InMemStore) DeleteShoppingListEntry(id string) error
- func (s InMemStore) FindUserByName(n string) (model.User, error)
- func (s InMemStore) GetShoppingList(id string) (model.ShoppingList, error)
- func (s InMemStore) GetShoppingListEntries(id string) ([]model.Entry, error)
- func (s InMemStore) GetShoppingLists() ([]model.ShoppingList, error)
- func (s InMemStore) GetUsers() ([]model.User, error)
- func (s InMemStore) StoreShoppingList(l model.ShoppingList) error
- func (s InMemStore) StoreShoppingListEntry(listID string, e model.Entry) error
- func (s InMemStore) StoreUser(u model.User) error
- func (s InMemStore) UpdateShoppingListEntry(e model.Entry) error
- type SqlStore
- func (s SqlStore) DeleteShoppingList(id string) error
- func (s SqlStore) DeleteShoppingListEntry(id string) error
- func (s SqlStore) FindUserByName(n string) (model.User, error)
- func (s SqlStore) GetShoppingList(id string) (model.ShoppingList, error)
- func (s SqlStore) GetShoppingListEntries(id string) ([]model.Entry, error)
- func (s SqlStore) GetShoppingLists() ([]model.ShoppingList, error)
- func (s SqlStore) GetUsers() ([]model.User, error)
- func (s SqlStore) StoreShoppingList(l model.ShoppingList) error
- func (s SqlStore) StoreShoppingListEntry(listID string, e model.Entry) error
- func (s SqlStore) StoreUser(u model.User) error
- func (s SqlStore) UpdateShoppingListEntry(e model.Entry) error
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTables ¶
Types ¶
type InMemStore ¶
type InMemStore struct {
// contains filtered or unexported fields
}
func (InMemStore) DeleteShoppingList ¶
func (s InMemStore) DeleteShoppingList(id string) error
func (InMemStore) DeleteShoppingListEntry ¶
func (s InMemStore) DeleteShoppingListEntry(id string) error
func (InMemStore) FindUserByName ¶
func (s InMemStore) FindUserByName(n string) (model.User, error)
func (InMemStore) GetShoppingList ¶
func (s InMemStore) GetShoppingList(id string) (model.ShoppingList, error)
func (InMemStore) GetShoppingListEntries ¶
func (s InMemStore) GetShoppingListEntries(id string) ([]model.Entry, error)
func (InMemStore) GetShoppingLists ¶
func (s InMemStore) GetShoppingLists() ([]model.ShoppingList, error)
func (InMemStore) StoreShoppingList ¶
func (s InMemStore) StoreShoppingList(l model.ShoppingList) error
func (InMemStore) StoreShoppingListEntry ¶
func (s InMemStore) StoreShoppingListEntry(listID string, e model.Entry) error
func (InMemStore) UpdateShoppingListEntry ¶
func (s InMemStore) UpdateShoppingListEntry(e model.Entry) error
type SqlStore ¶
type SqlStore struct {
// contains filtered or unexported fields
}
func (SqlStore) DeleteShoppingList ¶
func (SqlStore) DeleteShoppingListEntry ¶
func (SqlStore) GetShoppingList ¶
func (s SqlStore) GetShoppingList(id string) (model.ShoppingList, error)
func (SqlStore) GetShoppingListEntries ¶
func (SqlStore) GetShoppingLists ¶
func (s SqlStore) GetShoppingLists() ([]model.ShoppingList, error)
func (SqlStore) StoreShoppingList ¶
func (s SqlStore) StoreShoppingList(l model.ShoppingList) error
func (SqlStore) StoreShoppingListEntry ¶
type Store ¶
type Store interface { GetShoppingLists() ([]model.ShoppingList, error) GetShoppingList(id string) (model.ShoppingList, error) GetShoppingListEntries(id string) ([]model.Entry, error) StoreShoppingList(l model.ShoppingList) error DeleteShoppingList(id string) error StoreShoppingListEntry(listID string, entry model.Entry) error UpdateShoppingListEntry(e model.Entry) error DeleteShoppingListEntry(id string) error GetUsers() ([]model.User, error) StoreUser(u model.User) error FindUserByName(name string) (model.User, error) }
func NewInMemStore ¶
func NewInMemStore() Store
Click to show internal directories.
Click to hide internal directories.