policy

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDynamodbPolicy

func RegisterDynamodbPolicy(dynamoConfig *DynamoConfig)

RegisterDynamodbPolicy registers a new function dynamodb.policy with Rego

Types

type DynamoConfig

type DynamoConfig struct {
	Endpoint     string
	TableName    string
	PartitionKey string
	SortKey      string
}

DynamoConfig holds information about the dynamo table

func NewDynamoConfigFromEnv

func NewDynamoConfigFromEnv() *DynamoConfig

NewDynamoConfigFromEnv creates a new dynamo config from environment variables with defaults

type Policy

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

Policy is a type that contains a store for policy data

func NewPolicy

func NewPolicy(name string, store store.PolicyStore) *Policy

NewPolicy creates a new named policy

func (*Policy) Get

func (p *Policy) Get(bctx rego.BuiltinContext, a, b *ast.Term) (*ast.Term, error)

Get returns a policy given 2 terms. A namespace and a principal

Jump to

Keyboard shortcuts

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