service

package
v0.8.32 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: MIT Imports: 9 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
	repository.BookRepo
}

BookSvcImpl is implementation of BookSvc

func (*BookSvcImpl) Create

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

Create Book

func (*BookSvcImpl) Delete

func (b *BookSvcImpl) Delete(ctx context.Context, paramID string) error

Delete book

func (*BookSvcImpl) Patch

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

Patch book

func (*BookSvcImpl) Retrieve added in v0.8.32

func (b *BookSvcImpl) Retrieve(ctx context.Context) ([]*repository.Book, error)

Retrieve books

func (*BookSvcImpl) RetrieveOne added in v0.8.32

func (b *BookSvcImpl) RetrieveOne(ctx context.Context, paramID string) (*repository.Book, error)

RetrieveOne book

func (*BookSvcImpl) Update

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

Update book

Jump to

Keyboard shortcuts

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