option

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UpdateTypeNone   updateType = iota // Does not update snapshots.
	UpdateTypeNormal                   // Updates snapshots with the same name, but does not delete obsolete files.
	UpdateTypeAll                      // Removes snapshot directory at first, thus obsolete files are deleted.
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MatcherConfig

type MatcherConfig struct {
	// contains filtered or unexported fields
}

func NewMatcherConfig

func NewMatcherConfig(opts ...MatcherOption) *MatcherConfig

func (*MatcherConfig) Directory

func (c *MatcherConfig) Directory() string

func (*MatcherConfig) UpdateType

func (c *MatcherConfig) UpdateType() updateType

type MatcherOption

type MatcherOption interface {
	// contains filtered or unexported methods
}

func WithDirectory

func WithDirectory(d string) MatcherOption

type SnapshotConfig

type SnapshotConfig struct {
	// contains filtered or unexported fields
}

func NewSnapshotConfig

func NewSnapshotConfig(opts ...SnapshotOption) *SnapshotConfig

func (*SnapshotConfig) Name

func (c *SnapshotConfig) Name() string

func (*SnapshotConfig) ShouldSkipByteComparison

func (c *SnapshotConfig) ShouldSkipByteComparison() bool

func (*SnapshotConfig) Threshold

func (c *SnapshotConfig) Threshold() float64

type SnapshotOption

type SnapshotOption interface {
	// contains filtered or unexported methods
}

func WithName

func WithName(n string) SnapshotOption

func WithOnlyPixelComparison

func WithOnlyPixelComparison() SnapshotOption

func WithThreshold

func WithThreshold(t float64) SnapshotOption

Jump to

Keyboard shortcuts

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