cli

package
v2.0.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const AppName = "innerstack"

Variables

This section is empty.

Functions

func Edit

func Edit(seed string, suffix string) (string, error)

Edit opens the user's preferred editor on a temp file pre-filled with seed and returns the edited content verbatim. A single trailing newline is trimmed to match the historical multi-line prompt behavior; everything else (inner newlines, \r\n, unicode, lines that equal "...") is preserved byte-for-byte.

Editor selection order: $INNERSTACK_EDITOR, $EDITOR, $VISUAL, then "vi". The chosen variable may contain arguments (e.g. "code --wait"), which are interpreted via "sh -c" so multi-token editors work.

suffix sets the temp file extension so editors apply syntax highlighting.

func Flush

func Flush() error

Flush writes the current configuration back to the config file.

func NewAppDeleteCommand

func NewAppDeleteCommand() *cobra.Command

func NewAppDeployCommand

func NewAppDeployCommand() *cobra.Command

func NewAppInfoCommand

func NewAppInfoCommand() *cobra.Command

func NewAppListCommand

func NewAppListCommand() *cobra.Command

func NewAppSpecInfoCommand

func NewAppSpecInfoCommand() *cobra.Command

NewAppSpecInfoCommand creates the "app-spec-info" command for looking up an application spec by name. It calls AppSpecList with a name filter on the zonelet server.

func NewAppSpecListCommand

func NewAppSpecListCommand() *cobra.Command

NewAppSpecListCommand creates the "app-spec-list" command for listing all application specs stored on the zonelet server.

func NewGatewayIngressInfoCommand

func NewGatewayIngressInfoCommand() *cobra.Command

func NewGatewayIngressListCommand

func NewGatewayIngressListCommand() *cobra.Command

func NewGatewayIngressSetCommand

func NewGatewayIngressSetCommand() *cobra.Command

func NewHostJoinCommand

func NewHostJoinCommand() *cobra.Command

func NewHostListCommand

func NewHostListCommand() *cobra.Command

func NewLoginCommand

func NewLoginCommand(rootCmd *cobra.Command) *cobra.Command

func NewPkgBuildCommand

func NewPkgBuildCommand() *cobra.Command

NewPkgBuildCommand creates the "pkg-build" command for building .ipk packages. An .ipk package is a distributable archive containing application binaries and metadata, ready for deployment to zonelet servers.

func NewPkgDelCommand

func NewPkgDelCommand() *cobra.Command

NewPkgDelCommand creates the "pkg-del" command for deleting packages. Removes a package and all its associated data chunks from the server.

func NewPkgInfoCommand

func NewPkgInfoCommand() *cobra.Command

NewPkgInfoCommand creates the "pkg-info" command for inspecting .ipk files. Displays package metadata and can extract the data block from the archive.

func NewPkgListCommand

func NewPkgListCommand() *cobra.Command

NewPkgListCommand creates the "pkg-list" command for listing packages. Displays packages stored on the zonelet server in a formatted table.

func NewPkgPushCommand

func NewPkgPushCommand() *cobra.Command

NewPkgPushCommand creates the "pkg-push" command for uploading packages. Supports chunked upload with progress tracking and CRC32 checksum verification.

func NewZoneInfoCommand

func NewZoneInfoCommand() *cobra.Command

func NewZoneInitCommand

func NewZoneInitCommand() *cobra.Command

func NewZoneSetCommand

func NewZoneSetCommand() *cobra.Command

func Setup

func Setup() error

Setup loads the CLI configuration from file

Types

type ConfigCommon

type ConfigCommon struct {
	CurrentZone string        `toml:"current_zone"`
	Zones       []*ConfigZone `toml:"zones"`
}

Config represents the CLI configuration file

var Config ConfigCommon

Config is the loaded configuration

func (*ConfigCommon) Zone

func (it *ConfigCommon) Zone(name string) (*ConfigZone, error)

Zone returns the zone config by name, or the current zone if name is empty.

type ConfigZone

type ConfigZone struct {
	Name string `toml:"name"`
	Addr string `toml:"addr"`
	AK   string `toml:"access_key"`
}

ConfigZone represents a single zone accessKey

func (*ConfigZone) AccessKey

func (c *ConfigZone) AccessKey() (*inauth.AccessKey, error)

AccessKey parses the AK string (ak_{id}_{secret}) into an AccessKey

Jump to

Keyboard shortcuts

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