envelope

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 1 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

View Source
const (
	BootstrapStartKey contextKey = "bootstrap_start"
	RunEStartKey      contextKey = "runE_start"
	CommandPathKey    contextKey = "command_path"
	ScribeVersionKey  contextKey = "scribe_version"
	DurationMSKey     contextKey = "duration_ms"
	BootstrapMSKey    contextKey = "bootstrap_ms"
)
View Source
const FormatVersion = "1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Envelope

type Envelope struct {
	Status        Status           `json:"status"`
	FormatVersion string           `json:"format_version"`
	Data          any              `json:"data,omitempty"`
	Error         *clierrors.Error `json:"error,omitempty"`
	Meta          Meta             `json:"meta"`
}

func New

func New(status Status, data any, meta Meta) Envelope

type Meta

type Meta struct {
	DurationMS    int64  `json:"duration_ms,omitempty"`
	BootstrapMS   int64  `json:"bootstrap_ms,omitempty"`
	Command       string `json:"command,omitempty"`
	ScribeVersion string `json:"scribe_version,omitempty"`
}

type Status

type Status string
const (
	StatusOK               Status = "ok"
	StatusPartialSuccess   Status = "partial_success"
	StatusAlreadyInstalled Status = "already_installed"
	StatusNoChange         Status = "no_change"
	StatusError            Status = "error"
)

func (Status) IsValid

func (s Status) IsValid() bool

Jump to

Keyboard shortcuts

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