Documentation ¶
Index ¶
- func GroupVersionKindFrom(gvk string) (schema.GroupVersionKind, error)
- func NamespacedNameFrom(name string) (types.NamespacedName, error)
- func SanitizeJsonPatch(expr string) string
- func UnmarshalYamlDocString(doc YamlDocString) (obj map[string]interface{}, err error)
- func YamlToJson(in string) ([]byte, error)
- type ResourceTable
- type ResourceTableRow
- type YamlDocString
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GroupVersionKindFrom ¶
func GroupVersionKindFrom(gvk string) (schema.GroupVersionKind, error)
GroupVersionKindFrom converts a string to a GroupVersionKind.
func NamespacedNameFrom ¶
func NamespacedNameFrom(name string) (types.NamespacedName, error)
NamespacedNameFrom converts a string to a NamespacedName.
func SanitizeJsonPatch ¶
SanitizeJsonPatch replace all '/' and '~' in the given JsonPath expression.
func UnmarshalYamlDocString ¶
func UnmarshalYamlDocString(doc YamlDocString) (obj map[string]interface{}, err error)
UnmarshalYamlDocString converts a *messages.PickleStepArgument_PickleDocString into a map[string]interface{}.
func YamlToJson ¶
YamlToJson converts naively YAML string to JSON []byte.
Types ¶
type ResourceTable ¶
type ResourceTable pickleTable
ResourceTable adds unmarshalling method to easily manage Resource table.
type ResourceTableRow ¶
ResourceTableRow describes a resource in the ResourceTable.
func UnmarshalResourceTable ¶
func UnmarshalResourceTable(table ResourceTable) (resources []ResourceTableRow, err error)
UnmarshalResourceTable converts a *messages.PickleStepArgument_PickleTable into a list of ResourceTableRow, in which we can easily extract GroupVersionKind and NamespacedName values.
func (ResourceTableRow) GroupVersionKind ¶
func (row ResourceTableRow) GroupVersionKind() schema.GroupVersionKind
GroupVersionKind returns the GroupVersionKind of the current resource.
func (ResourceTableRow) NamespacedName ¶
func (row ResourceTableRow) NamespacedName() types.NamespacedName
NamespacedName returns the NamespacedName of the current resource.
type YamlDocString ¶
type YamlDocString pickleDocString
YamlDocString adds unmarshalling method to easily manage YAML content.