compile

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchCompile

func BatchCompile(queue <-chan *policy.CompilationUnit, schemaMgr schema.Manager) error

func Compile

func Compile(unit *policy.CompilationUnit, schemaMgr schema.Manager) (rps *runtimev1.RunnablePolicySet, err error)

func Condition added in v0.9.0

func Condition(cond *policyv1.Condition) (*runtimev1.Condition, error)

Types

type CELCompileError added in v0.9.0

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

CELCompileError holds CEL compilation errors.

func (*CELCompileError) Error added in v0.9.0

func (cce *CELCompileError) Error() string

func (*CELCompileError) Unwrap added in v0.9.0

func (cce *CELCompileError) Unwrap() error

type Error

type Error struct {
	File        string
	Err         error
	Description string
}

Error describes an error encountered during compilation.

func (*Error) Display

func (e *Error) Display() string

func (*Error) Error

func (e *Error) Error() string

func (*Error) MarshalJSON

func (e *Error) MarshalJSON() ([]byte, error)

func (*Error) Unwrap

func (e *Error) Unwrap() error

type ErrorList

type ErrorList []*Error

func (*ErrorList) Add added in v0.9.0

func (e *ErrorList) Add(err error)

func (ErrorList) Display

func (e ErrorList) Display() string

func (ErrorList) ErrOrNil

func (e ErrorList) ErrOrNil() error

func (ErrorList) Error

func (e ErrorList) Error() string

type Manager

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

func NewManager

func NewManager(ctx context.Context, store storage.Store, schemaMgr schema.Manager) *Manager

func (*Manager) Get added in v0.9.0

func (*Manager) OnStorageEvent

func (c *Manager) OnStorageEvent(events ...storage.Event)

func (*Manager) SubscriberID

func (c *Manager) SubscriberID() string

type PolicyCompilationErr added in v0.9.0

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

func (PolicyCompilationErr) Error added in v0.9.0

func (pce PolicyCompilationErr) Error() string

func (PolicyCompilationErr) Unwrap added in v0.9.0

func (pce PolicyCompilationErr) Unwrap() error

Jump to

Keyboard shortcuts

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