Documentation
¶
Overview ¶
Package journal provides error constructors for journal pipeline operations.
Index ¶
- func LoadState(cause error) error
- func LoadStateErr(cause error) error
- func LoadStateFailed(cause error) error
- func NoDir(path string) error
- func NoEntries(path string) error
- func NoEntriesMatch(patterns string) error
- func ReadDir(cause error) error
- func RegenerateRequiresAll() error
- func SaveState(cause error) error
- func SaveStateFailed(cause error) error
- func Scan(cause error) error
- func StageNotSet(filename, stage string) error
- func UnknownStage(stage, valid string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadState ¶
LoadState wraps a journal state loading failure.
Parameters:
- cause: the underlying error.
Returns:
- error: "load journal state: <cause>"
func LoadStateErr ¶
LoadStateErr wraps a failure to load journal processing state.
Parameters:
- cause: the underlying error
Returns:
- error: "load journal state: <cause>"
func LoadStateFailed ¶
LoadStateFailed wraps a journal state loading failure.
Parameters:
- cause: the underlying error
Returns:
- error: "load journal state: <cause>"
func NoDir ¶
NoDir returns an error when the journal directory does not exist.
Parameters:
- path: absolute path to the missing journal directory.
Returns:
- error: includes a hint to run 'ctx recall export --all'
func NoEntries ¶
NoEntries returns an error when the journal directory has no entries.
Parameters:
- path: path to the empty journal directory.
Returns:
- error: includes a hint to run 'ctx recall export --all'
func NoEntriesMatch ¶
NoEntriesMatch returns an error when a pattern matches nothing.
Parameters:
- patterns: the patterns that matched nothing.
Returns:
- error: "no journal entries match: <patterns>"
func ReadDir ¶
ReadDir wraps a failure to read the journal directory.
Parameters:
- cause: the underlying OS error.
Returns:
- error: "read journal directory: <cause>"
func RegenerateRequiresAll ¶
func RegenerateRequiresAll() error
RegenerateRequiresAll returns a validation error when --regenerate is used without --all.
Returns:
- error: explains the flag dependency
func SaveState ¶
SaveState wraps a journal state saving failure.
Parameters:
- cause: the underlying error.
Returns:
- error: "save journal state: <cause>"
func SaveStateFailed ¶
SaveStateFailed wraps a journal state save failure.
Parameters:
- cause: the underlying error
Returns:
- error: "save journal state: <cause>"
func Scan ¶
Scan wraps a journal scanning failure.
Parameters:
- cause: the underlying scan error.
Returns:
- error: "failed to scan journal: <cause>"
func StageNotSet ¶
StageNotSet returns an error when a journal stage has not been set.
Parameters:
- filename: the journal filename
- stage: the stage name
Returns:
- error: "<filename>: <stage> not set"
func UnknownStage ¶
UnknownStage returns an error for an unrecognized journal stage.
Parameters:
- stage: the unknown stage name
- valid: comma-separated list of valid stage names
Returns:
- error: "unknown stage <stage>; valid: <valid>"
Types ¶
This section is empty.