snap

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff added in v0.0.6

func Diff(x, y string, o DiffOptions) string

func Log added in v0.0.6

func Log() *slog.Logger

func MatchSnapShot

func MatchSnapShot(options ...Option) types.GomegaMatcher

func ObjectSnapshot

func ObjectSnapshot(obj client.Object) client.Object

func RemoveDynamicFields

func RemoveDynamicFields(o client.Object)

func SetLogger added in v0.0.6

func SetLogger(slogr *slog.Logger)

func SnapShotMatcher

func SnapShotMatcher(snapFile string, snapId string, diffOpts ...DiffOptions) *snapShotMatcher

func UnstructuredMatch added in v0.0.6

func UnstructuredMatch(matcher gomegatypes.GomegaMatcher, manifests []unstructured.Unstructured) (success bool, err error)

func UnstructuredSnapShotMatcher added in v0.0.6

func UnstructuredSnapShotMatcher(snapFile string, snapId string, diffOpts ...DiffOptions) *snapShotMatcher

func UnstructuredSnapshotDiff added in v0.0.6

func UnstructuredSnapshotDiff(x, y string, o DiffOptions) string

Types

type DiffOptions added in v0.0.6

type DiffOptions struct {
	DiffContextLineN int
}

func WithDiffContextLineN added in v0.0.6

func WithDiffContextLineN(n int) DiffOptions

func (*DiffOptions) ContextLineN added in v0.0.6

func (o *DiffOptions) ContextLineN() int

type Option

type Option func(m *snapShotMatcher)

Jump to

Keyboard shortcuts

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