Documentation
¶
Index ¶
- Constants
- func AuthProvidersConfigured() bool
- func AwaitRoostReady(reader io.ReadCloser, timeout time.Duration) (resultErr error)
- func DefaultBaseURL(localHTTPS *LocalHTTPSConfig) string
- func DefaultHTTPSAddr() string
- func EnsureJWTKeyInWingYaml(configDir string) (string, error)
- func EnsureSelfHostedPro(store *relay.RelayStore, userID, plan string) error
- func EnvOr(key, fallback string) string
- func InstallLocalTrust(ctx context.Context, m *localtls.Material) (bool, error)
- func JwtKeyFromEnvironment() (string, error)
- func ListenerResult(result namedServerError) error
- func LoadServeRuntime(flyDataDir string) (*serveRuntime, error)
- func LocalHTTPURL(addr string) string
- func NewRelayListeners(handler http.Handler, httpAddr string, localHTTPS *LocalHTTPSConfig) *relayListeners
- func PrepareLocalHTTPAddress(addr string, explicit bool) (string, error)
- func PrintLocalCertDisclosure(m *localtls.Material)
- func RelayPolicyFromEnv() (string, time.Time, error)
- func ReplaceEnvironmentValue(environment []string, key, value string) []string
- func RoostAllowedEmailsFromEnv() ([]string, error)
- func RunRoostForeground(version string, addrFlag string, devFlag bool, ...) error
- func SaveLocalServeToken(configDir, token string) error
- func ValidateAuthProviderEnvironment() error
- func ValidateLocalHTTPSMode(requested, localMode, edgeMode bool) error
- type LocalHTTPSConfig
Constants ¶
View Source
const ( RoostReadyFDEnv = "WT_ROOST_READY_FD" RoostDaemonReadyTimeout = 10 * time.Second )
View Source
const (
DefaultLocalHTTPSAddr = "127.0.0.1:8443"
)
Variables ¶
This section is empty.
Functions ¶
func AuthProvidersConfigured ¶
func AuthProvidersConfigured() bool
func AwaitRoostReady ¶
func AwaitRoostReady(reader io.ReadCloser, timeout time.Duration) (resultErr error)
func DefaultBaseURL ¶
func DefaultBaseURL(localHTTPS *LocalHTTPSConfig) string
func DefaultHTTPSAddr ¶
func DefaultHTTPSAddr() string
func EnsureJWTKeyInWingYaml ¶
ensureJWTKeyInWingYaml loads the JWT signing key from wing.yaml, or generates one and saves it. Used by local/roost mode where there's no external secrets manager.
func EnsureSelfHostedPro ¶
func EnsureSelfHostedPro(store *relay.RelayStore, userID, plan string) error
func InstallLocalTrust ¶
func JwtKeyFromEnvironment ¶
jwtKeyFromEnvironment prefers an explicit encoded P-256 key. Existing deployments that provide only WT_JWT_SECRET get a stable, domain-separated P-256 key without another secret.
func ListenerResult ¶
func ListenerResult(result namedServerError) error
func LoadServeRuntime ¶
func LocalHTTPURL ¶
func NewRelayListeners ¶
func NewRelayListeners(handler http.Handler, httpAddr string, localHTTPS *LocalHTTPSConfig) *relayListeners
func PrepareLocalHTTPAddress ¶
func ReplaceEnvironmentValue ¶
func RunRoostForeground ¶
func SaveLocalServeToken ¶
func ValidateAuthProviderEnvironment ¶
func ValidateAuthProviderEnvironment() error
func ValidateLocalHTTPSMode ¶
Types ¶
type LocalHTTPSConfig ¶
type LocalHTTPSConfig struct {
HTTPAddr string
HTTPSAddr string
URL string
Material *localtls.Material
}
func PrepareLocalHTTPS ¶
Click to show internal directories.
Click to hide internal directories.