Documentation ¶
Index ¶
- type FindSongReq
- type FindSongResp
- type SongSvc
- type SongSvcImpl
- func (b *SongSvcImpl) Create(ctx context.Context, book *mysqldb.Song) (*mysqldb.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) (*mysqldb.Song, error)
- func (b *SongSvcImpl) Patch(ctx context.Context, paramID string, song *mysqldb.Song) (*mysqldb.Song, error)
- func (b *SongSvcImpl) Update(ctx context.Context, paramID string, book *mysqldb.Song) (*mysqldb.Song, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FindSongReq ¶ added in v0.9.9
type FindSongReq struct { Limit uint64 `query:"limit"` Offset uint64 `query:"offset"` Sort string `query:"sort"` }
FindSongReq find request
type FindSongResp ¶ added in v0.9.9
FindSongResp find song response
type SongSvc ¶
type SongSvc interface { FindOne(context.Context, string) (*mysqldb.Song, error) Find(context.Context, *FindSongReq) (*FindSongResp, error) Create(context.Context, *mysqldb.Song) (*mysqldb.Song, error) Delete(context.Context, string) error Update(context.Context, string, *mysqldb.Song) (*mysqldb.Song, error) Patch(context.Context, string, *mysqldb.Song) (*mysqldb.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 ¶
type SongSvcImpl struct { dig.In Repo mysqldb_repo.SongRepo }
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.