Documentation
¶
Index ¶
Constants ¶
View Source
const AnonymousRole = "anonymous"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OpAction ¶
type OpAction string
var ActionDelete OpAction = "delete"
var ActionDestroy OpAction = "destroy"
var ActionRead OpAction = "read"
var ActionSign OpAction = "sign"
var ActionWrite OpAction = "write"
type Operation ¶
type Operation struct { Action OpAction Resource OpResource }
type Permission ¶
type Permission string
const DeleteWallet Permission = "delete:wallets"
const DestroyWallet Permission = "destroy:wallets"
const ReadWallet Permission = "read:wallets"
const SignWallet Permission = "sign:wallets"
const WriteWallet Permission = "write:wallets"
func ListPermissions ¶
func ListPermissions() []Permission
func ListWildcardPermission ¶
func ListWildcardPermission(p string) []Permission
type Role ¶
type Role struct { Name string Permissions []Permission }
type RoleSpecs ¶
type RoleSpecs struct {
Permissions []Permission `json:"permission"`
}
type UserClaims ¶
UserClaims represent raw claims extracted from an authentication method
type UserInfo ¶
type UserInfo struct { // AuthMode records the mode that succeeded to Authenticate the request ('tls', 'api-key', 'oidc' or ”) AuthMode string // Tenant belonged by the user Tenant string // Tenant identifies the user Username string // Roles indicates the user's membership Roles []string // Permissions specify Permissions []Permission }
func NewAnonymousUser ¶
func NewAnonymousUser() *UserInfo
func NewWildcardUser ¶
func NewWildcardUser() *UserInfo
Click to show internal directories.
Click to hide internal directories.