Documentation ¶
Index ¶
- Variables
- func MapVariantToTypedObject(mv *MapVariant, ptr interface{}) error
- func NewDoc(nodes ...*yaml.Node) *doc
- func NewSliceVariant(s ...variant) *sliceVariant
- func ParseDoc(b []byte) (*doc, error)
- func TypedObjectToSliceVariant(v interface{}) (*sliceVariant, error)
- type MapVariant
- func (o *MapVariant) Entries() (map[string]variant, error)
- func (o *MapVariant) GetKind() variantKind
- func (o *MapVariant) GetMap(field string) *MapVariant
- func (o *MapVariant) GetNestedBool(fields ...string) (bool, bool, error)
- func (o *MapVariant) GetNestedFloat(fields ...string) (float64, bool, error)
- func (o *MapVariant) GetNestedInt(fields ...string) (int, bool, error)
- func (o *MapVariant) GetNestedMap(fields ...string) (*MapVariant, bool, error)
- func (o *MapVariant) GetNestedScalar(fields ...string) (*scalarVariant, bool, error)
- func (o *MapVariant) GetNestedSlice(fields ...string) (*sliceVariant, bool, error)
- func (o *MapVariant) GetNestedString(fields ...string) (string, bool, error)
- func (o *MapVariant) GetNestedStringMap(fields ...string) (map[string]string, bool, error)
- func (o *MapVariant) GetNestedValue(fields ...string) (variant, bool, error)
- func (o *MapVariant) GetRNode(fields ...string) (*yaml.RNode, bool, error)
- func (o *MapVariant) Node() *yaml.Node
- func (o *MapVariant) RemoveNestedField(fields ...string) (bool, error)
- func (o *MapVariant) SetNestedBool(b bool, fields ...string) error
- func (o *MapVariant) SetNestedFloat(f float64, fields ...string) error
- func (o *MapVariant) SetNestedInt(i int, fields ...string) error
- func (o *MapVariant) SetNestedMap(m *MapVariant, fields ...string) error
- func (o *MapVariant) SetNestedSlice(s *sliceVariant, fields ...string) error
- func (o *MapVariant) SetNestedString(s string, fields ...string) error
- func (o *MapVariant) SetNestedStringMap(m map[string]string, fields ...string) error
- func (o *MapVariant) SetNestedValue(val variant, fields ...string) error
- func (o *MapVariant) UpsertMap(field string) *MapVariant
Constants ¶
This section is empty.
Variables ¶
View Source
var PrecomputedIsNamespaceScoped = map[yaml.TypeMeta]bool{ {APIVersion: "admissionregistration.k8s.io/v1", Kind: "MutatingWebhookConfiguration"}: false, {APIVersion: "admissionregistration.k8s.io/v1", Kind: "ValidatingWebhookConfiguration"}: false, {APIVersion: "admissionregistration.k8s.io/v1beta1", Kind: "MutatingWebhookConfiguration"}: false, {APIVersion: "admissionregistration.k8s.io/v1beta1", Kind: "ValidatingWebhookConfiguration"}: false, {APIVersion: "apiextensions.k8s.io/v1", Kind: "CustomResourceDefinition"}: false, {APIVersion: "apiextensions.k8s.io/v1beta1", Kind: "CustomResourceDefinition"}: false, {APIVersion: "apiregistration.k8s.io/v1", Kind: "APIService"}: false, {APIVersion: "apiregistration.k8s.io/v1beta1", Kind: "APIService"}: false, {APIVersion: "apps/v1", Kind: "ControllerRevision"}: true, {APIVersion: "apps/v1", Kind: "DaemonSet"}: true, {APIVersion: "apps/v1", Kind: "Deployment"}: true, {APIVersion: "apps/v1", Kind: "ReplicaSet"}: true, {APIVersion: "apps/v1", Kind: "StatefulSet"}: true, {APIVersion: "autoscaling/v1", Kind: "HorizontalPodAutoscaler"}: true, {APIVersion: "autoscaling/v1", Kind: "Scale"}: true, {APIVersion: "autoscaling/v2beta1", Kind: "HorizontalPodAutoscaler"}: true, {APIVersion: "autoscaling/v2beta2", Kind: "HorizontalPodAutoscaler"}: true, {APIVersion: "batch/v1", Kind: "CronJob"}: true, {APIVersion: "batch/v1", Kind: "Job"}: true, {APIVersion: "batch/v1beta1", Kind: "CronJob"}: true, {APIVersion: "certificates.k8s.io/v1", Kind: "CertificateSigningRequest"}: false, {APIVersion: "certificates.k8s.io/v1beta1", Kind: "CertificateSigningRequest"}: false, {APIVersion: "coordination.k8s.io/v1", Kind: "Lease"}: true, {APIVersion: "coordination.k8s.io/v1beta1", Kind: "Lease"}: true, {APIVersion: "discovery.k8s.io/v1", Kind: "EndpointSlice"}: true, {APIVersion: "discovery.k8s.io/v1beta1", Kind: "EndpointSlice"}: true, {APIVersion: "events.k8s.io/v1", Kind: "Event"}: true, {APIVersion: "events.k8s.io/v1beta1", Kind: "Event"}: true, {APIVersion: "extensions/v1beta1", Kind: "Ingress"}: true, {APIVersion: "flowcontrol.apiserver.k8s.io/v1beta1", Kind: "FlowSchema"}: false, {APIVersion: "flowcontrol.apiserver.k8s.io/v1beta1", Kind: "PriorityLevelConfiguration"}: false, {APIVersion: "networking.k8s.io/v1", Kind: "Ingress"}: true, {APIVersion: "networking.k8s.io/v1", Kind: "IngressClass"}: false, {APIVersion: "networking.k8s.io/v1", Kind: "NetworkPolicy"}: true, {APIVersion: "networking.k8s.io/v1beta1", Kind: "Ingress"}: true, {APIVersion: "networking.k8s.io/v1beta1", Kind: "IngressClass"}: false, {APIVersion: "node.k8s.io/v1", Kind: "RuntimeClass"}: false, {APIVersion: "node.k8s.io/v1beta1", Kind: "RuntimeClass"}: false, {APIVersion: "policy/v1", Kind: "PodDisruptionBudget"}: true, {APIVersion: "policy/v1beta1", Kind: "PodDisruptionBudget"}: true, {APIVersion: "policy/v1beta1", Kind: "PodSecurityPolicy"}: false, {APIVersion: "rbac.authorization.k8s.io/v1", Kind: "ClusterRole"}: false, {APIVersion: "rbac.authorization.k8s.io/v1", Kind: "ClusterRoleBinding"}: false, {APIVersion: "rbac.authorization.k8s.io/v1", Kind: "Role"}: true, {APIVersion: "rbac.authorization.k8s.io/v1", Kind: "RoleBinding"}: true, {APIVersion: "rbac.authorization.k8s.io/v1beta1", Kind: "ClusterRole"}: false, {APIVersion: "rbac.authorization.k8s.io/v1beta1", Kind: "ClusterRoleBinding"}: false, {APIVersion: "rbac.authorization.k8s.io/v1beta1", Kind: "Role"}: true, {APIVersion: "rbac.authorization.k8s.io/v1beta1", Kind: "RoleBinding"}: true, {APIVersion: "scheduling.k8s.io/v1", Kind: "PriorityClass"}: false, {APIVersion: "scheduling.k8s.io/v1beta1", Kind: "PriorityClass"}: false, {APIVersion: "storage.k8s.io/v1", Kind: "CSIDriver"}: false, {APIVersion: "storage.k8s.io/v1", Kind: "CSINode"}: false, {APIVersion: "storage.k8s.io/v1", Kind: "StorageClass"}: false, {APIVersion: "storage.k8s.io/v1", Kind: "VolumeAttachment"}: false, {APIVersion: "storage.k8s.io/v1beta1", Kind: "CSIDriver"}: false, {APIVersion: "storage.k8s.io/v1beta1", Kind: "CSINode"}: false, {APIVersion: "storage.k8s.io/v1beta1", Kind: "CSIStorageCapacity"}: true, {APIVersion: "storage.k8s.io/v1beta1", Kind: "StorageClass"}: false, {APIVersion: "storage.k8s.io/v1beta1", Kind: "VolumeAttachment"}: false, {APIVersion: "v1", Kind: "ComponentStatus"}: false, {APIVersion: "v1", Kind: "ConfigMap"}: true, {APIVersion: "v1", Kind: "Endpoints"}: true, {APIVersion: "v1", Kind: "Event"}: true, {APIVersion: "v1", Kind: "LimitRange"}: true, {APIVersion: "v1", Kind: "Namespace"}: false, {APIVersion: "v1", Kind: "Node"}: false, {APIVersion: "v1", Kind: "NodeProxyOptions"}: false, {APIVersion: "v1", Kind: "PersistentVolume"}: false, {APIVersion: "v1", Kind: "PersistentVolumeClaim"}: true, {APIVersion: "v1", Kind: "Pod"}: true, {APIVersion: "v1", Kind: "PodAttachOptions"}: true, {APIVersion: "v1", Kind: "PodExecOptions"}: true, {APIVersion: "v1", Kind: "PodPortForwardOptions"}: true, {APIVersion: "v1", Kind: "PodProxyOptions"}: true, {APIVersion: "v1", Kind: "PodTemplate"}: true, {APIVersion: "v1", Kind: "ReplicationController"}: true, {APIVersion: "v1", Kind: "ResourceQuota"}: true, {APIVersion: "v1", Kind: "Secret"}: true, {APIVersion: "v1", Kind: "Service"}: true, {APIVersion: "v1", Kind: "ServiceAccount"}: true, {APIVersion: "v1", Kind: "ServiceProxyOptions"}: true, }
PrecomputedIsNamespaceScoped copies the sigs.k8s.io/kustomize/kyaml/openapi precomputedIsNamespaceScoped
Functions ¶
func MapVariantToTypedObject ¶
func MapVariantToTypedObject(mv *MapVariant, ptr interface{}) error
func NewSliceVariant ¶
func NewSliceVariant(s ...variant) *sliceVariant
func TypedObjectToSliceVariant ¶
func TypedObjectToSliceVariant(v interface{}) (*sliceVariant, error)
Types ¶
type MapVariant ¶
type MapVariant struct {
// contains filtered or unexported fields
}
func ExtractObjects ¶
func ExtractObjects(nodes ...*yaml.Node) ([]*MapVariant, error)
func NewMap ¶
func NewMap(node *yaml.Node) *MapVariant
func NewStringMapVariant ¶
func NewStringMapVariant(m map[string]string) *MapVariant
func TypedObjectToMapVariant ¶
func TypedObjectToMapVariant(v interface{}) (*MapVariant, error)
func (*MapVariant) Entries ¶
func (o *MapVariant) Entries() (map[string]variant, error)
func (*MapVariant) GetKind ¶
func (o *MapVariant) GetKind() variantKind
func (*MapVariant) GetMap ¶
func (o *MapVariant) GetMap(field string) *MapVariant
GetMap will return the field as a map if it exists and is a map, otherwise it will return nil. Note that if the value exists but is not a map, nil will be returned.
func (*MapVariant) GetNestedBool ¶
func (o *MapVariant) GetNestedBool(fields ...string) (bool, bool, error)
func (*MapVariant) GetNestedFloat ¶
func (o *MapVariant) GetNestedFloat(fields ...string) (float64, bool, error)
func (*MapVariant) GetNestedInt ¶
func (o *MapVariant) GetNestedInt(fields ...string) (int, bool, error)
func (*MapVariant) GetNestedMap ¶
func (o *MapVariant) GetNestedMap(fields ...string) (*MapVariant, bool, error)
func (*MapVariant) GetNestedScalar ¶
func (o *MapVariant) GetNestedScalar(fields ...string) (*scalarVariant, bool, error)
func (*MapVariant) GetNestedSlice ¶
func (o *MapVariant) GetNestedSlice(fields ...string) (*sliceVariant, bool, error)
func (*MapVariant) GetNestedString ¶
func (o *MapVariant) GetNestedString(fields ...string) (string, bool, error)
func (*MapVariant) GetNestedStringMap ¶
func (*MapVariant) GetNestedValue ¶
func (o *MapVariant) GetNestedValue(fields ...string) (variant, bool, error)
func (*MapVariant) Node ¶
func (o *MapVariant) Node() *yaml.Node
func (*MapVariant) RemoveNestedField ¶
func (o *MapVariant) RemoveNestedField(fields ...string) (bool, error)
func (*MapVariant) SetNestedBool ¶
func (o *MapVariant) SetNestedBool(b bool, fields ...string) error
func (*MapVariant) SetNestedFloat ¶
func (o *MapVariant) SetNestedFloat(f float64, fields ...string) error
func (*MapVariant) SetNestedInt ¶
func (o *MapVariant) SetNestedInt(i int, fields ...string) error
func (*MapVariant) SetNestedMap ¶
func (o *MapVariant) SetNestedMap(m *MapVariant, fields ...string) error
func (*MapVariant) SetNestedSlice ¶
func (o *MapVariant) SetNestedSlice(s *sliceVariant, fields ...string) error
func (*MapVariant) SetNestedString ¶
func (o *MapVariant) SetNestedString(s string, fields ...string) error
func (*MapVariant) SetNestedStringMap ¶
func (o *MapVariant) SetNestedStringMap(m map[string]string, fields ...string) error
func (*MapVariant) SetNestedValue ¶
func (o *MapVariant) SetNestedValue(val variant, fields ...string) error
func (*MapVariant) UpsertMap ¶
func (o *MapVariant) UpsertMap(field string) *MapVariant
UpsertMap will return the field as a map if it exists and is a map, otherwise it will insert a map at the specified field. Note that if the value exists but is not a map, it will be replaced with a map.
Click to show internal directories.
Click to hide internal directories.