Documentation ¶
Index ¶
Constants ¶
const ( ContentTypeAppJSON = "application/json" ContentTypeAppXML = "application/xml" )
const ( HeaderAuthorization = "Authorization" HeaderAuxiliaryAuthorization = "x-ms-authorization-auxiliary" HeaderAzureAsync = "Azure-AsyncOperation" HeaderContentLength = "Content-Length" HeaderContentType = "Content-Type" HeaderLocation = "Location" HeaderOperationLocation = "Operation-Location" HeaderRetryAfter = "Retry-After" HeaderUserAgent = "User-Agent" )
const ( // Module is the name of the calling module used in telemetry data. Module = "azcore" // Version is the semantic version (see http://semver.org) of this module. Version = "v1.1.3" )
const BearerTokenPrefix = "Bearer "
Variables ¶
This section is empty.
Functions ¶
func RetryAfter ¶
RetryAfter returns non-zero if the response contains a Retry-After header value.
Types ¶
type BytesSetter ¶ added in v1.0.0
type BytesSetter interface {
Set(b []byte)
}
BytesSetter abstracts replacing a byte slice on some type.
type CtxIncludeResponseKey ¶ added in v0.22.0
type CtxIncludeResponseKey struct{}
CtxIncludeResponseKey is used as a context key for retrieving the raw response.
type CtxWithHTTPHeaderKey ¶
type CtxWithHTTPHeaderKey struct{}
CtxWithHTTPHeaderKey is used as a context key for adding/retrieving http.Header.
type CtxWithRetryOptionsKey ¶
type CtxWithRetryOptionsKey struct{}
CtxWithRetryOptionsKey is used as a context key for adding/retrieving RetryOptions.
type NopClosingBytesReader ¶ added in v0.21.0
type NopClosingBytesReader struct {
// contains filtered or unexported fields
}
NopClosingBytesReader is an io.ReadSeekCloser around a byte slice. It also provides direct access to the byte slice to avoid rereading.
func NewNopClosingBytesReader ¶ added in v0.21.0
func NewNopClosingBytesReader(data []byte) *NopClosingBytesReader
NewNopClosingBytesReader creates a new *NopClosingBytesReader for the specified slice.
func (*NopClosingBytesReader) Bytes ¶ added in v0.21.0
func (r *NopClosingBytesReader) Bytes() []byte
Bytes returns the underlying byte slice.
func (*NopClosingBytesReader) Close ¶ added in v0.21.0
func (*NopClosingBytesReader) Close() error
Close implements the io.Closer interface.
func (*NopClosingBytesReader) Read ¶ added in v0.21.0
func (r *NopClosingBytesReader) Read(b []byte) (n int, err error)
Read implements the io.Reader interface.
func (*NopClosingBytesReader) Seek ¶ added in v0.21.0
func (r *NopClosingBytesReader) Seek(offset int64, whence int) (int64, error)
Seek implements the io.Seeker interface.
func (*NopClosingBytesReader) Set ¶ added in v0.21.0
func (r *NopClosingBytesReader) Set(b []byte)
Set replaces the existing byte slice with the specified byte slice and resets the reader.
type TransportFunc ¶ added in v1.0.0
TransportFunc is a helper to use a first-class func to satisfy the Transporter interface.