splitter

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateNameFromMetadata

func GenerateNameFromMetadata(k8sYaml MinimalK8sYaml, idx int) string

func MarshalIndent

func MarshalIndent(indent int, in interface{}) ([]byte, error)

func MaybeSplitCRDsFs

func MaybeSplitCRDsFs(localpath string) error

func MaybeSplitMultidocYaml

func MaybeSplitMultidocYaml(fs afero.Afero, localPath string, combineNonCRDs bool) error

this function is not perfect, and has known limitations. One of these is that it does not account for `\n---\n` in multiline strings.

func MaybeSplitMultidocYamlFs

func MaybeSplitMultidocYamlFs(localpath string) error

Types

type ListK8sYaml

type ListK8sYaml struct {
	APIVersion string        `json:"apiVersion" yaml:"apiVersion"`
	Kind       string        `json:"kind" yaml:"kind" hcl:"kind"`
	Items      []interface{} `json:"items" yaml:"items"`
}

type MinimalK8sMetadata

type MinimalK8sMetadata struct {
	Name      string `json:"name" yaml:"name" hcl:"name"`
	Namespace string `json:"namespace" yaml:"namespace" hcl:"namespace"`
}

type MinimalK8sYaml

type MinimalK8sYaml struct {
	Kind     string             `json:"kind" yaml:"kind" hcl:"kind"`
	Metadata MinimalK8sMetadata `json:"metadata" yaml:"metadata" hcl:"metadata"`
}

Jump to

Keyboard shortcuts

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