auth

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ctx = &AuthCtx{}

Functions

func SaltPwd

func SaltPwd(pwd string) string

func SetSalt

func SetSalt(s string)

Types

type AuthCtx

type AuthCtx struct {
}

func (AuthCtx) GetGroupRoles

func (ac AuthCtx) GetGroupRoles(id GUID) (m GroupRoles)

func (AuthCtx) GetOrgGroup

func (ac AuthCtx) GetOrgGroup(oid GUID) (m []GroupItem)

func (AuthCtx) GetRoleRes

func (ac AuthCtx) GetRoleRes(id GUID) (m RoleRes)

func (AuthCtx) GetUserNavs

func (ac AuthCtx) GetUserNavs(uid GUID) Navs

func (AuthCtx) GetUserRes

func (ac AuthCtx) GetUserRes(uid GUID) (lst []res.AuthRes)

func (AuthCtx) Login

func (ac AuthCtx) Login(req LoginReq) (resp LoginResp)

type GroupItem

type GroupItem struct {
	group.AuthGroup
	Users int
}

type GroupRoles

type GroupRoles struct {
	Group group.AuthGroup
	Roles utils.TreeNodes
}

type LoginReq

type LoginReq struct {
	Name string
	Pwd  string
	Auth string
}

type LoginResp

type LoginResp struct {
	Token string
	gobreak.Status
}
type Nav struct {
	Name      string
	To        string
	Navs      `json:",omitempty"`
	SortOrder int
}
type Navs []*Nav

type RoleRes

type RoleRes struct {
	Role role.AuthRole
	Res  utils.TreeNodes
}

Directories

Path Synopsis
x

Jump to

Keyboard shortcuts

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