c2pcr

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binding

type Binding struct {
	// Compliance name
	Compliance string `json:"compliance,omitempty"`
	// The list of cluster group to be bound to the compliance
	ClusterGroups []string `json:"clusterGroups,omitempty"`
}

type C2PCRParsed

type C2PCRParsed struct {
	Namespace           string
	PolicyResoureDir    string
	PolicyResultsDir    string
	Catalog             typesoscal.CatalogRoot
	Profile             typesoscal.ProfileRoot
	ComponentDefinition typecd.ComponentDefinitionRoot
	ComponentObjects    []oscal.ComponentObject
	ClusterSelectors    map[string]string
}

type ClusterGroup

type ClusterGroup struct {
	// Name
	Name string `json:"name,omitempty"`
	// Cluster selector
	MatchLabels *map[string]string `json:"matchLabels,omitempty"`
}

type ClusterSelectors

type ClusterSelectors struct {
	// 'matchLabels' is a map of {key,value} pairs matching objects by label.
	MatchLabels *map[string]string `json:"matchLabels,omitempty"`
}

type Compliance

type Compliance struct {
	// Name of compliance
	Name string `json:"name,omitempty"`
	// Reference to OSCAL Catalog json
	Catalog ResourceRef `json:"catalog,omitempty"`
	// Reference to OSCAL Profile json
	Profile ResourceRef `json:"profile,omitempty"`
	// Reference to OSCAL Component Definition json
	ComponentDefinition ResourceRef `json:"componentDefinition,omitempty"`
}

type ResourceRef

type ResourceRef struct {
	Url string `json:"url,omitempty"`
}

type Spec

type Spec struct {
	Compliance      Compliance     `json:"compliance,omitempty"`
	PolicyResources ResourceRef    `json:"policyResources,omitempty"`
	PolicyRersults  ResourceRef    `json:"policyResults,omitempty"`
	ClusterGroups   []ClusterGroup `json:"clusterGroups,omitempty"`
	Binding         Binding        `json:"binding,omitempty"`
	Target          Target         `json:"target,omitempty"`
}

C2P CR Spec defines the desired state of C2P CR

type Target

type Target struct {
	// Namespace for generated policies to be placed in Hub
	Namespace string `json:"namespace,omitempty"`
}

Jump to

Keyboard shortcuts

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