Documentation ¶
Index ¶
- type BookInfoRepository
- func (dr BookInfoRepository) Add(bookInfo domain.BookInfo, parentID string, spaceID string) (string, error)
- func (dr BookInfoRepository) Delete(id string) error
- func (br BookInfoRepository) Get(ctx context.Context, ISBN string) (domain.BookInfo, error)
- func (br BookInfoRepository) List(ctx context.Context) ([]domain.BookInfo, error)
- func (dr BookInfoRepository) Update(id string, p domain.BookInfo) error
- type DataContext
- type HealthRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookInfoRepository ¶
type BookInfoRepository struct {
// contains filtered or unexported fields
}
BookInfoRepository holds the arangodb client and database name for methods to use
func (BookInfoRepository) Add ¶
func (dr BookInfoRepository) Add(bookInfo domain.BookInfo, parentID string, spaceID string) (string, error)
AddItem adds a new bookInfo or a new folder to the underlying database. It returns the bookInfo inserted on success or error
func (BookInfoRepository) Delete ¶
func (dr BookInfoRepository) Delete(id string) error
Delete selects a single bookInfo from the database with the given unique identifier Returns an error if database fails to provide service
func (BookInfoRepository) Get ¶
Get selects a single bookInfo from the database with the given unique identifier Returns an error if database fails to provide service
type DataContext ¶
type DataContext struct { BookInfoRepository BookInfoRepository 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