Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CategorizeYAMLFile ¶
Returns either a *ConstraintTemplate or a *Constraint or an error dataSource should be helpful documentation to help rediscover the source of this information.
Types ¶
type Constraint ¶
type Constraint struct {
Confg *UnclassifiedConfig
}
Constraint stores parsed information including the raw data.
func (*Constraint) AsProto ¶
func (c *Constraint) AsProto() (*validator.Constraint, error)
AsProto returns the constraint a Kubernetes proto
type ConstraintTemplate ¶
type ConstraintTemplate struct { Confg *UnclassifiedConfig // This is the kind that this template generates. GeneratedKind string Rego string }
ConstraintTemplate stores parsed information including the raw data.
type UnclassifiedConfig ¶
type UnclassifiedConfig struct { Group string MetadataName string Kind string Yaml *simpleyaml.Yaml // keep the file path to help debug logging FilePath string // Preserve the raw user data to forward into rego // This prevents any data loss issues from going though parsing libraries. RawFile string }
UnclassifiedConfig stores loosely parsed information not specific to constraints or templates.
func (*UnclassifiedConfig) AsInterface ¶
func (c *UnclassifiedConfig) AsInterface() (interface{}, error)
AsInterface returns the the config data as a structured golang object. This uses yaml.Unmarshal to create this object.
Click to show internal directories.
Click to hide internal directories.