cedarpolicy

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation struct {
	Name  types.String `tfsdk:"name"`
	Value types.String `tfsdk:"value"`
}

type Condition

type Condition struct {
	Text types.String `tfsdk:"text"`
}

type Policy

type Policy struct {
	Effect      types.String `tfsdk:"effect"`
	Annotations []Annotation `tfsdk:"annotation"`

	AnyPrincipal types.Bool   `tfsdk:"any_principal"`
	Principal    *eid.EID     `tfsdk:"principal"`
	PrincipalIn  *eid.EID     `tfsdk:"principal_in"`
	PrincipalIs  types.String `tfsdk:"principal_is"`

	AnyAction types.Bool `tfsdk:"any_action"`
	Action    *eid.EID   `tfsdk:"action"`
	ActionIn  *[]eid.EID `tfsdk:"action_in"`

	AnyResource types.Bool   `tfsdk:"any_resource"`
	Resource    *eid.EID     `tfsdk:"resource"`
	ResourceIn  *eid.EID     `tfsdk:"resource_in"`
	ResourceIs  types.String `tfsdk:"resource_is"`

	When   []Condition `tfsdk:"when"`
	Unless []Condition `tfsdk:"unless"`
}

func (Policy) RenderString

func (p Policy) RenderString() (string, error)

RenderString renders a text-based representation of the policy.

Jump to

Keyboard shortcuts

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