Help us shape the future of Go! Take the 2026 Go Developer Survey

output

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const APIVersion = "1.0"

Variables

View Source
var JSONMode bool

Functions

func FormatError

func FormatError(err error) error

func FormatErrorCode

func FormatErrorCode(code, message string) error

func FormatPS

func FormatPS(containers []ContainerJSON) error

func FormatProjectList

func FormatProjectList(projects []ProjectJSON) error

func IsJSONMode

func IsJSONMode() bool

func PrintError

func PrintError(code, message string) error

func PrintJSON

func PrintJSON(data interface{}) error

func PrintSuccess

func PrintSuccess(message string) error

func SetJSONMode

func SetJSONMode(enabled bool)

Types

type ContainerJSON

type ContainerJSON struct {
	Name         string     `json:"name"`
	Image        string     `json:"image"`
	Command      string     `json:"command"`
	Service      string     `json:"service"`
	State        string     `json:"state"`
	Status       string     `json:"status"`
	Ports        []PortJSON `json:"ports"`
	ExposedPorts []string   `json:"exposed_ports,omitempty"`
	Networks     []string   `json:"networks,omitempty"`
	Mounts       []string   `json:"mounts,omitempty"`
	CreatedAt    time.Time  `json:"created_at"`
	ExitedAt     time.Time  `json:"exited_at,omitempty"`
	ExitCode     int        `json:"exit_code,omitempty"`
	DBusActive   string     `json:"dbus_active,omitempty"`
	DBusSub      string     `json:"dbus_sub,omitempty"`
}

type DownData added in v0.4.1

type DownData struct {
	Project         string   `json:"project"`
	RemovedFiles    []string `json:"removed_files"`
	RemovedNetworks []string `json:"removed_networks"`
	RemovedVolumes  []string `json:"removed_volumes,omitempty"`
	Success         bool     `json:"success"`
}

type DryRunBuild added in v0.4.2

type DryRunBuild struct {
	Name     string `json:"name"`
	ImageTag string `json:"image_tag"`
}

type DryRunData added in v0.4.2

type DryRunData struct {
	Project      string        `json:"project"`
	TargetDir    string        `json:"target_dir"`
	PullStrategy string        `json:"pull_strategy"`
	Images       []DryRunImage `json:"images,omitempty"`
	Builds       []DryRunBuild `json:"builds,omitempty"`
	Files        []DryRunFile  `json:"files,omitempty"`
	HasChanges   bool          `json:"has_changes"`
}

type DryRunFile added in v0.4.2

type DryRunFile struct {
	Name       string `json:"name"`
	Path       string `json:"path"`
	Status     string `json:"status"`
	Diff       string `json:"diff"`
	NewContent string `json:"new_content,omitempty"`
}

type DryRunImage added in v0.4.2

type DryRunImage struct {
	Name   string `json:"name"`
	Ref    string `json:"ref"`
	Action string `json:"action"`
}

type Envelope

type Envelope struct {
	Version string      `json:"version"`
	Data    interface{} `json:"data"`
}

type ErrorEnvelope

type ErrorEnvelope struct {
	Version string     `json:"version"`
	Error   *ErrorInfo `json:"error"`
}

type ErrorInfo

type ErrorInfo struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type LifecycleData added in v0.4.1

type LifecycleData struct {
	Action  string   `json:"action"`
	Project string   `json:"project"`
	Units   []string `json:"units"`
	Success bool     `json:"success"`
}

type LogEntryJSON added in v0.4.1

type LogEntryJSON struct {
	Timestamp string `json:"timestamp"`
	Unit      string `json:"unit"`
	Priority  int    `json:"priority"`
	Message   string `json:"message"`
}

type LogsData added in v0.4.1

type LogsData struct {
	Project string         `json:"project"`
	Entries []LogEntryJSON `json:"entries"`
}

type PSData

type PSData struct {
	Containers []ContainerJSON `json:"containers"`
}

type PortJSON

type PortJSON struct {
	Protocol      string `json:"protocol"`
	ContainerPort int    `json:"container_port"`
	HostIP        string `json:"host_ip"`
	HostPort      int    `json:"host_port"`
}

type ProjectJSON

type ProjectJSON struct {
	Name       string         `json:"name"`
	SourcePath string         `json:"source_path"`
	Files      int            `json:"files"`
	Status     string         `json:"status"`
	Services   string         `json:"services"`
	Resources  *ResourcesJSON `json:"resources,omitempty"`
}

type ProjectListData

type ProjectListData struct {
	Projects []ProjectJSON `json:"projects"`
}

type ResourceJSON added in v0.4.1

type ResourceJSON struct {
	Name string `json:"name"`
	Type string `json:"type"`
	Info string `json:"info,omitempty"`
}

type ResourcesJSON

type ResourcesJSON struct {
	Containers []string `json:"containers"`
	Networks   []string `json:"networks"`
	Volumes    []string `json:"volumes"`
	Images     []string `json:"images"`
	Builds     []string `json:"builds"`
}

type ServiceJSON added in v0.4.1

type ServiceJSON struct {
	Name     string   `json:"name"`
	Status   string   `json:"status"`
	Image    string   `json:"image"`
	Networks []string `json:"networks"`
	Volumes  []string `json:"volumes"`
}

type UnitFileJSON added in v0.4.1

type UnitFileJSON struct {
	Filename string `json:"filename"`
	Content  string `json:"content"`
}

type UpData added in v0.4.1

type UpData struct {
	Project      string   `json:"project"`
	SourcePath   string   `json:"source_path"`
	FilesWritten []string `json:"files_written"`
	FilesRemoved []string `json:"files_removed,omitempty"`
	UnitsStarted []string `json:"units_started"`
	Success      bool     `json:"success"`
}

type ViewData added in v0.4.1

type ViewData struct {
	Project    string         `json:"project"`
	SourcePath string         `json:"source_path"`
	Status     string         `json:"status"`
	Services   []ServiceJSON  `json:"services"`
	Resources  []ResourceJSON `json:"resources"`
}

Jump to

Keyboard shortcuts

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