reader

package
v1.15.3 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const InvalidAnnotationValueErrorCode = "1054"

InvalidAnnotationValueErrorCode is the error code for when a value in metadata.annotations is not a string.

Variables

This section is empty.

Functions

func InvalidAnnotationValueError

func InvalidAnnotationValueError(resource client.Object, keys []string) status.ResourceError

InvalidAnnotationValueError reports that an annotation value is coerced to a non-string type.

Types

type File

type File struct{}

File reads FileObjects from a filesystem.

func (*File) Read

func (r *File) Read(filePaths FilePaths) ([]ast.FileObject, status.MultiError)

type FilePaths

type FilePaths struct {
	// RootDir is the absolute path to policyDir.
	RootDir cmpath.Absolute

	// PolicyDir is the relative path of the Nomos Root from the Repo Root.
	PolicyDir cmpath.Relative

	// Files is the list of absolute path to the files to read.
	Files []cmpath.Absolute
}

FilePaths encapsulates the list of absolute file paths to read and the absolute and relative path of the Nomos Root.

type Reader

type Reader interface {
	// Read returns the list of FileObjects in the passed file.
	Read(filePaths FilePaths) ([]ast.FileObject, status.MultiError)
}

Reader reads a list of FileObjects.

Jump to

Keyboard shortcuts

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