Documentation
¶
Overview ¶
Package upstream validates provider endpoints before any customer-owned credential is attached to a request.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPPolicy ¶
type HTTPPolicy struct {
// contains filtered or unexported fields
}
HTTPPolicy is the HTTPS counterpart of WebSocketPolicy: an immutable host allowlist that a batch adapter checks before attaching a credential to a request. Unlike the WebSocket policy it accepts a path, because REST endpoints are path-addressed; it still refuses a preexisting query, user info, and fragment so an adapter always owns the parameters it sends.
func NewHTTPPolicy ¶
func NewHTTPPolicy(officialHost string, additionalHosts []string, allowInsecure bool) (HTTPPolicy, error)
NewHTTPPolicy builds a policy for an official provider hostname plus any additional exact hosts. A host beginning with "*." is a suffix pattern ("*.asr.api.speechmatics.com") for providers whose regional endpoints share a documented domain; the wildcard covers exactly one label.
type WebSocketPolicy ¶
type WebSocketPolicy struct {
// contains filtered or unexported fields
}
WebSocketPolicy is an immutable allowlist for one provider adapter.
func NewWebSocketPolicy ¶
func NewWebSocketPolicy(officialHost string, additionalHosts []string, allowInsecure bool) (WebSocketPolicy, error)
NewWebSocketPolicy builds a policy for an official provider hostname. Additional hosts are intended for dedicated provider deployments. A host beginning with "*." is a one-label suffix pattern, exactly as in NewHTTPPolicy, for providers that serve every customer resource on its own subdomain of a documented domain ("*.services.ai.azure.com"). Insecure WebSockets are available only as an explicit test/development override.