service

package
v0.8.30 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BookService

BookService contain logic for Book Controller @mock

func NewBookService

func NewBookService(impl BookServiceImpl) BookService

NewBookService return new instance of BookService @constructor

type BookServiceImpl

type BookServiceImpl struct {
	dig.In
	repository.BookRepo
}

BookServiceImpl is implementation of BookService

func (*BookServiceImpl) Create added in v0.8.28

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

Create Book

func (*BookServiceImpl) Delete added in v0.8.28

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

Delete book

func (*BookServiceImpl) Find

func (b *BookServiceImpl) Find(ctx context.Context) ([]*repository.Book, error)

Find books

func (*BookServiceImpl) FindOne

func (b *BookServiceImpl) FindOne(ctx context.Context, paramID string) (*repository.Book, error)

FindOne book

func (*BookServiceImpl) Update added in v0.8.28

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

Update book

Jump to

Keyboard shortcuts

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