Documentation
¶
Index ¶
Constants ¶
View Source
const (
DefaultCDNDomain = "cdn.ampproject.org"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// Host is the hostname of the backend to use.
Host string
// Front is the hostname sent in TLS SNI.
Front string
// Path is the prefix path for making requests.
Path string
// Transport is the http.RoundTripper to use to perform requests.
// If Transport is nil then http.DefaultTransport is used.
Transport http.RoundTripper
// CDNDomain is the domain suffix of the AMP CDN.
// If empty, DefaultCDNDomain is used.
CDNDomain string
// Scheme specifies the URL scheme for accessing AMP CDN.
// Scheme is either "https" or "http".
// If empty, Scheme defaults to "https".
Scheme string
// Query specifies query parameters to set for the URL.
// Defaults to "amp_js_v=0.1".
Query url.Values
}
Client desribes a client state.
type Server ¶
type Server struct {
// Handler to handle requests
Handler Handler
// Allow non-AMP remotes
AllowAllRemotes bool
// UseOldBoilerplate makes AMP encoder use
// deprecated AMP boilerplate. As it's much shorter
// than the new one, one may benefit from using it
// to save some bandwidth.
// Note that it may stop working in future.
UseOldAMPBoilerplate bool
}
Click to show internal directories.
Click to hide internal directories.