service

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 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 BookSvc

BookSvc contain logic for Book Controller @mock

func NewBookSvc

func NewBookSvc(impl BookSvcImpl) BookSvc

NewBookSvc return new instance of BookSvc @ctor

type BookSvcImpl

type BookSvcImpl struct {
	dig.In
	Repo repo.BookRepo
}

BookSvcImpl is implementation of BookSvc

func (*BookSvcImpl) Create

func (b *BookSvcImpl) Create(ctx context.Context, book *entity.Book) (*entity.Book, error)

Create Book

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

func (*BookSvcImpl) FindOne

func (b *BookSvcImpl) FindOne(ctx context.Context, paramID string) (*entity.Book, error)

FindOne book

func (*BookSvcImpl) Patch

func (b *BookSvcImpl) Patch(ctx context.Context, paramID string, book *entity.Book) (*entity.Book, error)

Patch book

func (*BookSvcImpl) Update

func (b *BookSvcImpl) Update(ctx context.Context, paramID string, book *entity.Book) (*entity.Book, error)

Update book

type FindBookReq

type FindBookReq struct {
	Limit  uint64 `query:"limit"`
	Offset uint64 `query:"offset"`
	Sort   string `query:"sort"`
}

FindBookReq find request

type FindBookResp

type FindBookResp struct {
	Books      []*entity.Book
	TotalCount string
}

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

type FindSongResp struct {
	Songs      []*entity.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 repo.SongRepo
}

SongSvcImpl is implementation of SongSvc

func (*SongSvcImpl) Create

func (b *SongSvcImpl) Create(ctx context.Context, book *entity.Song) (*entity.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) (*entity.Song, error)

FindOne book

func (*SongSvcImpl) Patch

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

Patch book

func (*SongSvcImpl) Update

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

Update book

Jump to

Keyboard shortcuts

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