Documentation ¶
Index ¶
- func ApplyTransformers(ctx context.Context, transformers []Transformer, ...) ([]unstructured.Unstructured, error)
- func Name(trans Transformer) string
- func NestedMap(objMap map[string]interface{}, path string) (map[string]interface{}, bool)
- func NestedMapDelete(objMap map[string]interface{}, path string) bool
- func NestedSlice(objMap map[string]interface{}, path string) ([]interface{}, bool)
- func ToObject(u map[string]interface{}, obj interface{}) error
- func ToUnstructured(obj interface{}) (map[string]interface{}, error)
- type JSONPatchTransformer
- type MetadataTransformer
- type NetworkTransformer
- type ScalingTransformer
- type Transformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyTransformers ¶ added in v0.3.0
func ApplyTransformers(ctx context.Context, transformers []Transformer, objects []unstructured.Unstructured) ([]unstructured.Unstructured, error)
ApplyTransformers applies all transformer to each unstructured objects
func Name ¶
func Name(trans Transformer) string
func NestedMapDelete ¶
func NestedSlice ¶
func ToUnstructured ¶
ToUnstructured makes object to a property of Unstructured object must be bool, int64, float64, string, []interface{}, map[string]interface{}, json.Number or nil
Types ¶
type JSONPatchTransformer ¶
type JSONPatchTransformer struct {
// contains filtered or unexported fields
}
func NewJSONPatchTransformer ¶
func NewJSONPatchTransformer(json6902 []cosmov1alpha1.Json6902, instName string) *JSONPatchTransformer
func (*JSONPatchTransformer) Transform ¶
func (t *JSONPatchTransformer) Transform(src *unstructured.Unstructured) (*unstructured.Unstructured, error)
type MetadataTransformer ¶
type MetadataTransformer struct {
// contains filtered or unexported fields
}
func NewMetadataTransformer ¶
func NewMetadataTransformer(inst cosmov1alpha1.InstanceObject, scheme *runtime.Scheme, disableNamePrefix bool) *MetadataTransformer
func (*MetadataTransformer) Transform ¶
func (t *MetadataTransformer) Transform(src *unstructured.Unstructured) (*unstructured.Unstructured, error)
type NetworkTransformer ¶
type NetworkTransformer struct {
// contains filtered or unexported fields
}
func NewNetworkTransformer ¶
func NewNetworkTransformer(netSpec *cosmov1alpha1.NetworkOverrideSpec, instName string) *NetworkTransformer
func (*NetworkTransformer) Transform ¶
func (t *NetworkTransformer) Transform(src *unstructured.Unstructured) (*unstructured.Unstructured, error)
type ScalingTransformer ¶
type ScalingTransformer struct {
// contains filtered or unexported fields
}
func NewScalingTransformer ¶
func NewScalingTransformer(ScalingOverrideSpecs []cosmov1alpha1.ScalingOverrideSpec, instName string) *ScalingTransformer
func (*ScalingTransformer) Transform ¶
func (t *ScalingTransformer) Transform(src *unstructured.Unstructured) (*unstructured.Unstructured, error)
type Transformer ¶
type Transformer interface {
Transform(*unstructured.Unstructured) (*unstructured.Unstructured, error)
}
Transformer is interface to modify unstructured object
func AllTransformers ¶ added in v0.5.0
func AllTransformers(inst cosmov1alpha1.InstanceObject, scheme *runtime.Scheme, tmpl cosmov1alpha1.TemplateObject) []Transformer
Click to show internal directories.
Click to hide internal directories.