Documentation
¶
Overview ¶
Package env provides environment variables parsing and utils builders
Index ¶
- func BuildProxyDialer(proxyURL *url.URL) func(ctx context.Context, network string, addr string) (net.Conn, error)
- func GetAPIKey() (string, error)
- func GetAPIURL() (*url.URL, error)
- func GetBackendProxyURL() *url.URL
- func GetCertificates() (*tls.Config, error)
- func GetColorPreference() bool
- func GetFrontendProxyURL() *url.URL
- func GetHTTPClient() *http.Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildProxyDialer ¶
func BuildProxyDialer(proxyURL *url.URL) func(ctx context.Context, network string, addr string) (net.Conn, error)
BuildProxyDialer builds a proxy dialler from url
func GetAPIURL ¶ added in v0.1.16
GetAPIURL returns the escape api url Default to https://public.escape.tech if not set
func GetBackendProxyURL ¶
GetBackendProxyURL returns the proxy between the location and the customer API
func GetCertificates ¶ added in v0.2.0
GetCertificates returns the SSL certificates to use in the HTTP client
func GetColorPreference ¶ added in v0.3.10
func GetColorPreference() bool
GetColorPreference returns the color preference Default to true if not set
func GetFrontendProxyURL ¶
GetFrontendProxyURL returns the proxy between the location and the Escape Platform
func GetHTTPClient ¶ added in v0.1.16
GetHTTPClient returns a new http client with the proxy set if needed This client should be used for calls to the Escape Platform
Types ¶
This section is empty.