Documentation ¶
Index ¶
- func ExtractFieldsInto(src, dst *unstructured.Unstructured, fieldManager string) error
- func FormatExample(text string) string
- func MergeStringMaps(maps ...map[string]string) map[string]string
- func RemoveEmptyField(object *unstructured.Unstructured, fields ...string)
- func RemoveEmptySections(object *unstructured.Unstructured, sections ...string)
- type Config
- type PatchConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractFieldsInto ¶
func ExtractFieldsInto(src, dst *unstructured.Unstructured, fieldManager string) error
ExtractFieldsInto copies the fields owned by fieldManager from the main resource (not a subresource) of src into dst.
func FormatExample ¶
FormatExample prepares text to appear in the Examples section of a command's help text. For spacing, all tabs should be replaced with spaces
func MergeStringMaps ¶
MergeStringMaps returns a new map that contains all the keys and values in maps. When two or more maps have the same key, the value from the rightmost map is used.
func RemoveEmptyField ¶
func RemoveEmptyField(object *unstructured.Unstructured, fields ...string)
RemoveEmptyField removes a nested field from object when it is an empty map or slice or it is the zero value for its type.
func RemoveEmptySections ¶
func RemoveEmptySections(object *unstructured.Unstructured, sections ...string)
RemoveEmptySections removes an empty nested field from object the same as RemoveEmptyField then removes all its empty parent fields.
Types ¶
type Config ¶
type Config struct { *genericclioptions.ConfigFlags genericclioptions.IOStreams Patch PatchConfig }
type PatchConfig ¶
type PatchConfig struct {
FieldManager string
}
func (*PatchConfig) AddFlags ¶
func (cfg *PatchConfig) AddFlags(flags *pflag.FlagSet)
func (*PatchConfig) CreateOptions ¶
func (cfg *PatchConfig) CreateOptions(opts metav1.CreateOptions) metav1.CreateOptions
CreateOptions returns a copy of opts with fields set according to cfg.
func (*PatchConfig) PatchOptions ¶
func (cfg *PatchConfig) PatchOptions(opts metav1.PatchOptions) metav1.PatchOptions
PatchOptions returns a copy of opts with fields set according to cfg.
Directories ¶
Path | Synopsis |
---|---|
apis
|
|
postgres-operator.crunchydata.com/v1beta1
Package v1beta1 contains API Schema definitions.
|
Package v1beta1 contains API Schema definitions. |
testing
|
|