initop

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package initop owns the initialization application operation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, input Input, loadProject LoadProject, gate Gate) (initspec.Outcome, error)

Run performs one complete initialization operation and returns its semantic outcome. Rendering and protocol selection remain with the command.

Types

type Gate

type Gate func(context.Context, string) error

Gate is the command-composed compatibility gate that must pass before an existing project is republished.

type Input

type Input struct {
	Root         string
	ResidentRoot string
	Force        bool
	Answers      map[string]string
	PromptInput  io.Reader
	PromptOutput io.Writer
	Interactive  bool
}

Input contains parsed initialization values and CLI-selected prompt streams.

type LoadProject

type LoadProject func(string) (*project.Loader, error)

LoadProject is the command-composed project loader constructor used after the initialization operation has established or selected configuration authority.

type PartialError added in v0.41.0

type PartialError struct {
	Outcome initspec.Outcome
	Cause   error
}

PartialError carries the complete initialization outcome after a committed config or publication effect, while preserving the underlying error identity.

func (*PartialError) Error added in v0.41.0

func (e *PartialError) Error() string

func (*PartialError) Unwrap added in v0.41.0

func (e *PartialError) Unwrap() error

Jump to

Keyboard shortcuts

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