onboard

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package onboard implements conflict-safe local Hextap project onboarding, validation, and read-only doctor checks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string

Action is one deterministic local onboarding plan action.

const (
	// ActionCreate means an absent file will be created.
	ActionCreate Action = "CREATE"
	// ActionUnchanged means an owned file already has exact bytes and mode.
	ActionUnchanged Action = "UNCHANGED"
	// ActionValidated means a valid project-owned custom adapter is preserved.
	ActionValidated Action = "VALIDATED"
)

type DoctorOptions

type DoctorOptions struct {
	Project string
	Online  bool
}

DoctorOptions selects local-only or additional read-only online checks.

type DoctorResult

type DoctorResult struct {
	Project string
	Checks  []string
}

DoctorResult lists deterministic checks that completed successfully.

func Doctor

func Doctor(options DoctorOptions) (DoctorResult, error)

Doctor verifies required local tools and the complete local contract. With Online set, it adds only bounded read-only GitHub queries.

type Entry

type Entry struct {
	Action Action
	Path   string
}

Entry describes one artifact in a deterministic onboarding plan.

type Options

type Options struct {
	Project          string
	Repository       string
	Formula          string
	Binary           string
	Description      string
	License          string
	GoPackage        string
	VersionSymbol    string
	CommitSymbol     string
	ToolkitVersion   string
	ToolkitSHA       string
	RequiredChecks   []string
	Linux            bool
	DryRun           bool
	FormulaSet       bool
	BinarySet        bool
	DescriptionSet   bool
	LicenseSet       bool
	GoPackageSet     bool
	VersionSymbolSet bool
	CommitSymbolSet  bool
	LinuxSet         bool
}

Options contains validated local onboarding inputs. The Set fields record whether a generation-only CLI option was explicitly supplied.

type Result

type Result struct {
	Project string
	Entries []Entry
	DryRun  bool
}

Result describes a completed or dry-run onboarding plan.

func Onboard

func Onboard(options Options) (Result, error)

Onboard preflights every local artifact, then either reports a dry-run plan or creates only absent files with create-only semantics.

type ValidateOptions

type ValidateOptions struct {
	Project string
	Build   bool
}

ValidateOptions selects local validation and the optional adapter smoke.

type ValidateResult

type ValidateResult struct {
	Project        string
	Manifest       manifest.Manifest
	ToolkitVersion string
	ToolkitSHA     string
	RequiredChecks []string
	BuildVerified  bool
}

ValidateResult contains the verified local onboarding identity.

func Validate

func Validate(options ValidateOptions) (ValidateResult, error)

Validate checks the complete local onboarding contract without executing project code unless Build is explicitly true.

Jump to

Keyboard shortcuts

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