Documentation ¶
Index ¶
- Constants
- Variables
- func Cors() gin.HandlerFunc
- func ValidLogin(params ...string) gin.HandlerFunc
- func ValidPrivilege() gin.HandlerFunc
- func ValidResAccess(pathArr []string, c *gin.Context) bool
- type AppResult
- type LoginResult
- type Privilege
- type RoleAppResult
- type RolePriResult
- type SearchAppResult
Constants ¶
View Source
const ( BK_CC_EVENT string = "event" BK_CC_MODEL string = "model" BK_CC_AUDIT string = "audit" BK_CC_RESOURCE string = "resource" )
View Source
const ( BK_CC_UPDATE string = "update" BK_CC_DELETE string = "delete" BK_CC_CREATE string = "create" BK_CC_SEARCH string = "search" BK_CC_HOSTUPDATE string = "hostupdate" BK_CC_HOSTTRANS string = "hosttrans" BK_CC_TOPOUPDATE string = "topoupdate" BK_CC_CUSTOMAPI string = "customapi" BK_CC_PROCCONFIG string = "proconfig" )
View Source
const ( BK_APP_SEARCH = "biz/search" BK_SET_SEARCH = "set/search" BK_MODULE_SEARCH = "module/search" BK_INST_SEARCH = "inst/search" BK_HOSTS_SEARCH = "hosts/search" BK_HOSTS_SNAP = "hosts/snapshot" BK_HOSTS_HIS = "hosts/history" BK_TOPO_MODEL = "topo/model" )
bk search
View Source
const ( BK_INSTS string = "inst" BK_TOPO string = "topo" BK_SET string = "set" BK_MODULE string = "module" )
bk topo
View Source
const BK_CC_CLASSIFIC string = "object/classifications"
View Source
const BK_CC_HOST_FAVORITES string = "favorites"
View Source
const BK_CC_MAINTAINERS string = "bk_biz_maintainer"
View Source
const BK_CC_OBJECT_ATTR string = "object/attr/search"
View Source
const BK_CC_PRIVI_PATTERN string = "topo/privilege/user/detail"
View Source
const BK_CC_USER_CUSTOM string = "usercustom"
View Source
const BK_HOST_TRANS = "hosts/modules"
host trans pattern
View Source
const BK_HOST_UPDATE string = "hosts/batch"
host update string
View Source
const BK_OBJECT_ATT_GROUP = "objectatt/group/property/owner"
View Source
const BK_PROC_S string = "proc"
proc manage pattern
View Source
const BK_USER_API_S string = "userapi"
user api pattern
Variables ¶
View Source
var APIAddr func() string
View Source
var BK_CC_AUDIT_PRE = []string{"audit"}
View Source
var BK_CC_EVENT_PRE = []string{"event"}
View Source
var BK_CC_MODEL_PRE = []string{"object", "objects"}
View Source
var BK_CC_SYSCONFIG = []string{"event", "model", "audit"}
Functions ¶
func Cors ¶
func Cors() gin.HandlerFunc
func ValidLogin ¶
func ValidLogin(params ...string) gin.HandlerFunc
ValidLogin valid the user login status
func ValidPrivilege ¶
func ValidPrivilege() gin.HandlerFunc
Types ¶
type LoginResult ¶
type Privilege ¶
type Privilege struct { UserName string APIAddr string OwnerID string // contains filtered or unexported fields }
func NewPrivilege ¶
func (*Privilege) GetRolePrivilege ¶
GetRolePrivilege get role privilege
func (*Privilege) GetUserPrivilegeApp ¶
GetUserPrivilegeApp get user privilege app
type RoleAppResult ¶
type RolePriResult ¶
type SearchAppResult ¶
Click to show internal directories.
Click to hide internal directories.