cli

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: Apache-2.0 Imports: 25 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

Overview

Package cli implements synctl, the SynCloud command line (§7.1).

Every API operation must have a synctl command (parity, §5.1). Commands that wrap an operation carry its operationId in Annotations[opAnnotation]; a test checks them against the OpenAPI spec.

Index

Constants

View Source
const (
	EnvProfile  = "SYNCLOUD_PROFILE"
	EnvEndpoint = "SYNCLOUD_ENDPOINT"
	EnvKeyID    = "SYNCLOUD_ACCESS_KEY_ID"
	EnvSecret   = "SYNCLOUD_SECRET_ACCESS_KEY"
	EnvToken    = "SYNCLOUD_TOKEN"
	// EnvSessionToken goes with temporary credentials (Cloud Shell, sts).
	EnvSessionToken = "SYNCLOUD_SESSION_TOKEN"
	EnvConfigDir    = "SYNCLOUD_CONFIG_DIR"
)

Environment variables override the profile (useful in CI).

Variables

This section is empty.

Functions

func ExitCode

func ExitCode(err error) int

ExitCode returns the exit code synctl should end with for err.

func NewRoot

func NewRoot(in io.Reader, out, errOut io.Writer) *cobra.Command

NewRoot returns the synctl root command.

func OperationCommands

func OperationCommands() map[string]string

OperationCommands maps each API operation to the synctl command that wraps it ("synctl services scale NAME REPLICAS"), for the API docs.

Types

type Profile

type Profile struct {
	Endpoint        string `json:"endpoint"`
	AccessKeyID     string `json:"accessKeyId,omitempty"`
	SecretAccessKey string `json:"secretAccessKey,omitempty"`
	Token           string `json:"token,omitempty"`
	// SessionToken comes with temporary credentials (synctl login, sts).
	SessionToken string     `json:"sessionToken,omitempty"`
	Expiration   *time.Time `json:"expiration,omitempty"`
}

Profile holds one named set of connection settings in ~/.syncloud/credentials (like `aws configure`, §7.1).

Jump to

Keyboard shortcuts

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