kyaml

package
v0.0.1-beta01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMappingKeyNode

func GetMappingKeyNode(n *yaml.Node, key string, create bool, expectedKind yaml.Kind, expectedTag string) (*yaml.Node, error)

func GetMappingKeyValue

func GetMappingKeyValue(n *yaml.Node, key string, expectedKind yaml.Kind, expectedTag string) (interface{}, error)

func SetMappingKeyValue

func SetMappingKeyValue(n *yaml.Node, key string, value interface{}, expectedKind yaml.Kind, expectedTag string) error

Types

type RNode

type RNode struct {
	N *yaml.Node
}

func (*RNode) GetAPIGroupAndVersion

func (r *RNode) GetAPIGroupAndVersion() (string, string, error)

func (*RNode) GetAPIVersion

func (r *RNode) GetAPIVersion() (string, error)

func (*RNode) GetAnnotation

func (r *RNode) GetAnnotation(key string) (string, error)

func (*RNode) GetKind

func (r *RNode) GetKind() (string, error)

func (*RNode) GetLabel

func (r *RNode) GetLabel(key string) (string, error)

func (*RNode) GetLabels

func (r *RNode) GetLabels() (map[string]string, error)

func (*RNode) GetName

func (r *RNode) GetName() (string, error)

func (*RNode) GetNamespace

func (r *RNode) GetNamespace() (string, error)

func (*RNode) IsMatchingFilter

func (r *RNode) IsMatchingFilter(includes []TargetingFilter, excludes []TargetingFilter) (bool, error)

func (*RNode) IsMatchingLabelSelector

func (r *RNode) IsMatchingLabelSelector(selector string) (bool, error)

func (*RNode) IsValid

func (r *RNode) IsValid() (bool, error)

func (*RNode) SetAnnotation

func (r *RNode) SetAnnotation(key string, value interface{}) error

func (*RNode) SetLabel

func (r *RNode) SetLabel(key string, value interface{}) error

func (*RNode) SetName

func (r *RNode) SetName(value string) error

func (*RNode) SetNamespace

func (r *RNode) SetNamespace(value string) error

type TargetingFilter

type TargetingFilter struct {
	APIVersion    string `json:"apiVersion" yaml:"apiVersion" mapstructure:"apiVersion"`
	Kind          string `json:"kind" yaml:"kind" mapstructure:"kind"`
	Namespace     string `json:"namespace" yaml:"namespace" mapstructure:"namespace"`
	Name          string `json:"name" yaml:"name" mapstructure:"name"`
	LabelSelector string `json:"labelSelector" yaml:"labelSelector" mapstructure:"labelSelector"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL