Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type ClientConfig ¶
type ClientConfig struct { Ports []PortMapping // The ports the client is tunneling ServerURL string // The server URL to connect to when handling tunnels Token string // The auth token set VIA --login }
ClientConfig will be set by the CLI app
func (*ClientConfig) NewWebSocketConfig ¶
func (c *ClientConfig) NewWebSocketConfig() (*websocket.Config, error)
NewWebSocketConfig creates a websocket.Config for CLI usage
func (*ClientConfig) WebSocketURL ¶
func (c *ClientConfig) WebSocketURL() string
WebSocketURL returns the WebSocket URL (ws:// or wss://) of the server for the client to connect to
type DatabaseConfig ¶
type DatabaseConfig struct {
Path string `env:"DB_PATH" required:"true"`
}
type PortMapping ¶
type ServerConfig ¶
type ServerConfig struct { BaseURL string `env:"SERVER_URL" required:"true"` Port string `env:"SERVER_PORT"` UseSubdomains bool `env:"USE_SUBDOMAINS" default:"false"` Auth AuthConfig Logger *slog.Logger // contains filtered or unexported fields }
func (*ServerConfig) HTTPURL ¶
func (c *ServerConfig) HTTPURL() string
HTTPURL returns the full HTTP URL of the server
func (*ServerConfig) SubdomainURL ¶
func (c *ServerConfig) SubdomainURL(id string) string
SubdomainURL converts the server's base URL to a subdomainURL based on the id using the custom logic for local development and production
Click to show internal directories.
Click to hide internal directories.