Documentation
¶
Overview ¶
Package mongo provides a database for the library.
Index ¶
- type Database
- func (d *Database) CreateBooks(ctx context.Context, books ...book.Book) ([]book.Book, error)
- func (d *Database) DeleteBook(ctx context.Context, id string) error
- func (d *Database) ReadAdminPassword(ctx context.Context) (hashedPassword []byte, err error)
- func (d *Database) ReadBook(ctx context.Context, id string) (*book.Book, error)
- func (d *Database) ReadBookHeaders(ctx context.Context, filter book.Filter, limit, offset int) ([]book.Header, error)
- func (d *Database) ReadBookSubjects(ctx context.Context, limit, offset int) ([]book.Subject, error)
- func (d *Database) UpdateAdminPassword(ctx context.Context, hashedPassword string) error
- func (d *Database) UpdateBook(ctx context.Context, b book.Book, updateImage bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) CreateBooks ¶
func (*Database) ReadAdminPassword ¶
func (*Database) ReadBookHeaders ¶
func (*Database) ReadBookSubjects ¶
func (*Database) UpdateAdminPassword ¶
Click to show internal directories.
Click to hide internal directories.