compiler_rego

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CompiledRegoHelpers = `` /* 270-byte string literal not displayed */

)
View Source
const (
	Language = "rego"
)

const...

View Source
const (
	SOME_I = "some.i"
)

Variables

This section is empty.

Functions

func New

func New() (compiler.Compiler, error)

New creates a new compiler

Types

type CompilerRego

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

CompilerRego defines the compiler rego backend

func (*CompilerRego) Compile

func (c *CompilerRego) Compile(pkgname string, pols *ast.Policies, swaggerTypes []types.Type) (string, error)

Compile converts the AST policies to a string

func (*CompilerRego) String

func (c *CompilerRego) String() string

String satifies stringer interface

func (*CompilerRego) WithInputName added in v0.2.4

func (c *CompilerRego) WithInputName(name string) *CompilerRego

WithInputName sets the name of the generated OPA input document, default is "input"

type CompilerRegoOption

type CompilerRegoOption func(c *CompilerRego)

CompilerRegoOption defines options

Jump to

Keyboard shortcuts

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