github.com/go-task/task/v3/internal/fingerprint
No package summary is available.
Package
Files: 9. Third party imports: 2. Imports from organisation: 0. Tests: 0. Benchmarks: 0.
Vars
Types
ChecksumChecker
ChecksumChecker validates if a task is up to date by calculating its source files checksum
| Field name | Field type | Comment |
|---|---|---|
| tempDir |
|
No comment on field. |
| dry |
|
No comment on field. |
MockSourcesCheckable
MockSourcesCheckable is an autogenerated mock type for the SourcesCheckable type
| Field name | Field type | Comment |
|---|---|---|
|
No comment on field. |
MockSourcesCheckable_Expecter
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| mock |
|
No comment on field. |
MockSourcesCheckable_IsUpToDate_Call
MockSourcesCheckable_IsUpToDate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsUpToDate'
| Field name | Field type | Comment |
|---|---|---|
|
No comment on field. |
MockSourcesCheckable_Kind_Call
MockSourcesCheckable_Kind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Kind'
| Field name | Field type | Comment |
|---|---|---|
|
No comment on field. |
MockSourcesCheckable_OnError_Call
MockSourcesCheckable_OnError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnError'
| Field name | Field type | Comment |
|---|---|---|
|
No comment on field. |
MockSourcesCheckable_Value_Call
MockSourcesCheckable_Value_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Value'
| Field name | Field type | Comment |
|---|---|---|
|
No comment on field. |
MockStatusCheckable
MockStatusCheckable is an autogenerated mock type for the StatusCheckable type
| Field name | Field type | Comment |
|---|---|---|
|
No comment on field. |
MockStatusCheckable_Expecter
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| mock |
|
No comment on field. |
MockStatusCheckable_IsUpToDate_Call
MockStatusCheckable_IsUpToDate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsUpToDate'
| Field name | Field type | Comment |
|---|---|---|
|
No comment on field. |
NoneChecker
NoneChecker is a no-op Checker. It will always report that the task is not up-to-date.
SourcesCheckable
SourcesCheckable defines any type that can check if the sources of a task are up-to-date.
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
StatusCheckable
StatusCheckable defines any type that can check if the status of a task is up-to-date.
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
StatusChecker
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| logger |
|
No comment on field. |
TimestampChecker
TimestampChecker checks if any source change compared with the generated files, using file modifications timestamps.
| Field name | Field type | Comment |
|---|---|---|
| tempDir |
|
No comment on field. |
| dry |
|
No comment on field. |
CheckerOption, CheckerConfig
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
| method |
|
No comment on field. |
| dry |
|
No comment on field. |
| tempDir |
|
No comment on field. |
| logger |
|
No comment on field. |
| statusChecker |
|
No comment on field. |
| sourcesChecker |
|
No comment on field. |
Functions
func Globs
func IsTaskUpToDate
func NewChecksumChecker
func NewMockSourcesCheckable
NewMockSourcesCheckable creates a new instance of MockSourcesCheckable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func NewMockStatusCheckable
NewMockStatusCheckable creates a new instance of MockStatusCheckable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func NewSourcesChecker
func NewStatusChecker
func NewTimestampChecker
func WithDry
func WithLogger
func WithMethod
func WithSourcesChecker
func WithStatusChecker
func WithTempDir
func (*ChecksumChecker) IsUpToDate
func (*ChecksumChecker) Kind
func (*ChecksumChecker) OnError
func (*ChecksumChecker) Value
func (*MockSourcesCheckable) EXPECT
func (*MockSourcesCheckable) IsUpToDate
IsUpToDate provides a mock function for the type MockSourcesCheckable
Uses: ast.Task.func (*MockSourcesCheckable) Kind
Kind provides a mock function for the type MockSourcesCheckable
func (*MockSourcesCheckable) OnError
OnError provides a mock function for the type MockSourcesCheckable
Uses: ast.Task.func (*MockSourcesCheckable) Value
Value provides a mock function for the type MockSourcesCheckable
Uses: ast.Task.func (*MockSourcesCheckable_Expecter) IsUpToDate
IsUpToDate is a helper method to define mock.On call
- t
func (*MockSourcesCheckable_Expecter) Kind
Kind is a helper method to define mock.On call
func (*MockSourcesCheckable_Expecter) OnError
OnError is a helper method to define mock.On call
- t
func (*MockSourcesCheckable_Expecter) Value
Value is a helper method to define mock.On call
- t
func (*MockSourcesCheckable_IsUpToDate_Call) Return
func (*MockSourcesCheckable_IsUpToDate_Call) Run
func (*MockSourcesCheckable_IsUpToDate_Call) RunAndReturn
func (*MockSourcesCheckable_Kind_Call) Return
func (*MockSourcesCheckable_Kind_Call) Run
func (*MockSourcesCheckable_Kind_Call) RunAndReturn
func (*MockSourcesCheckable_OnError_Call) Return
func (*MockSourcesCheckable_OnError_Call) Run
func (*MockSourcesCheckable_OnError_Call) RunAndReturn
func (*MockSourcesCheckable_Value_Call) Return
func (*MockSourcesCheckable_Value_Call) Run
func (*MockSourcesCheckable_Value_Call) RunAndReturn
func (*MockStatusCheckable) EXPECT
func (*MockStatusCheckable) IsUpToDate
IsUpToDate provides a mock function for the type MockStatusCheckable
Uses: ast.Task, context.Context.func (*MockStatusCheckable_Expecter) IsUpToDate
IsUpToDate is a helper method to define mock.On call
- ctx
- t
func (*MockStatusCheckable_IsUpToDate_Call) Return
func (*MockStatusCheckable_IsUpToDate_Call) Run
func (*MockStatusCheckable_IsUpToDate_Call) RunAndReturn
func (*StatusChecker) IsUpToDate
func (*TimestampChecker) IsUpToDate
IsUpToDate implements the Checker interface
Uses: filepath.Dir, os.Chtimes, os.Create, os.MkdirAll, os.Stat, time.Now.func (*TimestampChecker) Kind
func (*TimestampChecker) OnError
OnError implements the Checker interface
func (*TimestampChecker) Value
Value implements the Checker Interface
Uses: time.Now, time.Unix.func (NoneChecker) IsUpToDate
func (NoneChecker) Kind
func (NoneChecker) OnError
func (NoneChecker) Value
Private functions
func anyFileNewerThan
If the modification time of any of the files is newer than the the given time, returns true. This function is lazy, as it stops when it finds a file newer than the given time.
References: os.Stat.func collectKeys
func getMaxTime
func glob
func maxTime
func normalizeFilename
replaces invalid characters on filenames with "-"
func checksum
func checksumFilePath
func timestampFilePath
Tests
Files: 2. Third party imports: 3. Imports from organisation: 0. Tests: 2. Benchmarks: 0.