users

package
v0.0.0-...-a619a86 Latest Latest
Warning

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

Go to latest
Published: May 25, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ctx = &UserCtx{}
View Source
var PtrAuthUser = &AuthUser{}

Functions

This section is empty.

Types

type AuthUser

type AuthUser struct {
	Id      GUID
	Name    string
	Nick    string
	Pwd     string
	Status  UserStatus
	Img     string
	Created time.Time
	Updated time.Time
	Auth    []UserAuth
	Groups  []GUID
}

func NewUser

func NewUser() *AuthUser

func (*AuthUser) AddAuth

func (p *AuthUser) AddAuth(name, _type string)

func (*AuthUser) AddGroup

func (p *AuthUser) AddGroup(gid GUID)

func (*AuthUser) DelGroup

func (p *AuthUser) DelGroup(id GUID)

func (AuthUser) IsLock

func (au AuthUser) IsLock() bool

IsLock 是否锁定

type UserAuth

type UserAuth struct {
	Name string
	Type string
}

type UserCtx

type UserCtx struct {
}

func (*UserCtx) AddUserGroup

func (p *UserCtx) AddUserGroup(uid, gid gobreak.GUID) error

func (*UserCtx) All

func (p *UserCtx) All() (lst []AuthUser, err error)

func (*UserCtx) Del

func (p *UserCtx) Del(id gobreak.GUID) gobreak.IStatus

func (*UserCtx) Get

func (p *UserCtx) Get(id gobreak.GUID) (m AuthUser, ok bool)

func (*UserCtx) GetByMcPwd

func (p *UserCtx) GetByMcPwd(mc, pwd string) (m AuthUser, ok bool)

func (*UserCtx) PageGroupUser

func (p *UserCtx) PageGroupUser(gid gobreak.GUID, page *filter.PageFilter) (m *db.Paging, err error)

func (*UserCtx) PageGroupUserSelect

func (p *UserCtx) PageGroupUserSelect(gid gobreak.GUID, page *filter.PageFilter) (m *db.Paging, err error)

func (*UserCtx) PageUser

func (p *UserCtx) PageUser(page *filter.PageFilter) (m *db.Paging, err error)

func (*UserCtx) Save

func (p *UserCtx) Save(m *AuthUser) gobreak.IStatus

func (*UserCtx) UserCountByGroup

func (p *UserCtx) UserCountByGroup(gid gobreak.GUID) (n int)

type UserItem

type UserItem struct {
	Id gobreak.GUID
	//	Mc string
	Nc string
}

type UserLine

type UserLine struct {
	Id   GUID
	Name string
	Nick string
}

type UserStatus

type UserStatus int

UserZt 状态:0正常,1锁定

const (
	UserStatusDefault UserStatus = 0
	UserStatusLock    UserStatus = 1
)

Jump to

Keyboard shortcuts

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