Documentation
¶
Index ¶
- type ErrEmptyCommand
- type ExecutionFailedError
- type MockCommandExecutor
- type Shell
- func (s *Shell) Condition(source string) (bool, error)
- func (s *Shell) ConditionFromSCM(source string, scm scm.Scm) (bool, error)
- func (s *Shell) Source(workingDir string) (string, error)
- func (s *Shell) Target(source string, dryRun bool) (bool, error)
- func (s *Shell) TargetFromSCM(source string, scm scm.Scm, dryRun bool) (bool, []string, string, error)
- type ShellSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrEmptyCommand ¶
type ErrEmptyCommand struct{}
func (*ErrEmptyCommand) Error ¶
func (e *ErrEmptyCommand) Error() string
type ExecutionFailedError ¶ added in v0.14.0
type ExecutionFailedError struct{}
func (*ExecutionFailedError) Error ¶ added in v0.14.0
func (e *ExecutionFailedError) Error() string
type MockCommandExecutor ¶ added in v0.13.0
type MockCommandExecutor struct { GotCommand command Result commandResult Err error }
MockCommandExecutor is a stub implementation of the `commandExecutor` interface to be used in our test suite. It stores the received `command` and returns the preconfigured `result` and `err`.
func (*MockCommandExecutor) ExecuteCommand ¶ added in v0.13.0
func (mce *MockCommandExecutor) ExecuteCommand(cmd command) (commandResult, error)
type Shell ¶
type Shell struct {
// contains filtered or unexported fields
}
Shell defines a resource of type "shell"
func New ¶
New returns a reference to a newly initialized Shell object from a ShellSpec or an error if the provided ShellSpec triggers a validation error.
func (*Shell) Condition ¶
Condition tests if the provided command (concatenated with the source) is executed with success
func (*Shell) ConditionFromSCM ¶
ConditionFromSCM tests if the provided command (concatenated with the source) is executed with success from the SCM root directory
Click to show internal directories.
Click to hide internal directories.