transform

package
v1.46.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(r string) error

Types

type Rego

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

func New

func New(m *plugins.Manager, path, name, r0 string) *Rego

New instantiates the Rego transform. It'll be a no-op unless a reference to some Rego rule is provided (r0). The caller needs to assure that the ref string is a valid ast.Ref, otherwise this will panic.

func (*Rego) Ingest

func (s *Rego) Ingest(ctx context.Context, path storage.Path, incoming any) error

Ingest applies the transform rule(s) for this Rego object to incoming, and then commits the result to the store.

func (*Rego) Prepare

func (s *Rego) Prepare(ctx context.Context) error

func (*Rego) Ready

func (s *Rego) Ready() bool

func (*Rego) Trigger

func (s *Rego) Trigger(ctx context.Context, txn storage.Transaction) error

Jump to

Keyboard shortcuts

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