user

package
v0.0.0-...-0eed87a Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATUS_OK       = "ok"
	STATUS_DISABLEd = "disabled"
	STATUS_DEL      = "del"
)
View Source
const (
	ROLE_ADMIN  = "admin"
	ROLE_NORMAL = "normal"
)

Variables

View Source
var SORT_MAP = map[string]string{
	"createTime": "create_time",
}

Functions

This section is empty.

Types

type UserService

type UserService interface {
	Add(ctx context.Context, user *model.User) error
	Update(ctx context.Context, user *model.User) error
	ResetPassword(ctx context.Context, id int64, password string) error

	Enable(ctx context.Context, id int64) error
	Disable(ctx context.Context, id int64) error
	Delete(ctx context.Context, id int64) error

	GetById(ctx context.Context, id int64) (*model.User, error)
	Login(ctx context.Context, username string, password string) (*model.User, error)
	List(ctx context.Context, opt *types.UserOption) ([]*model.User, error)

	Count(ctx context.Context) (int64, error)
}

func NewService

func NewService() UserService

Jump to

Keyboard shortcuts

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