initial version of confiuration is now parsed.
This commit is contained in:
+14
-1
@@ -39,7 +39,20 @@ type CIDRS struct {
|
||||
Except []CIDR `yaml:"except,omitempty"`
|
||||
}
|
||||
|
||||
type Application struct {
|
||||
Name string `yaml:"name"`
|
||||
Ports []string `yaml:"ports,omitempty"`
|
||||
MatchLabels map[string]string `yaml:"matchLabels"`
|
||||
}
|
||||
|
||||
type Namespace struct {
|
||||
Namespace string `yaml:"namespace"`
|
||||
Capabilities []string `yaml:"capabilities"`
|
||||
Applications []Application `yaml:"applications"`
|
||||
}
|
||||
|
||||
// Config represents the top-level YAML structure
|
||||
type Config struct {
|
||||
Networks []CIDRS `yaml:"networks"`
|
||||
Networks []CIDRS `yaml:"networks"`
|
||||
Namespaces []Namespace `yaml:"namespaces"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user