Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultBaseURL is the production Entire API origin. DefaultBaseURL = "https://entire.io" // BaseURLEnvVar overrides the Entire API origin for local development. BaseURLEnvVar = "ENTIRE_API_BASE_URL" )
Variables ¶
View Source
var ErrInsecureHTTP = errors.New("refusing to use insecure http:// base URL for authentication (use --insecure-http-auth to override)")
ErrInsecureHTTP is returned when the base URL uses HTTP without an explicit opt-in.
Functions ¶
func BaseURL ¶
func BaseURL() string
BaseURL returns the effective Entire API base URL. ENTIRE_API_BASE_URL takes precedence over the production default.
func RequireSecureURL ¶
RequireSecureURL returns ErrInsecureHTTP if the base URL uses the http scheme. Call this before making authenticated requests unless --insecure-http-auth is set.
func ResolveURL ¶
ResolveURL joins an API-relative path against the effective base URL.
func ResolveURLFromBase ¶
ResolveURLFromBase joins an API-relative path against an explicit base URL. Only http and https schemes are accepted.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.