policy

package
v0.1.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestOrResponseToInput

func RequestOrResponseToInput(req any) (map[string]any, error)

Types

type Policy added in v0.1.1

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

func NewPolicy added in v0.1.1

func NewPolicy(name, policy string) (*Policy, error)

NewPolicy creates a new Policy with the given policy.

func (*Policy) Eval added in v0.1.1

func (p *Policy) Eval(ctx context.Context, input map[string]any) (bool, bool, error)

Eval evaluates the policy with the given input and returns the result.

Jump to

Keyboard shortcuts

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