Documentation
¶
Index ¶
- func GetConfigBuilder() *configBuilder
- func GetIPsInCIRDRange(cidr string) []string
- type AllowedHostError
- type AllowedIPError
- type AllowedPortError
- type AllowedSchemeError
- type Config
- type IPv6BlockedError
- type InvalidHostError
- type SendingCredentialsBlockedError
- type WrappedClient
- func (wc *WrappedClient) CloseIdleConnections()
- func (wc *WrappedClient) Do(req *http.Request) (resp *http.Response, err error)
- func (wc *WrappedClient) Get(url string) (resp *http.Response, err error)
- func (wc *WrappedClient) Head(url string) (resp *http.Response, err error)
- func (wc *WrappedClient) Post(url string, contentType string, body io.Reader) (resp *http.Response, err error)
- func (wc *WrappedClient) PostForm(url string, data urllib.Values) (resp *http.Response, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigBuilder ¶
func GetConfigBuilder() *configBuilder
func GetIPsInCIRDRange ¶
Types ¶
type AllowedHostError ¶
type AllowedHostError struct {
// contains filtered or unexported fields
}
func (*AllowedHostError) Error ¶
func (e *AllowedHostError) Error() string
type AllowedIPError ¶
type AllowedIPError struct {
// contains filtered or unexported fields
}
func (*AllowedIPError) Error ¶
func (e *AllowedIPError) Error() string
type AllowedPortError ¶
type AllowedPortError struct {
// contains filtered or unexported fields
}
func (*AllowedPortError) Error ¶
func (e *AllowedPortError) Error() string
type AllowedSchemeError ¶
type AllowedSchemeError struct {
// contains filtered or unexported fields
}
func (*AllowedSchemeError) Error ¶
func (e *AllowedSchemeError) Error() string
type Config ¶
type Config struct {
Timeout time.Duration
CheckRedirect func(req *http.Request, via []*http.Request) error
Jar http.CookieJar
AllowedPorts []int
AllowedSchemes []string
AllowedHosts []string
BlockedIPs []net.IP
AllowedIPs []net.IP
BlockedIPsCIDR []net.IPNet
AllowedIPsCIDR []net.IPNet
AllowSendingCredentials bool
IsIPv6Enabled bool
IsDebugLoggingEnabled bool
InTestMode bool
TlsConfig *tls.Config
}
type IPv6BlockedError ¶
type IPv6BlockedError struct {
// contains filtered or unexported fields
}
func (*IPv6BlockedError) Error ¶
func (e *IPv6BlockedError) Error() string
type InvalidHostError ¶ added in v0.2.0
type InvalidHostError struct {
// contains filtered or unexported fields
}
func (*InvalidHostError) Error ¶ added in v0.2.0
func (e *InvalidHostError) Error() string
type SendingCredentialsBlockedError ¶
type SendingCredentialsBlockedError struct {
}
func (*SendingCredentialsBlockedError) Error ¶
func (e *SendingCredentialsBlockedError) Error() string
type WrappedClient ¶
func Client ¶
func Client(config *Config) *WrappedClient
func (*WrappedClient) CloseIdleConnections ¶
func (wc *WrappedClient) CloseIdleConnections()
func (*WrappedClient) Get ¶
func (wc *WrappedClient) Get(url string) (resp *http.Response, err error)
func (*WrappedClient) Head ¶
func (wc *WrappedClient) Head(url string) (resp *http.Response, err error)
Click to show internal directories.
Click to hide internal directories.