envelope

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 1 Imported by: 0

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