exitcode

package
v0.55.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExitCode

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

func New

func New(spec interface{}, exitCode *int, output *string) (*ExitCode, error)

func (*ExitCode) ConditionResult

func (e *ExitCode) ConditionResult() (bool, error)

ConditionResult defines the success criteria for a condition using the shell resource

func (*ExitCode) PostCommand

func (e *ExitCode) PostCommand(workingDir string) error

PostCommand defines operations needed to be executed after the shell command

func (*ExitCode) PreCommand

func (e *ExitCode) PreCommand(workingDir string) error

PreCommand defines operations needed to be executed before the shell command

func (*ExitCode) SourceResult

func (e *ExitCode) SourceResult(resultSource *result.Source) error

SourceResult defines the success criteria for a source using the shell resource

func (*ExitCode) TargetResult

func (e *ExitCode) TargetResult() (bool, error)

TargetResult defines the success criteria for a target using the shell resource

type Spec

type Spec struct {
	// Warning defines the command exit code used by Updatecli to identify a change need. Default to 2 if no exitcode have been specified
	Warning int `yaml:",omitempty" jsonschema:"required"`
	// Success defines the command exit code used by Updatecli to identify no changes are needed. Default to 0 if no exitcode have been specified
	Success int `yaml:",omitempty" jsonschema:"required"`
	// Failure defines the command exit code used by Updatecli to identify that something went wrong. Default to 1 if no exitcode have been specified
	Failure int `yaml:",omitempty" jsonschema:"required"`
}

func (Spec) Validate

func (s Spec) Validate() error

Jump to

Keyboard shortcuts

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