Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { AddAuthor(author data.Author) (string, error) ListAll() []data.Author UpdateAuthor(author data.Author) (data.Author, error) DeleteAuthor(id string) error GetAuthor(id string) (data.Author, error) AuthorExist(id string) bool }
func NewMongoDatabase ¶
type Repository ¶
type Repository interface { AddAuthor(author data.Author) (string, error) ListAll() []data.Author UpdateAuthor(author data.Author) (data.Author, error) DeleteAuthor(id string) error GetAuthor(id string) (data.Author, error) AuthorExist(id string) bool }
Repository represents the repository interface.
Click to show internal directories.
Click to hide internal directories.