usecase

package
v0.0.0-...-de92fe2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PhoneBook

type PhoneBook struct {
	// contains filtered or unexported fields
}

PhoneBook ...

func NewPhoneBook

func NewPhoneBook(repo repository.PhoneBookI, logger kitlog.Logger) *PhoneBook

NewPhoneBook ...

func (*PhoneBook) CheckHealthReadiness

func (pb *PhoneBook) CheckHealthReadiness(ctx context.Context) error

CheckHealthReadiness ...

func (*PhoneBook) Delete

func (pb *PhoneBook) Delete(ctx context.Context, id int64) error

Delete ...

func (*PhoneBook) GetDetail

func (pb *PhoneBook) GetDetail(ctx context.Context, id int64) (*model.Phonebook, error)

GetDetail ...

func (*PhoneBook) GetList

func (pb *PhoneBook) GetList(ctx context.Context, params *model.GetListRequest) (*model.PhoneBookWithMeta, error)

GetList ...

func (*PhoneBook) Insert

func (pb *PhoneBook) Insert(ctx context.Context, params *model.AddPhonebook) error

Insert ...

func (*PhoneBook) IsExistPhoneNumber

func (pb *PhoneBook) IsExistPhoneNumber(ctx context.Context, phone string) (bool, error)

IsExistPhoneNumber ...

func (*PhoneBook) Update

func (pb *PhoneBook) Update(ctx context.Context, params *model.UpdatePhonebook) error

Update ...

type Provider

type Provider interface {
	GetList(ctx context.Context, params *model.GetListRequest) (*model.PhoneBookWithMeta, error)
	GetDetail(ctx context.Context, id int64) (*model.Phonebook, error)
	IsExistPhoneNumber(ctx context.Context, phone string) (bool, error)
	Insert(ctx context.Context, params *model.AddPhonebook) error
	Update(ctx context.Context, params *model.UpdatePhonebook) error
	Delete(ctx context.Context, id int64) error
	CheckHealthReadiness(ctx context.Context) error
}

Provider interface for PhoneBook

Jump to

Keyboard shortcuts

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