acl

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enforcer

type Enforcer struct {
	// contains filtered or unexported fields
}

func NewEnforcer

func NewEnforcer(adapter IAdapter) *Enforcer

func (*Enforcer) Enforce

func (e *Enforcer) Enforce(request *Request) error

func (*Enforcer) LoadPolicy

func (e *Enforcer) LoadPolicy(a ...interface{}) error

type IAdapter

type IAdapter interface {
	LoadPolicy(a ...interface{}) (*PolicyKeyValuePair, error)
}

type Policy

type Policy struct {
	Subject string
	Domain  string
	Object  string
	Action  string
}

type PolicyKeyValuePair

type PolicyKeyValuePair struct {
	Subject string
	Polices []Policy
}

type Request

type Request struct {
	Subject string
	Domain  string
	Object  string
	Action  string
}

Jump to

Keyboard shortcuts

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