repositories

package
v0.0.0-...-42ff6b3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenreRepo

type GenreRepo struct {
	*mongodb.MongoDB
}

GenreRepo -.

func NewGenreRepo

func NewGenreRepo(mdb *mongodb.MongoDB) *GenreRepo

New -.

func (*GenreRepo) Create

func (sr *GenreRepo) Create(ctx context.Context, genre_name string) error

Create -.

func (*GenreRepo) Delete

func (sr *GenreRepo) Delete(ctx context.Context, genre_id string) error

Delete -.

func (*GenreRepo) GetAll

func (ur *GenreRepo) GetAll(ctx context.Context) ([]entity.Genre, error)

GetAll -.

func (*GenreRepo) GetById

func (sr *GenreRepo) GetById(ctx context.Context, genre_id string) (entity.Genre, error)

GetById -.

func (*GenreRepo) Update

func (sr *GenreRepo) Update(ctx context.Context, newGenre entity.Genre) error

Update -.

type MovieRepo

type MovieRepo struct {
	*mongodb.MongoDB
}

MovieRepo -.

func NewMovieRepo

func NewMovieRepo(mdb *mongodb.MongoDB) *MovieRepo

New -.

func (*MovieRepo) Create

func (ur *MovieRepo) Create(ctx context.Context, movie entity.Movie) error

Create -.

func (*MovieRepo) Delete

func (ur *MovieRepo) Delete(ctx context.Context, movie_id string) error

Delete -.

func (*MovieRepo) GetAll

func (ur *MovieRepo) GetAll(ctx context.Context) ([]entity.Movie, error)

GetAll -.

func (*MovieRepo) GetById

func (ur *MovieRepo) GetById(ctx context.Context, movie_id string) (entity.Movie, error)

GetById -.

func (*MovieRepo) Update

func (ur *MovieRepo) Update(ctx context.Context, movie_id string, movie entity.Movie) error

Update -.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL