verify

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Verify

func Verify(ctx context.Context, fsys fs.FS, eng Checker, conf Config) (*policyv1.TestResults, error)

Verify runs the test suites from the provided directory.

Types

type AuxData added in v0.31.0

type AuxData struct {
	LoadError error
	Fixtures  map[string]*enginev1.AuxData
	FilePath  string
}

type Checker added in v0.21.0

type Checker interface {
	Check(ctx context.Context, inputs []*enginev1.CheckInput, opts ...engine.CheckOpt) ([]*enginev1.CheckOutput, error)
}

type Config

type Config struct {
	RunResources  map[string]struct{}
	RunPrincipals map[string]struct{}
	Run           string
	Trace         bool
}

type Principals added in v0.31.0

type Principals struct {
	LoadError error
	Fixtures  map[string]*enginev1.Principal
	FilePath  string
}

type Resources added in v0.31.0

type Resources struct {
	LoadError error
	Fixtures  map[string]*enginev1.Resource
	FilePath  string
}

type TestFixture added in v0.31.0

type TestFixture struct {
	Principals *Principals
	Resources  *Resources
	AuxData    *AuxData
}

func LoadTestFixture added in v0.31.0

func LoadTestFixture(fsys fs.FS, path string, continueOnError bool) (tf *TestFixture, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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