service

package
v0.9.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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

type FindSongResp struct {
	Songs      []*mysqldb.Song
	TotalCount string
}

FindSongResp find song response

type SongSvc

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) Create

func (b *SongSvcImpl) Create(ctx context.Context, book *mysqldb.Song) (*mysqldb.Song, error)

Create Song

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

func (*SongSvcImpl) FindOne

func (b *SongSvcImpl) FindOne(ctx context.Context, paramID string) (*mysqldb.Song, error)

FindOne book

func (*SongSvcImpl) Patch

func (b *SongSvcImpl) Patch(ctx context.Context, paramID string, song *mysqldb.Song) (*mysqldb.Song, error)

Patch book

func (*SongSvcImpl) Update

func (b *SongSvcImpl) Update(ctx context.Context, paramID string, book *mysqldb.Song) (*mysqldb.Song, error)

Update book

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL