v1alpha1

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DynamicValue = "###DYNAMIC_FIELD###"

Variables

View Source
var Base64DynamicValue = base64.StdEncoding.EncodeToString([]byte(DynamicValue))
View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "helm-chartsnap.jlandowner.dev", Version: "v1alpha1"}
)

Functions

func FromFile

func FromFile[T SnapshotValues | SnapshotConfig](filePath string, out *T) error

Types

type Header struct {
	SnapshotVersion string `header:"snapshot_version"`
}

func ParseHeader

func ParseHeader(line string) *Header

func (*Header) ToString

func (h *Header) ToString() string

type ManifestPath

type ManifestPath struct {
	Kind       string   `yaml:"kind,omitempty"`
	APIVersion string   `yaml:"apiVersion,omitempty"`
	Name       string   `yaml:"name,omitempty"`
	JSONPath   []string `yaml:"jsonPath,omitempty"`
	Base64     bool     `yaml:"base64,omitempty"`
}

func (*ManifestPath) DynamicValue

func (v *ManifestPath) DynamicValue() string

type SnapshotConfig

type SnapshotConfig struct {
	DynamicFields []ManifestPath `yaml:"dynamicFields,omitempty"`
}

func (*SnapshotConfig) Merge

func (t *SnapshotConfig) Merge(cfg SnapshotConfig)

Merge merges the snapshot configs into the current snapshot config The current snapshot config has higher priority than the given snapshot config

type SnapshotValues

type SnapshotValues struct {
	TestSpec SnapshotConfig `yaml:"testSpec,omitempty"`
}

type UnknownError

type UnknownError struct {
	Raw string
}

func NewUnknownError

func NewUnknownError(raw string) *UnknownError

func (*UnknownError) Error

func (e *UnknownError) Error() string

func (*UnknownError) MustString

func (e *UnknownError) MustString() string

func (*UnknownError) Node

func (e *UnknownError) Node() *yaml.Node

func (*UnknownError) String

func (e *UnknownError) String() (string, error)

func (*UnknownError) Unstructured

func (e *UnknownError) Unstructured() *metaV1.Unstructured

Jump to

Keyboard shortcuts

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