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 ¶
type Header struct {
SnapshotVersion string `header:"snapshot_version"`
}
func ParseHeader ¶
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
Click to show internal directories.
Click to hide internal directories.