usecase

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	UserRepository user.Repository
}

type Usecase added in v1.0.2

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

func New

func New(cfg *Config) (*Usecase, error)

func (*Usecase) Delete added in v1.0.2

func (ucase *Usecase) Delete(ctx context.Context, f *model.UserFilter) ([]*model.User, error)

func (*Usecase) Fetch added in v1.0.2

func (ucase *Usecase) Fetch(ctx context.Context, cfg *user.FetchConfig) ([]*model.User, int, error)

func (*Usecase) GetByCredentials added in v1.0.2

func (ucase *Usecase) GetByCredentials(ctx context.Context, email, password string) (*model.User, error)

func (*Usecase) GetByID added in v1.0.2

func (ucase *Usecase) GetByID(ctx context.Context, id int) (*model.User, error)

func (*Usecase) Store added in v1.0.2

func (ucase *Usecase) Store(ctx context.Context, input *model.UserInput) (*model.User, error)

func (*Usecase) UpdateMany added in v1.0.2

func (ucase *Usecase) UpdateMany(ctx context.Context, f *model.UserFilter, input *model.UserInput) ([]*model.User, error)

func (*Usecase) UpdateOneByID added in v1.0.2

func (ucase *Usecase) UpdateOneByID(ctx context.Context, id int, input *model.UserInput) (*model.User, error)

Jump to

Keyboard shortcuts

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