policy

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Policies

type Policies struct {
	*iradix.Tree
}

func LoadPoliciesFromJson

func LoadPoliciesFromJson(data []byte) (*Policies, error)

func (*Policies) Get

func (p *Policies) Get(path string) (*Policy, bool)

func (*Policies) Size

func (p *Policies) Size() int

type Policy

type Policy struct {
	Roles   []string `json:"roles"`
	Regexp  string   `json:"regexp,omitempty"`
	NumUses int      `json:"num_uses"`
	// contains filtered or unexported fields
}

func (*Policy) Has

func (p *Policy) Has(role string) bool

Jump to

Keyboard shortcuts

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