Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLibraryDb ¶
Types ¶
type LibraryDb ¶
type LibraryDb interface { CreateAuthor(ctx context.Context, data model2.Author) (model2.Author, error) UpdateAuthor(ctx context.Context, data model2.Author) error DeleteAuthor(ctx context.Context, Id uint) error GetAllAuthors(ctx context.Context) ([]*model2.Author, error) GetAuthorById(ctx context.Context, Id uint) (*model2.Author, error) CreateGenre(ctx context.Context, data model2.Genre) (model2.Genre, error) UpdateGenre(ctx context.Context, data model2.Genre) error DeleteGenre(ctx context.Context, Id uint) error GetAllGenres(ctx context.Context) ([]*model2.Genre, error) GetGenresById(ctx context.Context, Id uint) (*model2.Genre, error) CreateBook(ctx context.Context, data model2.Book) (model2.Book, error) UpdateBook(ctx context.Context, data model2.Book) error DeleteBook(ctx context.Context, Id uint) error GetAllBooks(ctx context.Context) ([]*model2.Book, error) GetBookById(ctx context.Context, Id uint) (*model2.Book, error) CreateSubscriber(ctx context.Context, data model2.Subscriber) (model2.Subscriber, error) UpdateSubscriber(ctx context.Context, data model2.Subscriber) error DeleteSubscriber(ctx context.Context, Id uint) error GetAllSubscribers(ctx context.Context) ([]*model2.Subscriber, error) GetSubscriberById(ctx context.Context, Id uint) (*model2.Subscriber, error) Subscribe(ctx context.Context, subscriberID uint, listOfBooks []model2.Book, listOfAuthors []model2.Author) (*model2.Subscribe, error) DeleteSubscribe(ctx context.Context, Id uint) error GetAllSubscribes(ctx context.Context) ([]*model2.Subscribe, error) GetSubscribeById(ctx context.Context, Id uint) (*model2.Subscribe, error) GetAuthorsSubscribers(ctx context.Context, listOfAuthors []model2.Author) ([]*model2.Subscriber, error) }
Click to show internal directories.
Click to hide internal directories.