rego

package
v0.0.0-...-40eda91 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRegoQuery

func GetRegoQuery(body string, dataFn KubeDataFunction) *rego.Rego

func RunRegoForItem

func RunRegoForItem(ctx context.Context, regoStr string, params map[string]interface{}, obj map[string]interface{}, dataFn KubeDataFunction) ([]interface{}, error)

Types

type KubeDataFunction

type KubeDataFunction interface {
	GetData(context.Context, string, string) ([]interface{}, error)
}

type NilDataFunction

type NilDataFunction struct{}

func (NilDataFunction) GetData

func (n NilDataFunction) GetData(ctx context.Context, group, kind string) ([]interface{}, error)

Jump to

Keyboard shortcuts

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