usecase

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: MIT Imports: 4 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 {
	ProfessionRepository profession.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.ProfessionFilter) ([]*model.Profession, error)

func (*Usecase) Fetch added in v1.0.2

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

func (*Usecase) GetByID added in v1.0.2

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

func (*Usecase) GetBySlug added in v1.0.2

func (ucase *Usecase) GetBySlug(ctx context.Context, slug string) (*model.Profession, error)

func (*Usecase) Store added in v1.0.2

func (ucase *Usecase) Store(ctx context.Context, input *model.ProfessionInput) (*model.Profession, error)

func (*Usecase) UpdateOneByID added in v1.0.2

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

Jump to

Keyboard shortcuts

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