Documentation ¶
Index ¶
- type BookSvc
- type BookSvcImpl
- func (b *BookSvcImpl) Create(ctx context.Context, book *entity.Book) (*entity.Book, error)
- func (b *BookSvcImpl) Delete(ctx context.Context, paramID string) error
- func (b *BookSvcImpl) Find(ctx context.Context, req *FindBookReq) (*FindBookResp, error)
- func (b *BookSvcImpl) FindOne(ctx context.Context, paramID string) (*entity.Book, error)
- func (b *BookSvcImpl) Patch(ctx context.Context, paramID string, book *entity.Book) (*entity.Book, error)
- func (b *BookSvcImpl) Update(ctx context.Context, paramID string, book *entity.Book) (*entity.Book, error)
- type FindBookReq
- type FindBookResp
- type FindSongReq
- type FindSongResp
- type SongSvc
- type SongSvcImpl
- func (b *SongSvcImpl) Create(ctx context.Context, book *entity.Song) (*entity.Song, error)
- func (b *SongSvcImpl) Delete(ctx context.Context, paramID string) error
- func (b *SongSvcImpl) Find(ctx context.Context, req *FindSongReq) (*FindSongResp, error)
- func (b *SongSvcImpl) FindOne(ctx context.Context, paramID string) (*entity.Song, error)
- func (b *SongSvcImpl) Patch(ctx context.Context, paramID string, song *entity.Song) (*entity.Song, error)
- func (b *SongSvcImpl) Update(ctx context.Context, paramID string, book *entity.Song) (*entity.Song, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookSvc ¶
type BookSvc interface { FindOne(context.Context, string) (*entity.Book, error) Find(context.Context, *FindBookReq) (*FindBookResp, error) Create(context.Context, *entity.Book) (*entity.Book, error) Delete(context.Context, string) error Update(context.Context, string, *entity.Book) (*entity.Book, error) Patch(context.Context, string, *entity.Book) (*entity.Book, error) }
BookSvc contain logic for Book Controller @mock
func NewBookSvc ¶
func NewBookSvc(impl BookSvcImpl) BookSvc
NewBookSvc return new instance of BookSvc @ctor
type BookSvcImpl ¶
BookSvcImpl is implementation of BookSvc
func (*BookSvcImpl) Delete ¶
func (b *BookSvcImpl) Delete(ctx context.Context, paramID string) error
Delete book
func (*BookSvcImpl) Find ¶
func (b *BookSvcImpl) Find(ctx context.Context, req *FindBookReq) (*FindBookResp, error)
Find books
type FindBookReq ¶
type FindBookReq struct { Limit uint64 `query:"limit"` Offset uint64 `query:"offset"` Sort string `query:"sort"` }
FindBookReq find request
type FindBookResp ¶
FindBookResp find book resp
type FindSongReq ¶
type FindSongReq struct { Limit uint64 `query:"limit"` Offset uint64 `query:"offset"` Sort string `query:"sort"` }
FindSongReq find request
type FindSongResp ¶
FindSongResp find song response
type SongSvc ¶
type SongSvc interface { FindOne(context.Context, string) (*entity.Song, error) Find(context.Context, *FindSongReq) (*FindSongResp, error) Create(context.Context, *entity.Song) (*entity.Song, error) Delete(context.Context, string) error Update(context.Context, string, *entity.Song) (*entity.Song, error) Patch(context.Context, string, *entity.Song) (*entity.Song, error) }
SongSvc contain logic for Song Controller @mock
func NewSongSvc ¶
func NewSongSvc(impl SongSvcImpl) SongSvc
NewSongSvc return new instance of SongSvc @ctor
type SongSvcImpl ¶
SongSvcImpl is implementation of SongSvc
func (*SongSvcImpl) Delete ¶
func (b *SongSvcImpl) Delete(ctx context.Context, paramID string) error
Delete book
func (*SongSvcImpl) Find ¶
func (b *SongSvcImpl) Find(ctx context.Context, req *FindSongReq) (*FindSongResp, error)
Find books
Click to show internal directories.
Click to hide internal directories.