Documentation ¶
Index ¶
- Variables
- type ItemStore
- type LocationStore
- type Store
- func (s *Store) AddItem(item models.Item) error
- func (s *Store) AddItemStored(item models.Item) error
- func (s *Store) AddLocation(loc models.Location) error
- func (s *Store) Connect() error
- func (s *Store) Disconnect() error
- func (s *Store) GetAllItems() ([]models.Item, error)
- func (s *Store) GetAllLocations() ([]models.Location, error)
- func (s *Store) GetItemByID(id string) (models.Item, error)
- func (s *Store) GetLocationByID(id string) (models.Location, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("record not found")
Functions ¶
This section is empty.
Types ¶
type LocationStore ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewStoreWithMigrations ¶
func (*Store) AddLocation ¶
AddLocation adds a new location to the database
Returns an error if the query fails for other reasons.
func (*Store) Disconnect ¶
func (*Store) GetAllLocations ¶
GetAllLocations returns all locations from the database
Returns an error if the query fails for other reasons.
Click to show internal directories.
Click to hide internal directories.