Documentation
¶
Index ¶
- Variables
- func NewCmdAuth() *cobra.Command
- func NewCmdAuthLogin() *cobra.Command
- func NewCmdAuthLogout() *cobra.Command
- func NewCmdAuthSignup() *cobra.Command
- func NewCmdAuthWhoAmI() *cobra.Command
- func NewCmdList() *cobra.Command
- func NewCmdOpen() *cobra.Command
- func NewCmdRoot() *cobra.Command
- func NewCmdRun() *cobra.Command
- func NewCmdServe() *cobra.Command
- func NewCmdServer() *cobra.Command
- func NewCmdUp() *cobra.Command
- type Client
- type ClientConfig
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMissingSSHAuth = errors.New("no SSH auth found")
)
Functions ¶
func NewCmdAuth ¶
func NewCmdAuthLogin ¶
func NewCmdAuthLogout ¶
func NewCmdAuthSignup ¶
func NewCmdAuthWhoAmI ¶
func NewCmdList ¶ added in v0.2.0
func NewCmdOpen ¶
func NewCmdRoot ¶
func NewCmdServe ¶
func NewCmdServer ¶
Types ¶
type Client ¶
type Client struct {
Config *ClientConfig
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(cfg *ClientConfig) (*Client, error)
func NewClientWithDefaults ¶
NewClientWithDefaults creates a new Charm client with default values.
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)
Click to show internal directories.
Click to hide internal directories.