Documentation
¶
Index ¶
- type BookService
- type BookServiceImpl
- func (b *BookServiceImpl) Create(ctx context.Context, form *repository.Book) (*repository.Book, error)
- func (b *BookServiceImpl) Delete(ctx context.Context, paramID string) error
- func (b *BookServiceImpl) FindOne(ctx context.Context, paramID string) (*repository.Book, error)
- func (b *BookServiceImpl) Update(ctx context.Context, paramID string, book *repository.Book) (*repository.Book, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookService ¶
type BookService interface {
FindOne(context.Context, string) (*repository.Book, error)
Find(context.Context, ...dbkit.FindOption) ([]*repository.Book, error)
Create(context.Context, *repository.Book) (*repository.Book, error)
Delete(context.Context, string) error
Update(context.Context, string, *repository.Book) (*repository.Book, error)
}
BookService contain logic for Book Controller @mock
func NewBookService ¶
func NewBookService(impl BookServiceImpl) BookService
NewBookService return new instance of BookService @constructor
type BookServiceImpl ¶
BookServiceImpl is implementation of BookService
func (*BookServiceImpl) Create ¶ added in v0.8.28
func (b *BookServiceImpl) Create(ctx context.Context, form *repository.Book) (*repository.Book, error)
Create Book
func (*BookServiceImpl) Delete ¶ added in v0.8.28
func (b *BookServiceImpl) Delete(ctx context.Context, paramID string) error
Delete book
func (*BookServiceImpl) FindOne ¶
func (b *BookServiceImpl) FindOne(ctx context.Context, paramID string) (*repository.Book, error)
FindOne book
func (*BookServiceImpl) Update ¶ added in v0.8.28
func (b *BookServiceImpl) Update(ctx context.Context, paramID string, book *repository.Book) (*repository.Book, error)
Update book
Click to show internal directories.
Click to hide internal directories.