Documentation
¶
Index ¶
- func ExitCode(err error) *int
- func Strings(errors []error) []string
- func WithSecondary(primary error, secondary []error) error
- type CommandError
- type CommandOutput
- type CommandRunner
- type Context
- type ExecRunner
- type LifecycleError
- type Options
- type Result
- type Session
- func (session *Session) Cleanup() error
- func (session *Session) ContextPath() string
- func (session *Session) Results() []Result
- func (session *Session) Run(ctx context.Context, event config.HookEvent, hookContext Context) error
- func (session *Session) RunBestEffort(ctx context.Context, event config.HookEvent, hookContext Context) []error
- func (session *Session) SecondaryErrors() []error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithSecondary ¶
Types ¶
type CommandError ¶
func (*CommandError) Error ¶
func (hookError *CommandError) Error() string
func (*CommandError) Unwrap ¶
func (hookError *CommandError) Unwrap() error
type CommandOutput ¶
type CommandRunner ¶
type Context ¶
type Context struct {
Stage string `json:"stage,omitempty"`
Source string `json:"source,omitempty"`
Output []string `json:"output,omitempty"`
CurrentVersion string `json:"current_version,omitempty"`
NextVersion string `json:"next_version,omitempty"`
ProjectName string `json:"project_name,omitempty"`
GitTag string `json:"git_tag,omitempty"`
FilePaths []string `json:"file_paths,omitempty"`
CommitMessage string `json:"commit_message,omitempty"`
CommitPaths []string `json:"commit_paths,omitempty"`
Tag string `json:"tag,omitempty"`
PushCommit bool `json:"push_commit"`
PushTag bool `json:"push_tag"`
Applied bool `json:"applied"`
DryRun bool `json:"dry_run"`
Completed []string `json:"completed,omitempty"`
ErrorStage string `json:"error_stage,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
ErrorExitCode *int `json:"error_exit_code,omitempty"`
Secondary []string `json:"secondary_errors,omitempty"`
}
type ExecRunner ¶
type ExecRunner struct{}
func (ExecRunner) Run ¶
func (ExecRunner) Run(ctx context.Context, cwd, command string, environment []string) (CommandOutput, error)
type LifecycleError ¶
func (*LifecycleError) Error ¶
func (lifecycleError *LifecycleError) Error() string
func (*LifecycleError) Unwrap ¶
func (lifecycleError *LifecycleError) Unwrap() error
type Result ¶
type Result struct {
Event config.HookEvent `json:"event"`
Kind string `json:"kind"`
Index int `json:"index"`
Status string `json:"status"`
DurationMS int64 `json:"duration_ms"`
ExitCode *int `json:"exit_code,omitempty"`
Stdout string `json:"stdout,omitempty"`
Stderr string `json:"stderr,omitempty"`
}
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func (*Session) ContextPath ¶
func (*Session) RunBestEffort ¶
func (*Session) SecondaryErrors ¶
Click to show internal directories.
Click to hide internal directories.