Documentation ¶
Overview ¶
Package internal unimportable
Package internal unimportable
Index ¶
- Constants
- func CharsetReader(charset string, input io.Reader) (io.Reader, error)
- func ContextClient(ctx context.Context) *http.Client
- func ContextUserAgent(ctx context.Context) string
- func DoRequest(ctx context.Context, req *http.Request) (*http.Response, error)
- func XMLSanitizerReader(xml io.Reader) io.Reader
- type ContextKey
- type TokenPool
Constants ¶
const UserAgent = "vksdk/" + vksdk.Version + " (+https://github.com/SevereCloud/vksdk)"
UserAgent module.
Variables ¶
This section is empty.
Functions ¶
func CharsetReader ¶ added in v1.4.0
CharsetReader if non-nil, defines a function to generate charset-conversion readers, converting from the provided non-UTF-8 charset into UTF-8. If CharsetReader is nil or returns an error, parsing stops with an error. One of the the CharsetReader's result values must be non-nil.
func ContextClient ¶
ContextClient return *http.Client.
func ContextUserAgent ¶ added in v1.4.0
ContextUserAgent return User-Agent from context.
Types ¶
type ContextKey ¶
type ContextKey int
ContextKey is just an empty struct. It exists so HTTPClient can be an immutable public variable with a unique type. It's immutable because nobody else can create a ContextKey, being unexported.
const ( HTTPClientKey ContextKey = iota UserAgentKey )
ContextKey list.
type TokenPool ¶ added in v1.5.0
type TokenPool struct {
// contains filtered or unexported fields
}
TokenPool is a simple round-robin based token pool.
func NewTokenPool ¶ added in v1.5.0
NewTokenPool returns new token pool.