permission

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitlabLevelNoAuth     = 0
	GitlabLevelGuest      = 10
	GitlabLevelReporter   = 20
	GitlabLevelDeveloper  = 30
	GitlabLevelMaintainer = 40
	GitlabLevelOwner      = 50
)

Variables

View Source
var (
	// AppGroup ..
	AppGroup           *appGroup
	ErrAppEnvNotExists = fmt.Errorf("应用环境不存在")
)
View Source
var (
	UserGroup *userGroup

	DefaultUserGroup = "default"

	ErrUserGroupNotFund = fmt.Errorf("用户组不存在")
	ErrInvalidAppPerm   = fmt.Errorf("无效的应用权限Key")
	ErrInvalidAPIPerm   = fmt.Errorf("无效的接口权限")
)
View Source
var (
	Permission *permission
)
View Source
var (
	User *user
)

Functions

func Init

func Init(o Option)

Types

type Option added in v0.3.0

type Option struct {
	DB                 *gorm.DB
	GitlabOAuthApiUrl  string
	GitlabOAuthEnabled bool
	ProductionEnvs     []string
}

Jump to

Keyboard shortcuts

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