model

package
v0.0.0-...-3467a1f Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DBDefaultLimit uint64 = 500

Variables

View Source
var (
	ErrGeneral          = errors.New("general error")
	ErrBadRequestFormat = errors.New("request format not valid")
	ErrBadPermission    = errors.New("bad permission")
)
View Source
var WireSet = wire.NewSet()

Functions

This section is empty.

Types

type GetUserOption

type GetUserOption struct {
	Limit sql.NullInt64
}

type Repository

type Repository interface {
	WithTransaction(ctx context.Context, fn TxFunc) error
	UserRepo() UserRepo
}

type TxFunc

type TxFunc func(tx *sqlx.Tx) error

TxFunc is the func for WithTransaction call

type User

type User struct {
	ID   int64  `json:"id" db:"id"`
	Name string `json:"name" db:"name"`
}

type UserRepo

type UserRepo interface {
	GetList(ctx context.Context, option GetUserOption) ([]User, error)
}

type UserService

type UserService interface {
	GetList(ctx context.Context, option GetUserOption) ([]User, error)
}

Jump to

Keyboard shortcuts

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