lifecyclehooks

package
v1.31.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterHooks added in v1.30.0

func FilterHooks(hooks []v2.LifecycleHookConfig, typ HookType) (output []v2.LifecycleHookConfig)

func ResolveReloaderHooks added in v1.30.0

func ResolveReloaderHooks(reloaderConfig *v2.ReloaderConfig, typ HookType) (hooks []v2.LifecycleHookConfig)

ResolveReloaderHooks resolves all hooks in the given reloader.

func ResolveRepositoryHooks added in v1.30.0

func ResolveRepositoryHooks(caproniCfg *v2.CaproniConfig, repoName string, typ HookType) (hooks []v2.LifecycleHookConfig)

ResolveRepositoryHooks resolves all hooks in the repository and all associated reloaders.

func RunHooks

func RunHooks(
	ctx context.Context,
	exec executor.CommandRunner,
	caproniCfg *v2.CaproniConfig,
	repoConfig *v2.RepositoryConfig,
	repoName string,
	hooks []v2.LifecycleHookConfig,
) error

Types

type HookType

type HookType string
const (
	// TypeEditModePrepare is a hook that runs after a repository is cloned or updated.
	TypeEditModePrepare HookType = "edit_mode_prepare"
	// TypeEditModeStart is a hook that runs before starting an edit mode process.
	TypeEditModeStart HookType = "edit_mode_start"
	// TypeEditModeStop is a hook that runs after an edit mode process exits, regardless of exit code.
	TypeEditModeStop HookType = "edit_mode_stop"
)

Jump to

Keyboard shortcuts

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