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
Click to show internal directories.
Click to hide internal directories.