Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Name string `json:"name"` Type string `json:"type"` Global bool `json:"global,omitempty"` Description string `json:"description,omitempty"` Options []ConfigParam `json:"options,omitempty"` }
type ConfigParam ¶
type ConfigParam struct { Name string `json:"name"` Required bool `json:"required"` Dynamic bool `json:"dynamic,omitempty"` Description string `json:"description"` Type string `json:"type"` Default string `json:"default"` SecretFrom string `json:"secretfrom,omitempty"` // References a value from a k8s secret resource }
type EnvironmentVar ¶
type EnvironmentVar struct { Name string `json:"name"` Required bool `json:"required"` Type string `json:"type,omitempty"` EnvFrom string `json:"envfrom,omitempty"` // Looks for a globally named configmap. SecretFrom string `json:"secretfrom,omitempty"` // References a k8s Secret resource. Description string `json:"description"` Default string `json:"default,omitempty"` Example string `json:"example,omitempty"` }
type MetaGraf ¶
type MetaGraf struct { Kind string `json:"kind"` Metadata struct { Name string `json:"name"` ResourceVersion string `json:"resourceversion"` Namespace string `json:"namespace"` CreationTimestamp string `json:"creationtimestamp,omitempty"` Labels map[string]string `json:"labels,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` } `json:"metadata"` Spec struct { Type string `json:"type"` Version string `json:"version"` Description string `json:"description"` Repository string `json:"repository,omitempty"` RepSecRef string `json:"repsecref,omitempty"` Branch string `json:"branch,omitempty"` BuildImage string `json:"buildimage,omitempty"` // Builder Image for s2i builds. BaseRunImage string `json:"baserunimage,omitempty"` // Runtime Container Image for binary build. Image string `json:"image,omitempty"` // Container Image URL, for wrapping upstream images. LivenessProbe v1.Probe `json:"livenessProbe,omitempty"` // Using the k8s Probe type ReadinessProbe v1.Probe `json:"readinessProbe,omitempty"` // Using the k8s Probe type Resources []Resource `json:"resources,omitempty"` Environment struct { Build []EnvironmentVar `json:"build,omitempty"` Local []EnvironmentVar `json:"local,omitempty"` External struct { Introduces []EnvironmentVar `json:"introduces,omitempty"` Consumes []EnvironmentVar `json:"consumes,omitempty"` } `json:"external,omitempty"` } `json:"environment,omitempty"` Config []Config `json:"config,omitempty"` Secret []Secret `json:"secret,omitempty"` } `json:"spec"` }
JSON structure for a MetaGraf entity
func (*MetaGraf) GetConfigByName ¶ added in v0.0.18
func (*MetaGraf) GetResourceByName ¶ added in v0.0.18
func (*MetaGraf) GetSecretByName ¶ added in v0.0.18
func (*MetaGraf) GetVars ¶
Returns a map of all parameterized fields in a metaGraf specification. @todo need to look for parameterized fields in more places?
func (*MetaGraf) GetVarsFromSource ¶ added in v0.0.18
type Resource ¶
type Resource struct { Name string `json:"name"` Description string `json:"description,omitempty"` Type string `json:"type"` Required bool `json:"required"` External bool `json:"external"` Semop string `json:"semop,omitempty"` // Semantic operator, how to evaluate version match/requirements. Semver string `json:"semver,omitempty"` // Semantic version to evaluate for attached resource EnvRef string `json:"envref,omitempty"` // Reference an Environment variable // Used when we need to generate configuration for connection to the described attached resource. Template string `json:"template,omitempty"` // Go txt template string for generating resource configuration. TemplateRef string `json:"templateref,omitempty"` // ConfigMap Reference, OUTDATED Use ConfigRef ConfigRef string `json:"configref,omitempty"` // ConfigMap Reference, Replaces TemplateRef which was not a good name. User string `json:"user,omitempty"` Secret string `json:"secret,omitempty"` // k8s Secret reference }
* Describes attached resources for a component. Ref, 12 factor app.
Click to show internal directories.
Click to hide internal directories.