yml

package
v0.0.0-...-1a56975 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyNamespace

func ApplyNamespace(yamlText, ns string) (string, error)

ApplyNamespace applies the given namespaces to the resources in the yamlText.

func Join

func Join(parts ...[]byte) []byte

Join the given yaml parts into a single multipart document.

func JoinString

func JoinString(parts ...string) string

JoinString joins the given yaml parts into a single multipart document.

func Split

func Split(yamlText []byte) [][]byte

Split the given yaml doc if it's multipart document.

func SplitString

func SplitString(yamlText string) []string

SplitString splits the given yaml doc if it's multipart document.

Types

type Descriptor

type Descriptor struct {
	Kind       string   `json:"kind"`
	Group      string   `json:"group"`
	APIVersion string   `json:"apiVersion"`
	Metadata   Metadata `json:"metadata"`
}

Descriptor a descriptor for a kubernetes resource.

func ParseDescriptor

func ParseDescriptor(yamlText string) (Descriptor, error)

ParseDescriptor parses the given single-part yaml and generates the descriptor.

type Metadata

type Metadata struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

Metadata metadata for a kubernetes resource.

Jump to

Keyboard shortcuts

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