server

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

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

Go to latest
Published: May 10, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPermission

func AddPermission(c *gin.Context)

func Bond

func Bond(c *gin.Context)

将用户绑定到组

func CreateAdmin

func CreateAdmin(adminuser, admingroup string)

func DelPermission

func DelPermission(c *gin.Context)

删除用户或组的某个权限

func DoPermissible

func DoPermissible(username, object, action string) bool

func GetPermission

func GetPermission(c *gin.Context)

得到用户的所有权限(包括组)

func GetPermissionApp

func GetPermissionApp(username string) map[string][]string

此时已确认user有合法的token

func GetVersion

func GetVersion(c *gin.Context)

func IsAdmin

func IsAdmin(c *gin.Context) bool

检测

func IsTokenOk

func IsTokenOk(username, token string) bool

func NewGroup

func NewGroup(c *gin.Context)

func NewToken

func NewToken(c *gin.Context)

func NewUser

func NewUser(c *gin.Context)

func Permissible

func Permissible(c *gin.Context)

查询用户是否具有某个权限(会历遍组)

func Serve

func Serve(domainAndPort string)

func TokenOk

func TokenOk(c *gin.Context) bool

每条api中的user和token是对应的 但user可能是admin也可能不是admin

func UnBond

func UnBond(c *gin.Context)

Types

This section is empty.

Jump to

Keyboard shortcuts

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