Documentation ¶
Overview ¶
Package redis contains the redis implementation of the data access objects for the bookStock management system.
Index ¶
- type BookStockRepository
- func (dr BookStockRepository) Add(bookStock domain.BookStock, parentID string, spaceID string) (string, error)
- func (dr BookStockRepository) Delete(id string) error
- func (br BookStockRepository) Get(ctx context.Context, ISBN string) (domain.BookStock, error)
- func (dr BookStockRepository) Update(id string, p domain.BookStock) error
- type DataContext
- type HealthRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookStockRepository ¶
type BookStockRepository struct {
// contains filtered or unexported fields
}
BookStockRepository holds the client for the database
func (BookStockRepository) Add ¶
func (dr BookStockRepository) Add(bookStock domain.BookStock, parentID string, spaceID string) (string, error)
Add adds a new bookStock or a new folder to the underlying database. It returns the bookStock inserted on success or error
func (BookStockRepository) Delete ¶
func (dr BookStockRepository) Delete(id string) error
Delete selects a single bookStock from the database with the given unique identifier Returns an error if database fails to provide service
type DataContext ¶
type DataContext struct { BookStockRepository BookStockRepository HealthRepository HealthRepository }
DataContext represents a struct that holds concrete repositories
func NewDataContext ¶
func NewDataContext() (DataContext, error)
NewDataContext returns a new mongoDB backed DataContext
type HealthRepository ¶
type HealthRepository struct {
// contains filtered or unexported fields
}
HealthRepository represent a structure that will communicate to MongoDB to accomplish health related transactions
func (HealthRepository) Ready ¶
func (hr HealthRepository) Ready() bool
Ready checks the arangodb connection
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package dao contains the data access objects for the bookStock management system.
|
Package dao contains the data access objects for the bookStock management system. |
Package mappers contains the funtions that maps DAO objects to domain objects and visa versa.
|
Package mappers contains the funtions that maps DAO objects to domain objects and visa versa. |