Documentation
¶
Index ¶
- Constants
- func Edit(seed string, suffix string) (string, error)
- func Flush() error
- func NewAppDeleteCommand() *cobra.Command
- func NewAppDeployCommand() *cobra.Command
- func NewAppInfoCommand() *cobra.Command
- func NewAppListCommand() *cobra.Command
- func NewAppSpecInfoCommand() *cobra.Command
- func NewAppSpecListCommand() *cobra.Command
- func NewGatewayIngressInfoCommand() *cobra.Command
- func NewGatewayIngressListCommand() *cobra.Command
- func NewGatewayIngressSetCommand() *cobra.Command
- func NewHostJoinCommand() *cobra.Command
- func NewHostListCommand() *cobra.Command
- func NewLoginCommand() *cobra.Command
- func NewPkgBuildCommand() *cobra.Command
- func NewPkgDelCommand() *cobra.Command
- func NewPkgExportCommand() *cobra.Command
- func NewPkgInfoCommand() *cobra.Command
- func NewPkgListCommand() *cobra.Command
- func NewPkgPushCommand() *cobra.Command
- func NewZoneInfoCommand() *cobra.Command
- func NewZoneInitCommand() *cobra.Command
- func NewZoneSetCommand() *cobra.Command
- func PrintCurrentZoneHint(cmd *cobra.Command)
- func Setup() error
- type ConfigCommon
- type ConfigZone
Constants ¶
const AppName = "innerstack"
Variables ¶
This section is empty.
Functions ¶
func Edit ¶
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. The file is recreated with 0600 permissions since it holds access keys.
func NewAppDeleteCommand ¶
func NewAppDeployCommand ¶
func NewAppInfoCommand ¶
func NewAppListCommand ¶
func NewAppSpecInfoCommand ¶
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 ¶
NewAppSpecListCommand creates the "app-spec-list" command for listing all application specs stored on the zonelet server.
func NewHostJoinCommand ¶
func NewHostListCommand ¶
func NewLoginCommand ¶
NewLoginCommand wires up the `login` command: a local zone credential manager. It never connects to a server; subsequent commands resolve the current zone and connect on demand.
login -n <zone> -a <host:port> -s <access-key> add or update a zone login <zone-name> switch the current zone login list configured zones
func NewPkgBuildCommand ¶
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 ¶
NewPkgDelCommand creates the "pkg-del" command for deleting packages. Removes a package and all its associated data chunks from the server.
func NewPkgExportCommand ¶
NewPkgExportCommand creates the "pkg-export" command for extracting .ipk packages. It decompresses (xz/gzip) and extracts the package file tree into a directory, the inverse of pkg-build.
func NewPkgInfoCommand ¶
NewPkgInfoCommand creates the "pkg-info" command for inspecting .ipk files. Displays package metadata and can extract the data block from the archive.
func NewPkgListCommand ¶
NewPkgListCommand creates the "pkg-list" command for listing packages. Displays packages stored on the zonelet server in a formatted table.
func NewPkgPushCommand ¶
NewPkgPushCommand creates the "pkg-push" command for uploading packages. Supports chunked upload with progress tracking and CRC32 checksum verification.
func NewZoneInfoCommand ¶
func NewZoneInitCommand ¶
func NewZoneSetCommand ¶
func PrintCurrentZoneHint ¶
PrintCurrentZoneHint writes a one-line reminder of the active zone to stderr. It helps the operator notice which zone a command will operate on when more than one zone is configured. It is a no-op when:
- the resolved command is the root (no subcommand) or `login` (which manages zone entries rather than operating on one),
- fewer than two zones are configured (nothing to disambiguate).
Output goes to stderr so it never pollutes the command's stdout (JSON, tables, ...).
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"` // full access key, format: ak_<id>_<secret>
}
ConfigZone represents a single zone accessKey
Source Files
¶
- app_delete.go
- app_deploy.go
- app_deploy_watch.go
- app_info.go
- app_list.go
- app_spec_info.go
- app_spec_list.go
- config.go
- editor.go
- gateway_ingress_info.go
- gateway_ingress_list.go
- gateway_ingress_set.go
- host_join.go
- host_list.go
- login.go
- pkg_build.go
- pkg_del.go
- pkg_export.go
- pkg_info.go
- pkg_list.go
- pkg_push.go
- zone_info.go
- zone_init.go
- zone_set.go