user

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FetchMaxLimit        = 100
	MinDisplayNameLength = 2
	MaxDisplayNameLength = 32
	MinPasswordLength    = 6
	MaxPasswordLength    = 64
	MaxOrders            = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FetchConfig

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

type Repository

type Repository interface {
	Store(ctx context.Context, input *models.UserInput) (*models.User, error)
	UpdateMany(ctx context.Context, f *models.UserFilter, input *models.UserInput) ([]*models.User, error)
	Delete(ctx context.Context, f *models.UserFilter) ([]*models.User, error)
	Fetch(ctx context.Context, cfg *FetchConfig) ([]*models.User, int, error)
}

type Usecase

type Usecase interface {
	Store(ctx context.Context, input *models.UserInput) (*models.User, error)
	UpdateOneByID(ctx context.Context, id int, input *models.UserInput) (*models.User, error)
	UpdateMany(ctx context.Context, f *models.UserFilter, input *models.UserInput) ([]*models.User, error)
	Delete(ctx context.Context, f *models.UserFilter) ([]*models.User, error)
	Fetch(ctx context.Context, cfg *FetchConfig) ([]*models.User, int, error)
	GetByID(ctx context.Context, id int) (*models.User, error)
	GetByCredentials(ctx context.Context, email, password string) (*models.User, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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