common

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const LOG_TEST_SUITE = "test-suite"
View Source
const RAW string = "raw"

RAW the key value for making content parsable as K8sManifest

View Source
const YAMLINDENTION int = 2

Override Indention

Variables

This section is empty.

Functions

func TrustedMarshalYAML

func TrustedMarshalYAML(d interface{}) string

TrustedMarshalYAML marshal yaml without error returned, if an error happens it panics

func TrustedUnmarshalYAML added in v0.4.1

func TrustedUnmarshalYAML(d string) map[string]interface{}

TrustedUnmarshalYAML unmarshal yaml without error returned, if an error happens it panics

func YamlNewDecoder added in v0.7.1

func YamlNewDecoder(r io.Reader) *yamlv3.Decoder

YamlNewDecoder returns a new decoder that reads from r.

func YamlNewEncoder added in v0.7.1

func YamlNewEncoder(w io.Writer) *yamlv3.Encoder

YamlNewEncoder returns a new encoder that writes to w.

func YamlToJson added in v0.7.1

func YamlToJson(in string) ([]byte, error)

func YmlMarshall added in v0.7.1

func YmlMarshall(in interface{}) (string, error)

func YmlMarshallTestHelper added in v0.7.1

func YmlMarshallTestHelper(in interface{}, t *testing.T) string

func YmlUnmarshal added in v0.7.1

func YmlUnmarshal(in string, out interface{}) error

func YmlUnmarshalTestHelper added in v0.7.1

func YmlUnmarshalTestHelper(input string, out any, t *testing.T)

Types

type K8sManifest

type K8sManifest map[string]interface{}

K8sManifest type for rendered manifest unmarshaled to

type YamlNode added in v0.7.1

type YamlNode struct {
	Node yamlv3.Node
}

func NewYamlNode added in v0.7.1

func NewYamlNode() YamlNode

type YmlEscapeHandlers added in v0.7.2

type YmlEscapeHandlers struct{}

func (*YmlEscapeHandlers) Escape added in v0.7.2

func (y *YmlEscapeHandlers) Escape(content string) []byte

Escape function is required, as yaml library no longer maintained yaml unmaintained library issue https://github.com/go-yaml/yaml/pull/862

Jump to

Keyboard shortcuts

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