hooks

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvReleaseUniqname = "HELMWAVE_LIFECYCLE_RELEASE_UNIQNAME"
	EnvLifecycleType   = "HELMWAVE_LIFECYCLE_TYPE"
)

Variables

View Source
var ErrUnknownFormat = errors.New("unknown format")

Functions

func NewCommandReadOutputError

func NewCommandReadOutputError(err error) error

func NewCommandRunError

func NewCommandRunError(err error) error

func NewCreatePipeError

func NewCreatePipeError(err error) error

func NewYAMLDecodeError

func NewYAMLDecodeError(err error) error

Types

type CommandReadOutputError

type CommandReadOutputError struct {
	Err error
}

func (CommandReadOutputError) Error

func (err CommandReadOutputError) Error() string

func (CommandReadOutputError) Unwrap

func (err CommandReadOutputError) Unwrap() error

type CommandRunError

type CommandRunError struct {
	Err error
}

func (CommandRunError) Error

func (err CommandRunError) Error() string

func (CommandRunError) Unwrap

func (err CommandRunError) Unwrap() error

type CreatePipeError

type CreatePipeError struct {
	Err error
}

func (CreatePipeError) Error

func (err CreatePipeError) Error() string

func (CreatePipeError) Unwrap

func (err CreatePipeError) Unwrap() error

type Hook

type Hook interface {
	Run(context.Context) error
	Log() *log.Entry
}

type Hooks

type Hooks []Hook

func (Hooks) JSONSchema

func (Hooks) JSONSchema() *jsonschema.Schema

func (*Hooks) UnmarshalYAML

func (h *Hooks) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML is an unmarshaller for gopkg.in/yaml.v3 to parse YAML into `Hook` interface.

type Lifecycle

type Lifecycle struct {
	PreBuild  Hooks `yaml:"pre_build" json:"pre_build" jsonschema:"title=pre_build,description=pre_build hooks"`
	PostBuild Hooks `yaml:"post_build" json:"post_build" jsonschema:"title=post_build,description=post_build hooks"`

	PreUp  Hooks `yaml:"pre_up" json:"pre_up" jsonschema:"title=pre_up,description=pre_up hooks"`
	PostUp Hooks `yaml:"post_up" json:"post_up" jsonschema:"title=post_up,description=post_up hooks"`

	PreRollback  Hooks `yaml:"pre_rollback" json:"pre_rollback" jsonschema:"title=pre_rollback,description=pre_rollback hooks"`
	PostRollback Hooks `yaml:"post_rollback" json:"post_rollback" jsonschema:"title=post_rollback,description=post_rollback hooks"`

	PreDown  Hooks `yaml:"pre_down" json:"pre_down" jsonschema:"title=pre_down,description=pre_down hooks"`
	PostDown Hooks `yaml:"post_down" json:"post_down" jsonschema:"title=post_down,description=post_down hooks"`
}

func (*Lifecycle) RunPostBuild

func (l *Lifecycle) RunPostBuild(ctx context.Context) error

func (*Lifecycle) RunPostDown

func (l *Lifecycle) RunPostDown(ctx context.Context) error

func (*Lifecycle) RunPostRollback

func (l *Lifecycle) RunPostRollback(ctx context.Context) error

func (*Lifecycle) RunPostUp

func (l *Lifecycle) RunPostUp(ctx context.Context) error

func (*Lifecycle) RunPreBuild

func (l *Lifecycle) RunPreBuild(ctx context.Context) error

func (*Lifecycle) RunPreDown

func (l *Lifecycle) RunPreDown(ctx context.Context) error

func (*Lifecycle) RunPreRollback

func (l *Lifecycle) RunPreRollback(ctx context.Context) error

func (*Lifecycle) RunPreUp

func (l *Lifecycle) RunPreUp(ctx context.Context) error

type YAMLDecodeError

type YAMLDecodeError struct {
	Err error
}

func (YAMLDecodeError) Error

func (err YAMLDecodeError) Error() string

func (YAMLDecodeError) Unwrap

func (err YAMLDecodeError) Unwrap() error

Jump to

Keyboard shortcuts

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