fingerprint

package
v3.23.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package fingerprint is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Glob

func Glob(dir string, g string) ([]string, error)

func IsTaskUpToDate

func IsTaskUpToDate(
	ctx context.Context,
	t *taskfile.Task,
	opts ...CheckerOption,
) (bool, error)

Types

type CheckerConfig

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

type CheckerOption

type CheckerOption func(*CheckerConfig)

func WithDry

func WithDry(dry bool) CheckerOption

func WithLogger

func WithLogger(logger *logger.Logger) CheckerOption

func WithMethod

func WithMethod(method string) CheckerOption

func WithSourcesChecker

func WithSourcesChecker(checker SourcesCheckable) CheckerOption

func WithStatusChecker

func WithStatusChecker(checker StatusCheckable) CheckerOption

func WithTempDir

func WithTempDir(tempDir string) CheckerOption

type ChecksumChecker

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

ChecksumChecker validates if a task is up to date by calculating its source files checksum

func NewChecksumChecker

func NewChecksumChecker(tempDir string, dry bool) *ChecksumChecker

func (*ChecksumChecker) IsUpToDate

func (checker *ChecksumChecker) IsUpToDate(t *taskfile.Task) (bool, error)

func (*ChecksumChecker) Kind

func (*ChecksumChecker) Kind() string

func (*ChecksumChecker) OnError

func (checker *ChecksumChecker) OnError(t *taskfile.Task) error

func (*ChecksumChecker) Value

func (checker *ChecksumChecker) Value(t *taskfile.Task) (interface{}, error)

type MockSourcesCheckable

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

MockSourcesCheckable is a mock of SourcesCheckable interface.

func NewMockSourcesCheckable

func NewMockSourcesCheckable(ctrl *gomock.Controller) *MockSourcesCheckable

NewMockSourcesCheckable creates a new mock instance.

func (*MockSourcesCheckable) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockSourcesCheckable) IsUpToDate

func (m *MockSourcesCheckable) IsUpToDate(t *taskfile.Task) (bool, error)

IsUpToDate mocks base method.

func (*MockSourcesCheckable) Kind

func (m *MockSourcesCheckable) Kind() string

Kind mocks base method.

func (*MockSourcesCheckable) OnError

func (m *MockSourcesCheckable) OnError(t *taskfile.Task) error

OnError mocks base method.

func (*MockSourcesCheckable) Value

func (m *MockSourcesCheckable) Value(t *taskfile.Task) (interface{}, error)

Value mocks base method.

type MockSourcesCheckableMockRecorder

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

MockSourcesCheckableMockRecorder is the mock recorder for MockSourcesCheckable.

func (*MockSourcesCheckableMockRecorder) IsUpToDate

func (mr *MockSourcesCheckableMockRecorder) IsUpToDate(t interface{}) *gomock.Call

IsUpToDate indicates an expected call of IsUpToDate.

func (*MockSourcesCheckableMockRecorder) Kind

Kind indicates an expected call of Kind.

func (*MockSourcesCheckableMockRecorder) OnError

func (mr *MockSourcesCheckableMockRecorder) OnError(t interface{}) *gomock.Call

OnError indicates an expected call of OnError.

func (*MockSourcesCheckableMockRecorder) Value

func (mr *MockSourcesCheckableMockRecorder) Value(t interface{}) *gomock.Call

Value indicates an expected call of Value.

type MockStatusCheckable

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

MockStatusCheckable is a mock of StatusCheckable interface.

func NewMockStatusCheckable

func NewMockStatusCheckable(ctrl *gomock.Controller) *MockStatusCheckable

NewMockStatusCheckable creates a new mock instance.

func (*MockStatusCheckable) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStatusCheckable) IsUpToDate

func (m *MockStatusCheckable) IsUpToDate(ctx context.Context, t *taskfile.Task) (bool, error)

IsUpToDate mocks base method.

type MockStatusCheckableMockRecorder

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

MockStatusCheckableMockRecorder is the mock recorder for MockStatusCheckable.

func (*MockStatusCheckableMockRecorder) IsUpToDate

func (mr *MockStatusCheckableMockRecorder) IsUpToDate(ctx, t interface{}) *gomock.Call

IsUpToDate indicates an expected call of IsUpToDate.

type NoneChecker

type NoneChecker struct{}

NoneChecker is a no-op Checker. It will always report that the task is not up-to-date.

func (NoneChecker) IsUpToDate

func (NoneChecker) IsUpToDate(t *taskfile.Task) (bool, error)

func (NoneChecker) Kind

func (NoneChecker) Kind() string

func (NoneChecker) OnError

func (NoneChecker) OnError(t *taskfile.Task) error

func (NoneChecker) Value

func (NoneChecker) Value(t *taskfile.Task) (interface{}, error)

type SourcesCheckable

type SourcesCheckable interface {
	IsUpToDate(t *taskfile.Task) (bool, error)
	Value(t *taskfile.Task) (interface{}, error)
	OnError(t *taskfile.Task) error
	Kind() string
}

SourcesCheckable defines any type that can check if the sources of a task are up-to-date.

func NewSourcesChecker

func NewSourcesChecker(method, tempDir string, dry bool) (SourcesCheckable, error)

type StatusCheckable

type StatusCheckable interface {
	IsUpToDate(ctx context.Context, t *taskfile.Task) (bool, error)
}

StatusCheckable defines any type that can check if the status of a task is up-to-date.

func NewStatusChecker

func NewStatusChecker(logger *logger.Logger) StatusCheckable

type StatusChecker

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

func (*StatusChecker) IsUpToDate

func (checker *StatusChecker) IsUpToDate(ctx context.Context, t *taskfile.Task) (bool, error)

type TimestampChecker

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

TimestampChecker checks if any source change compared with the generated files, using file modifications timestamps.

func NewTimestampChecker

func NewTimestampChecker(tempDir string, dry bool) *TimestampChecker

func (*TimestampChecker) IsUpToDate

func (checker *TimestampChecker) IsUpToDate(t *taskfile.Task) (bool, error)

IsUpToDate implements the Checker interface

func (*TimestampChecker) Kind

func (checker *TimestampChecker) Kind() string

func (*TimestampChecker) OnError

func (*TimestampChecker) OnError(t *taskfile.Task) error

OnError implements the Checker interface

func (*TimestampChecker) Value

func (checker *TimestampChecker) Value(t *taskfile.Task) (interface{}, error)

Value implements the Checker Interface

Jump to

Keyboard shortcuts

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