profession

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: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FetchDefaultLimit = 100
	MaxNameLength     = 100
	MaxOrders         = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FetchConfig

type FetchConfig struct {
	Filter *model.ProfessionFilter
	Offset int
	Limit  int
	Sort   []string
	Count  bool
}

type Repository

type Repository interface {
	Store(ctx context.Context, input *model.ProfessionInput) (*model.Profession, error)
	UpdateMany(ctx context.Context, f *model.ProfessionFilter, input *model.ProfessionInput) ([]*model.Profession, error)
	Delete(ctx context.Context, f *model.ProfessionFilter) ([]*model.Profession, error)
	Fetch(ctx context.Context, cfg *FetchConfig) ([]*model.Profession, int, error)
	GetAssociatedQualifications(ctx context.Context, ids ...int) (map[int][]*model.Qualification, error)
}

type Usecase

type Usecase interface {
	Store(ctx context.Context, input *model.ProfessionInput) (*model.Profession, error)
	UpdateOneByID(ctx context.Context, id int, input *model.ProfessionInput) (*model.Profession, error)
	Delete(ctx context.Context, f *model.ProfessionFilter) ([]*model.Profession, error)
	Fetch(ctx context.Context, cfg *FetchConfig) ([]*model.Profession, int, error)
	GetByID(ctx context.Context, id int) (*model.Profession, error)
	GetBySlug(ctx context.Context, slug string) (*model.Profession, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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