bundle

package
v1.0.0-beta.7 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: ISC Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ManifestPath = "manifest.json"
	PlanPath     = "plan.json"
	FormatV1     = 1
	FormatV2     = 2
)

Variables

This section is empty.

Functions

func BundleFileName

func BundleFileName(playbookName, targetName, osName, arch string) string

func Write

func Write(path string, manifest *Manifest, files []FileSpec) error

Types

type BuildInfo

type BuildInfo struct {
	Version string `json:"version"`
	Commit  string `json:"commit"`
	Date    string `json:"date"`
}

BuildInfo identifies the preflight binary that created the bundle.

type ExtractedBundle

type ExtractedBundle struct {
	Manifest  *Manifest
	RootDir   string
	PlanPath  string
	PluginDir string
}

ExtractedBundle is a bundle extracted to a temporary directory for execution.

func Extract

func Extract(path string) (*ExtractedBundle, error)

func (*ExtractedBundle) Cleanup

func (b *ExtractedBundle) Cleanup() error

type FileSpec

type FileSpec struct {
	Path string
	Mode os.FileMode
	Data []byte
}

FileSpec is one file to include in a bundle.

type Manifest

type Manifest struct {
	FormatVersion int                `json:"format_version"`
	CreatedAt     time.Time          `json:"created_at"`
	PlaybookName  string             `json:"playbook_name"`
	TargetName    string             `json:"target_name"`
	TargetOS      string             `json:"target_os"`
	TargetArch    string             `json:"target_arch"`
	Build         BuildInfo          `json:"build"`
	Modules       []ModuleInfo       `json:"modules,omitempty"`
	Checksums     map[string]string  `json:"checksums,omitempty"`
	LockEntries   []action.LockEntry `json:"lock_entries,omitempty"`
	SecretMode    SecretMode         `json:"secret_mode,omitempty"`
	SecretEntries []SecretEntry      `json:"secret_entries,omitempty"`
}

Manifest describes a staged offline bundle.

type ModuleInfo

type ModuleInfo struct {
	Name    string `json:"name"`
	Kind    string `json:"kind"`
	Path    string `json:"path,omitempty"`
	Version string `json:"version,omitempty"`
}

ModuleInfo records one module referenced by the staged plan.

type SecretEntry

type SecretEntry struct {
	Name string `json:"name"`
	Path string `json:"path"`
}

SecretEntry records one bundle-local secret payload referenced by the plan.

type SecretMode

type SecretMode string
const (
	SecretModeNone      SecretMode = ""
	SecretModeEncrypted SecretMode = "encrypted"
	SecretModePlaintext SecretMode = "plaintext"
)

Jump to

Keyboard shortcuts

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