cedar

package
v0.7.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapCedarPolicyBytes

func MapCedarPolicyBytes(location string, cedarBytes []byte) (*hexapolicy.Policies, error)

Types

type Attribute

type Attribute struct {
	Name         string
	StringValue  *string
	LongValue    *int64
	BooleanValue *bool
	RecordValue  *map[string]interface{}
	SetValue     *[]interface{}
}

type Entity

type Entity struct {
	Identifier string
	Parents    []string
	Attributes []Attribute
}

type EntityStore

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

EntityStore represents the complete set of known entities within the system.

func NewEntityStore

func NewEntityStore(r io.Reader) *EntityStore

NewEntityStore returns a new instance of EntityStore.

func (*EntityStore) GetEntities

func (e *EntityStore) GetEntities() ([]Entity, error)

GetEntities retrieves all entities.

func (*EntityStore) GetEntityDescendents

func (e *EntityStore) GetEntityDescendents(parents []string) ([]Entity, error)

GetEntityDescendents retrieves all entities that match or are descendents of those passed in.

func (*EntityStore) SetEntities

func (e *EntityStore) SetEntities(r io.Reader)

SetEntities overrides all entities.

type ParseSet

type ParseSet struct {
	IdqlPolicies []hexapolicy.PolicyInfo
	Pairs        []PolicyPair
	Tokens       []cedarParser.Token
	Pos          int
	// contains filtered or unexported fields
}

func (*ParseSet) MapCedarPolicy

func (t *ParseSet) MapCedarPolicy(policy cedarParser.Policy) error

func (*ParseSet) MapHexaPolicy

func (t *ParseSet) MapHexaPolicy(policy hexapolicy.PolicyInfo) (string, error)

type PolicyPair

type PolicyPair struct {
	HexaPolicy  *hexapolicy.PolicyInfo
	CedarPolicy *cedarParser.Policy
	// contains filtered or unexported fields
}

func (*PolicyPair) HasMultiSubjects

func (pp *PolicyPair) HasMultiSubjects() bool

Jump to

Keyboard shortcuts

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