Documentation
¶
Index ¶
- func BuildAttributes(filePath string, defaults map[string]interface{}) map[string]interface{}
- func ResolveTemplate(templatePath string, attributes map[string]interface{}) (string, error)
- type AttributesMetadata
- type Metadata
- func (m Metadata) AttributeDefaults() (map[string]interface{}, error)
- func (m Metadata) CheckRequiredAttributes(attributes map[string]interface{}) error
- func (m Metadata) ParseControllers(attributes map[string]interface{}) (map[string]string, error)
- func (m Metadata) ParseServices(attributes map[string]interface{}) (map[string]string, error)
- func (m Metadata) RequiredAttributes() ([]string, error)
- type SingleAttributeMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildAttributes ¶
Types ¶
type AttributesMetadata ¶
type AttributesMetadata map[string]map[string]map[string]SingleAttributeMetadata
AttributesMetadata holds a whole collection of MetadataAttribute organized into three levels: <resource-type>/<resource-name>/<attribute-name> (e.g. "svc/frontend/balancer")
type Metadata ¶
type Metadata struct { Name string Maintainer string Email string Description string Version string Attributes AttributesMetadata ReplicationControllers map[string]string `yaml:"rc"` Services map[string]string `yaml:"svc"` // contains filtered or unexported fields }
Metadata holds generic info about the deployment's resources and attributes
func ParseMetadata ¶
ParseMetadata parses the metadata file in the kube dir
func (Metadata) AttributeDefaults ¶
AttributeDefaults returns default values for attributes
func (Metadata) CheckRequiredAttributes ¶
CheckRequiredAttributes returns an error if some required attribute is missing
func (Metadata) ParseControllers ¶
ParseControllers parses the replication controllers in the kube and returns their JSON representations
func (Metadata) ParseServices ¶
ParseServices parses the service templates in the kube and returns their JSON representations
func (Metadata) RequiredAttributes ¶
RequiredAttributes returns default values for attributes
type SingleAttributeMetadata ¶
type SingleAttributeMetadata struct { Description string // Description of the attribute Default interface{} // Default value for the attribute: could be string, number, or bool Required bool // Required or not }
SingleAttributeMetadata holds metadata for a configuration attribute