rbacutils

package
v2.3.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WILD_MATCH = "*"
	Allow      = TRbacResult("allow")
	Deny       = TRbacResult("deny")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SRbacPolicy

type SRbacPolicy struct {
	Condition string
	IsAdmin   bool
	Rules     []SRbacRule
}

func (*SRbacPolicy) Allow

func (policy *SRbacPolicy) Allow(userCred jsonutils.JSONObject, service, resource, action string, extra ...string) bool

func (*SRbacPolicy) Decode

func (policy *SRbacPolicy) Decode(policyJson jsonutils.JSONObject) error

func (*SRbacPolicy) Encode

func (policy *SRbacPolicy) Encode() (jsonutils.JSONObject, error)

func (*SRbacPolicy) Explain

func (policy *SRbacPolicy) Explain(request [][]string) [][]string

func (*SRbacPolicy) GetMatchRule

func (policy *SRbacPolicy) GetMatchRule(service string, resource string, action string, extra ...string) *SRbacRule

type SRbacRule

type SRbacRule struct {
	Service  string
	Resource string
	Action   string
	Extra    []string
	Result   TRbacResult
}

type TRbacResult

type TRbacResult string

Jump to

Keyboard shortcuts

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