generic

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ArgoTemplateKey represents the key used in the package's data field that
	// contains the template.
	ArgoTemplateKey = "template"

	// FalcoRulesKey represents the key used in the package's data field that
	// contains the raw rules.
	FalcoRulesKey = "rules"

	// GatekeeperExamplesKey represents the key used in the package's data
	// field that contains the examples.
	GatekeeperExamplesKey = "examples"

	// GatekeeperTemplateKey represents the key used in the package's data field
	// that contains the template.
	GatekeeperTemplateKey = "template"

	// KubeArmorPoliciesKey represents the key used in the package's data field
	// that contains the raw policies.
	KubeArmorPoliciesKey = "policies"

	// KyvernoPolicyKey represents the key used in the package's data field that
	// contains the raw policy.
	KyvernoPolicyKey = "policy"

	// OPAPoliciesKey represents the key used in the package's data field that
	// contains the raw policies.
	OPAPoliciesKey = "policies"
)

Variables

This section is empty.

Functions

func GetFilesWithSuffix added in v1.10.0

func GetFilesWithSuffix(suffix, rootPath string, ignorer ignore.IgnoreParser) (map[string]string, error)

GetFilesWithSuffix returns the files with a given suffix in the path provided, ignoring the ones the ignorer matches.

func PreparePackage added in v1.2.0

func PreparePackage(r *hub.Repository, md *hub.PackageMetadata, pkgPath string) (*hub.Package, error)

PreparePackage prepares a package version using the metadata and the files in the path provided.

Types

type GKCase added in v1.17.0

type GKCase struct {
	Name   string `yaml:"name"`
	Object string `yaml:"object"`
}

Based on: https://github.com/open-policy-agent/gatekeeper/blob/a1f01f40ed89db0ae0cb0b84dcc498b76c6fa448/pkg/gator/verify/suite.go#L53

type GKExample added in v1.10.0

type GKExample struct {
	Name  string           `json:"name"`
	Cases []*GKExampleCase `json:"cases"`
}

GKExample represents an example in a Gatekeeper policy.

type GKExampleCase added in v1.10.0

type GKExampleCase struct {
	Name    string `json:"name"`
	Path    string `json:"path"`
	Content string `json:"content"`
}

GKExampleCase represents an example's case in a Gatekeeper policy.

type GKTest added in v1.17.0

type GKTest struct {
	Name       string    `yaml:"name"`
	Constraint string    `yaml:"constraint"`
	Cases      []*GKCase `yaml:"cases"`
}

Based on: https://github.com/open-policy-agent/gatekeeper/blob/a1f01f40ed89db0ae0cb0b84dcc498b76c6fa448/pkg/gator/verify/suite.go#L27

type TrackerSource

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

TrackerSource is a hub.TrackerSource implementation used by several kinds of repositories.

func NewTrackerSource

func NewTrackerSource(i *hub.TrackerSourceInput, opts ...func(s *TrackerSource)) *TrackerSource

NewTrackerSource creates a new TrackerSource instance.

func (*TrackerSource) GetPackagesAvailable

func (s *TrackerSource) GetPackagesAvailable() (map[string]*hub.Package, error)

GetPackagesAvailable implements the TrackerSource interface.

Jump to

Keyboard shortcuts

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