right

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLUSTER_USER  = 0x4
	CLUSTER_ADMIN = 0x2
	SYSTEM_ADMIN  = 0x1
)

Variables

View Source
var UserCache = cache2go.Cache("user_cache")

Functions

func AddCacheUser

func AddCacheUser(user *User)

func DelCacheUser

func DelCacheUser(userName string)

func GetPrivilege

func GetPrivilege(db *sql.DB) gin.HandlerFunc

Types

type Right int16

type User

type User struct {
	Name  string
	Right map[int64]Right // clusterid: right
}

func GetCacheUser

func GetCacheUser(userName string) *User

func GetUserCluster

func GetUserCluster(db *sql.DB, userName string) (*User, error)

func GetUserClusterFake

func GetUserClusterFake(db *sql.DB, userName string) (*User, error)

func NewUser

func NewUser(name string) *User

Jump to

Keyboard shortcuts

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