judge

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 6 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Judge

type Judge interface {
	Eval([]map[string]interface{}) ([]Result, error)
}

type RegoJudge

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

func NewRegoJudge

func NewRegoJudge(opts *RegoOpts, rules []rules.Rule) (*RegoJudge, error)

func (*RegoJudge) Eval

func (j *RegoJudge) Eval(input []map[string]interface{}) ([]Result, error)

type RegoOpts

type RegoOpts struct {
}

type Result

type Result struct {
	Name        string
	Namespace   string
	Kind        string
	ApiVersion  string
	RuleSet     string
	ReplaceWith string
	Since       *Version
}

type Version

type Version struct {
	*goversion.Version
}

func NewFromGoVersion

func NewFromGoVersion(source *goversion.Version) (*Version, error)

func NewVersion

func NewVersion(s string) (*Version, error)

func (*Version) MarshalText

func (v *Version) MarshalText() ([]byte, error)

func (*Version) Set

func (v *Version) Set(s string) error

func (*Version) String

func (v *Version) String() string

func (*Version) Type

func (v *Version) Type() string

func (*Version) UnmarshalText

func (v *Version) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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