Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrBookNotFound = errors.New("book not found")
)
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { GetBook(ctx context.Context, id string) (model.Book, error) // Updated method names and parameters CreateBook(ctx context.Context, in model.Book) (model.Book, error) UpdateBook(ctx context.Context, in model.Book) (model.Book, error) DeleteBook(ctx context.Context, id string) error }
func NewRepository ¶
func NewRepository(db *mongo.Database) Repository
Click to show internal directories.
Click to hide internal directories.