Documentation ¶
Index ¶
- func NewAuthorRepository(collection *mongo.Collection) authors.Repository
- func NewBookRepository(collection *mongo.Collection) book.Repository
- func NewGenreRepository(collection *mongo.Collection) genre.Repository
- func NewSeriesRepository(collection *mongo.Collection) series.Repository
- type AuthorRepository
- func (r *AuthorRepository) Create(ctx context.Context, author *models.Author) error
- func (r *AuthorRepository) Delete(ctx context.Context, id string) error
- func (r *AuthorRepository) GetAll(ctx context.Context) ([]models.Author, error)
- func (r *AuthorRepository) GetByID(ctx context.Context, id string) (*models.Author, error)
- func (r *AuthorRepository) GetByName(ctx context.Context, name string) (*models.Author, error)
- func (r *AuthorRepository) Update(ctx context.Context, author *models.Author) error
- type BookRepository
- func (r *BookRepository) Create(ctx context.Context, book *models.Book) error
- func (r *BookRepository) Delete(ctx context.Context, id string) error
- func (r *BookRepository) GetAll(ctx context.Context) ([]models.Book, error)
- func (r *BookRepository) GetByID(ctx context.Context, id string) (*models.Book, error)
- func (r *BookRepository) Update(ctx context.Context, book *models.Book) error
- type GenreRepository
- func (r *GenreRepository) Create(ctx context.Context, genre *models.Genre) error
- func (r *GenreRepository) Delete(ctx context.Context, id string) error
- func (r *GenreRepository) GetAll(ctx context.Context) ([]models.Genre, error)
- func (r *GenreRepository) GetByID(ctx context.Context, id string) (*models.Genre, error)
- func (r *GenreRepository) GetByName(ctx context.Context, name string) (*models.Genre, error)
- func (r *GenreRepository) Update(ctx context.Context, genre *models.Genre) error
- type MongoStorage
- type SeriesRepository
- func (r *SeriesRepository) Create(ctx context.Context, series *models.Series) error
- func (r *SeriesRepository) Delete(ctx context.Context, id string) error
- func (r *SeriesRepository) GetAll(ctx context.Context) ([]models.Series, error)
- func (r *SeriesRepository) GetByID(ctx context.Context, id string) (*models.Series, error)
- func (r *SeriesRepository) GetByName(ctx context.Context, name string) (*models.Series, error)
- func (r *SeriesRepository) Update(ctx context.Context, series *models.Series) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthorRepository ¶
func NewAuthorRepository(collection *mongo.Collection) authors.Repository
func NewBookRepository ¶
func NewBookRepository(collection *mongo.Collection) book.Repository
func NewGenreRepository ¶
func NewGenreRepository(collection *mongo.Collection) genre.Repository
func NewSeriesRepository ¶
func NewSeriesRepository(collection *mongo.Collection) series.Repository
Types ¶
type AuthorRepository ¶
type AuthorRepository struct {
// contains filtered or unexported fields
}
func (*AuthorRepository) Delete ¶
func (r *AuthorRepository) Delete(ctx context.Context, id string) error
type BookRepository ¶
type BookRepository struct {
// contains filtered or unexported fields
}
func (*BookRepository) Delete ¶
func (r *BookRepository) Delete(ctx context.Context, id string) error
type GenreRepository ¶
type GenreRepository struct {
// contains filtered or unexported fields
}
func (*GenreRepository) Delete ¶
func (r *GenreRepository) Delete(ctx context.Context, id string) error
type MongoStorage ¶
func NewMongoStorage ¶
func NewMongoStorage() (*MongoStorage, error)
type SeriesRepository ¶
type SeriesRepository struct {
// contains filtered or unexported fields
}
func (*SeriesRepository) Delete ¶
func (r *SeriesRepository) Delete(ctx context.Context, id string) error
Click to show internal directories.
Click to hide internal directories.