cedar

package
v0.8.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

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

type CedarMapper added in v0.7.2

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

func NewCedarMapper added in v0.7.2

func NewCedarMapper(attrNameMap map[string]string) *CedarMapper

func (*CedarMapper) MapCedarPolicyBytes added in v0.7.2

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

func (*CedarMapper) MapHexaPolicies added in v0.7.2

func (c *CedarMapper) MapHexaPolicies(location string, policies []hexapolicy.PolicyInfo) (string, error)

func (*CedarMapper) MapHexaPolicyBytes added in v0.7.2

func (c *CedarMapper) MapHexaPolicyBytes(location string, idqlBytes []byte) (string, error)

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

	Pos int
	// contains filtered or unexported fields
}

func (*ParseSet) MapCedarPolicy

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

func (*ParseSet) MapHexaPolicy

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

type PolicyPair

type PolicyPair struct {
	HexaPolicy  *hexapolicy.PolicyInfo
	CedarPolicy *cedar.Policy
	Ast         policyjson.PolicyJSON
	// contains filtered or unexported fields
}

Directories

Path Synopsis
Package json Note: This code is from github.com/cedar-policy/cedar-go and is used under the APL 2.0 license terms.
Package json Note: This code is from github.com/cedar-policy/cedar-go and is used under the APL 2.0 license terms.

Jump to

Keyboard shortcuts

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