cmd

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingSSHAuth = errors.New("no SSH auth found")
)

Functions

func NewCmdAuth

func NewCmdAuth() *cobra.Command

func NewCmdAuthLogin

func NewCmdAuthLogin() *cobra.Command

func NewCmdAuthLogout

func NewCmdAuthLogout() *cobra.Command

func NewCmdAuthSignup

func NewCmdAuthSignup() *cobra.Command

func NewCmdAuthWhoAmI

func NewCmdAuthWhoAmI() *cobra.Command

func NewCmdInstall added in v0.2.5

func NewCmdInstall() *cobra.Command

func NewCmdList added in v0.2.0

func NewCmdList() *cobra.Command

func NewCmdLog added in v0.2.5

func NewCmdLog() *cobra.Command

func NewCmdProxy added in v0.2.1

func NewCmdProxy() *cobra.Command

func NewCmdRoot

func NewCmdRoot() *cobra.Command

func NewCmdRun

func NewCmdRun() *cobra.Command

func NewCmdServe

func NewCmdServe() *cobra.Command

func NewCmdTunnel added in v0.2.1

func NewCmdTunnel() *cobra.Command

Types

type AppKind added in v0.2.5

type AppKind int
const (
	AppKindUnknown AppKind = iota
	AppKindHTTP
	AppKindCLI
)

type Client

type Client struct {
	Config *ClientConfig
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg *ClientConfig) (*Client, error)

func NewClientWithDefaults

func NewClientWithDefaults() (*Client, error)

NewClientWithDefaults creates a new Charm client with default values.

func (*Client) DataPath

func (cc *Client) DataPath() (string, error)

type ClientConfig

type ClientConfig struct {
	Host    string `env:"SMALLWEB_HOST" envDefault:"smallweb.run"`
	SSHPort int    `env:"SMALLWEB_SSH_PORT" envDefault:"22"`
	Debug   bool   `env:"SMALLWEB_DEBUG" envDefault:"false"`
	KeyType string `env:"SMALLWEB_KEY_TYPE" envDefault:"ed25519"`
	DataDir string `env:"SMALLWEB_DATA_DIR" envDefault:""`
}

func ConfigFromEnv

func ConfigFromEnv() (*ClientConfig, error)

ConfigFromEnv loads the configuration from the environment.

func (*ClientConfig) KeygenType

func (cfg *ClientConfig) KeygenType() keygen.KeyType

KeygenType returns the keygen key type.

type ServerConfig

type ServerConfig struct {
	Host             string `env:"SMALLWEB_HOST" envDefault:"smallweb.run"`
	SSHPort          int    `env:"SMALLWEB_SSH_PORT" envDefault:"2222"`
	HttpPort         int    `env:"SMALLWEB_HTTP_PORT" envDefault:"8000"`
	TursoDatabaseURL string `env:"TURSO_DATABASE_URL"`
	TursoAuthToken   string `env:"TURSO_AUTH_TOKEN"`
	ValTownToken     string `env:"VALTOWN_TOKEN"`
	Debug            bool   `env:"SMALLWEB_DEBUG" envDefault:"false"`
}

func ServerConfigFromEnv

func ServerConfigFromEnv() (*ServerConfig, error)

Jump to

Keyboard shortcuts

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