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 CharsetUnknownError
- type ContextKey
Constants ¶
const UserAgent = "vksdk/" + vksdk.Version + " (+https://github.com/SevereCloud/vksdk)"
UserAgent module.
Variables ¶
This section is empty.
Functions ¶
func CharsetReader ¶
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 ¶
ContextUserAgent return User-Agent from context.
Types ¶
type CharsetUnknownError ¶
type CharsetUnknownError struct {
Name string
}
CharsetUnknownError unknown charset.
func (*CharsetUnknownError) Error ¶
func (c *CharsetUnknownError) Error() string
Error returns the message of a CharsetUnknownError.
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 GroupIDKey EventIDKey LongPollTsKey CallbackRetryCounterKey CallbackRetryAfterKey CallbackRemove EventVersionKey )
ContextKey list.