app

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TrustWorkspaceEnvVar     = "HATCHCTL_TRUST_WORKSPACE"
	AllowHostLifecycleEnvVar = "HATCHCTL_ALLOW_HOST_LIFECYCLE"
)

Variables

This section is empty.

Functions

func EnvTruthy

func EnvTruthy(name string) bool

Types

type BridgeDoctorRequest

type BridgeDoctorRequest struct {
	Defaults CommandDefaults
	Global   GlobalOptions
	IO       CommandIO
}

type BuildRequest

type BuildRequest struct {
	Defaults CommandDefaults
	Global   GlobalOptions
	IO       CommandIO
}

type BuildResult

type BuildResult = reconcile.BuildResult

type CommandDefaults

type CommandDefaults struct {
	Backend        string
	Workspace      string
	ConfigPath     string
	StateDir       string
	CacheDir       string
	FeatureTimeout time.Duration
	LockfilePolicy string
	BridgeEnabled  bool
	TrustWorkspace bool
	SSHAgent       bool
	TrustedSigners []security.TrustedSigner
	Dotfiles       DotfilesOptions
}

func ResolveDefaults

func ResolveDefaults(req ResolveDefaultsRequest) (CommandDefaults, error)

type CommandIO

type CommandIO struct {
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
	Events ui.Sink
}

type DotfilesOptionValues

type DotfilesOptionValues struct {
	Repository     FlagValue[string]
	InstallCommand FlagValue[string]
	TargetPath     FlagValue[string]
}

type DotfilesOptions

type DotfilesOptions = capability.Dotfiles

func DefaultDotfilesOptions

func DefaultDotfilesOptions() DotfilesOptions

type DotfilesStatus

type DotfilesStatus = reconcile.DotfilesStatus

type ExecRequest

type ExecRequest struct {
	Defaults  CommandDefaults
	Args      []string
	RemoteEnv map[string]string
	Global    GlobalOptions
	IO        CommandIO
}

type ExitError

type ExitError = reconcile.ExitError

type FlagValue

type FlagValue[T any] struct {
	Value   T
	Changed bool
}

type GlobalOptions

type GlobalOptions struct {
	Verbose bool
	Debug   bool
}

type ReadConfigRequest

type ReadConfigRequest struct {
	Defaults CommandDefaults
	Global   GlobalOptions
	IO       CommandIO
}

type ReadConfigResult

type ReadConfigResult = reconcile.ReadConfigResult

type ResolveDefaultsRequest

type ResolveDefaultsRequest struct {
	Backend        FlagValue[string]
	Workspace      FlagValue[string]
	ConfigPath     FlagValue[string]
	FeatureTimeout FlagValue[time.Duration]
	LockfilePolicy FlagValue[string]
	BridgeEnabled  *FlagValue[bool]
	TrustWorkspace *FlagValue[bool]
	SSHAgent       *FlagValue[bool]
	Dotfiles       DotfilesOptionValues
}

type RunLifecycleRequest

type RunLifecycleRequest struct {
	Defaults           CommandDefaults
	AllowHostLifecycle bool
	Phase              string
	Global             GlobalOptions
	IO                 CommandIO
}

type RunLifecycleResult

type RunLifecycleResult = reconcile.RunLifecycleResult

type Service

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

func New

func New(executor *reconcile.Executor) *Service

func NewDefault

func NewDefault() *Service

func NewWithExecutor

func NewWithExecutor(executor *reconcile.Executor) *Service

func NewWithExecutorWithoutMutationLock

func NewWithExecutorWithoutMutationLock(executor *reconcile.Executor) *Service

func (*Service) BridgeDoctor

func (s *Service) BridgeDoctor(ctx context.Context, req BridgeDoctorRequest) (bridge.Report, error)

func (*Service) Build

func (s *Service) Build(ctx context.Context, req BuildRequest) (BuildResult, error)

func (*Service) Exec

func (s *Service) Exec(ctx context.Context, req ExecRequest) (int, error)

func (*Service) ReadConfig

func (s *Service) ReadConfig(ctx context.Context, req ReadConfigRequest) (ReadConfigResult, error)

func (*Service) RunLifecycle

func (s *Service) RunLifecycle(ctx context.Context, req RunLifecycleRequest) (RunLifecycleResult, error)

func (*Service) Up

func (s *Service) Up(ctx context.Context, req UpRequest) (UpResult, error)

type UpRequest

type UpRequest struct {
	Defaults           CommandDefaults
	AllowHostLifecycle bool
	Recreate           bool
	Global             GlobalOptions
	IO                 CommandIO
}

type UpResult

type UpResult = reconcile.UpResult

Jump to

Keyboard shortcuts

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