# Packages
No description provided by the author
Package azure provides Azure-specific implementations used with AutoRest.
Package date provides time.Time derivatives that conform to the Swagger.io (https://swagger.io/)
defined date formats: Date and DateTime.
Package mocks provides mocks and helpers used in testing.
Package to provides helpers to ease working with pointer values of marshalled structures.
No description provided by the author
Package validation provides methods for validating parameter value using reflection.
# Functions
AfterDelay returns a SendDecorator that delays for the passed time.Duration before invoking the Sender.
AsContentType returns a PrepareDecorator that adds an HTTP Content-Type header whose value is the passed contentType.
AsDelete returns a PrepareDecorator that sets the HTTP method to DELETE.
AsFormURLEncoded returns a PrepareDecorator that adds an HTTP Content-Type header whose value is "application/x-www-form-urlencoded".
AsGet returns a PrepareDecorator that sets the HTTP method to GET.
AsHead returns a PrepareDecorator that sets the HTTP method to HEAD.
AsIs returns a SendDecorator that invokes the passed Sender without modifying the http.Request.
AsJSON returns a PrepareDecorator that adds an HTTP Content-Type header whose value is "application/json".
AsOctetStream returns a PrepareDecorator that adds the "application/octet-stream" Content-Type header.
AsOptions returns a PrepareDecorator that sets the HTTP method to OPTIONS.
AsPatch returns a PrepareDecorator that sets the HTTP method to PATCH.
AsPost returns a PrepareDecorator that sets the HTTP method to POST.
AsPut returns a PrepareDecorator that sets the HTTP method to PUT.
AsStringSlice method converts interface{} to []string.
ByClosing returns a RespondDecorator that first invokes the passed Responder after which it closes the response body.
ByClosingIfError returns a RespondDecorator that first invokes the passed Responder after which it closes the response if the passed Responder returns an error and the response body exists.
ByCopying copies the contents of the http.Response Body into the passed bytes.Buffer as the Body is read.
ByDiscardingBody returns a RespondDecorator that first invokes the passed Responder after which it copies the remaining bytes (if any) in the response body to ioutil.Discard.
ByIgnoring returns a RespondDecorator that ignores the passed http.Response passing it unexamined to the next RespondDecorator.
ByUnmarshallingJSON returns a RespondDecorator that decodes a JSON document returned in the response Body into the value pointed to by v.
ByUnmarshallingXML returns a RespondDecorator that decodes a XML document returned in the response Body into the value pointed to by v.
ChangeToGet turns the specified http.Request into a GET (it assumes it wasn't).
CopyAndDecode decodes the data from the passed io.Reader while making a copy.
CreatePreparer creates, decorates, and returns a Preparer.
CreateResponder creates, decorates, and returns a Responder.
CreateSender creates, decorates, and returns, as a Sender, the default http.Client.
DecoratePreparer accepts a Preparer and a, possibly empty, set of PrepareDecorators, which it applies to the Preparer.
DecorateResponder accepts a Responder and a, possibly empty, set of RespondDecorators, which it applies to the Responder.
DecorateSender accepts a Sender and a, possibly empty, set of SendDecorators, which is applies to the Sender.
DelayForBackoff invokes time.After for the supplied backoff duration raised to the power of passed attempt (i.e., an exponential backoff delay).
DelayWithRetryAfter invokes time.After for the duration specified in the "Retry-After" header in responses with status code 429.
DoCloseIfError returns a SendDecorator that first invokes the passed Sender after which it closes the response if the passed Sender returns an error and the response body exists.
DoErrorIfStatusCode returns a SendDecorator that emits an error if the response StatusCode is among the set passed.
DoErrorUnlessStatusCode returns a SendDecorator that emits an error unless the response StatusCode is among the set passed.
DoPollForStatusCodes returns a SendDecorator that polls if the http.Response contains one of the passed status codes.
DoRetryForAttempts returns a SendDecorator that retries a failed request for up to the specified number of attempts, exponentially backing off between requests using the supplied backoff time.Duration (which may be zero).
DoRetryForDuration returns a SendDecorator that retries the request until the total time is equal to or greater than the specified duration, exponentially backing off between requests using the supplied backoff time.Duration (which may be zero).
DoRetryForStatusCodes returns a SendDecorator that retries for specified statusCodes for up to the specified number of attempts, exponentially backing off between requests using the supplied backoff time.Duration (which may be zero).
Encode method encodes url path and query parameters.
ExtractHeader extracts all values of the specified header from the http.Response.
ExtractHeaderValue extracts the first value of the specified header from the http.Response.
GetLocation retrieves the URL from the Location header of the passed response.
GetRetryAfter extracts the retry delay from the Retry-After header of the passed response.
IsTemporaryNetworkError returns true if the specified error is a temporary network error or false if it's not.
IsTokenRefreshError returns true if the specified error implements the TokenRefreshError interface.
MapToValues method converts map[string]interface{} to url.Values.
NewAPIKeyAuthorizer creates an ApiKeyAuthorizer with headers.
NewAPIKeyAuthorizerWithHeaders creates an ApiKeyAuthorizer with headers.
NewAPIKeyAuthorizerWithQueryParameters creates an ApiKeyAuthorizer with query parameters.
NewBasicAuthorizer creates a new BasicAuthorizer with the specified username and password.
NewBearerAuthorizer crates a BearerAuthorizer using the given token provider.
NewBearerAuthorizerCallback creates a bearer authorization callback.
NewClientWithOptions returns an instance of a Client with the specified values.
NewClientWithUserAgent returns an instance of a Client with the UserAgent set to the passed string.
NewCognitiveServicesAuthorizer is.
NewDecoder creates a new decoder appropriate to the passed encoding.
NewError creates a new Error conforming object from the passed packageType, method, and message.
NewErrorWithError creates a new Error conforming object from the passed packageType, method, statusCode of the given resp (UndefinedStatusCode if resp is nil), message, and original error.
NewErrorWithResponse creates a new Error conforming object from the passed packageType, method, statusCode of the given resp (UndefinedStatusCode if resp is nil), and message.
NewEventGridKeyAuthorizer creates a new EventGridKeyAuthorizer with the specified topic key.
NewPollingRequest allocates and returns a new http.Request to poll for the passed response.
NewPollingRequestWithContext allocates and returns a new http.Request with the specified context to poll for the passed response.
NewRetriableRequest returns a wrapper around an HTTP request that support retry logic.
Prepare accepts an http.Request and a, possibly empty, set of PrepareDecorators.
Respond accepts an http.Response and a, possibly empty, set of RespondDecorators.
ResponseHasStatusCode returns true if the status code in the HTTP Response is in the passed set and false otherwise.
Send sends, by means of the default http.Client, the passed http.Request, returning the http.Response and possible error.
SendWithSender sends the passed http.Request, through the provided Sender, returning the http.Response and possible error.
String method converts interface v to string.
TeeReadCloser returns a ReadCloser that writes to w what it reads from rc.
UserAgent returns a string containing the Go version, system architecture and OS, and the go-autorest version.
Version returns the semantic version (see http://semver.org).
WithBaseURL returns a PrepareDecorator that populates the http.Request with a url.URL constructed from the supplied baseUrl.
WithBearerAuthorization returns a PrepareDecorator that adds an HTTP Authorization header whose value is "Bearer " followed by the supplied token.
WithBool returns a PrepareDecorator that encodes the passed bool into the body of the request and sets the Content-Length header.
WithCustomBaseURL returns a PrepareDecorator that replaces brace-enclosed keys within the request base URL (i.e., http.Request.URL) with the corresponding values from the passed map.
WithErrorUnlessOK returns a RespondDecorator that emits an error if the response StatusCode is anything other than HTTP 200.
WithErrorUnlessStatusCode returns a RespondDecorator that emits an error unless the response StatusCode is among the set passed.
WithEscapedPathParameters returns a PrepareDecorator that replaces brace-enclosed keys within the request path (i.e., http.Request.URL.Path) with the corresponding values from the passed map.
WithFile returns a PrepareDecorator that sends file in request body.
WithFloat32 returns a PrepareDecorator that encodes the passed float32 into the body of the request and sets the Content-Length header.
WithFloat64 returns a PrepareDecorator that encodes the passed float64 into the body of the request and sets the Content-Length header.
WithFormData returns a PrepareDecoratore that "URL encodes" (e.g., bar=baz&foo=quux) into the http.Request body.
WithHeader returns a PrepareDecorator that sets the specified HTTP header of the http.Request to the passed value.
WithHeaders returns a PrepareDecorator that sets the specified HTTP headers of the http.Request to the passed value.
WithInt32 returns a PrepareDecorator that encodes the passed int32 into the body of the request and sets the Content-Length header.
WithInt64 returns a PrepareDecorator that encodes the passed int64 into the body of the request and sets the Content-Length header.
WithJSON returns a PrepareDecorator that encodes the data passed as JSON into the body of the request and sets the Content-Length header.
WithLogging returns a SendDecorator that implements simple before and after logging of the request.
WithMethod returns a PrepareDecorator that sets the HTTP method of the passed request.
WithMultiPartFormData returns a PrepareDecoratore that "URL encodes" (e.g., bar=baz&foo=quux) form parameters into the http.Request body.
WithNothing returns a "do nothing" PrepareDecorator that makes no changes to the passed http.Request.
WithPath returns a PrepareDecorator that adds the supplied path to the request URL.
WithPathParameters returns a PrepareDecorator that replaces brace-enclosed keys within the request path (i.e., http.Request.URL.Path) with the corresponding values from the passed map.
WithQueryParameters returns a PrepareDecorators that encodes and applies the query parameters given in the supplied map (i.e., key=value).
WithString returns a PrepareDecorator that encodes the passed string into the body of the request and sets the Content-Length header.
WithUserAgent returns a PrepareDecorator that adds an HTTP User-Agent header whose value is the passed string.
# Constants
DefaultPollingDelay is a reasonable delay between polling requests.
DefaultPollingDuration is a reasonable total polling duration.
DefaultRetryAttempts is number of attempts for retry status codes (5xx).
DefaultRetryDuration is the duration to wait between retries.
EncodedAsJSON states that data is encoded as JSON.
EncodedAsXML states that data is encoded as Xml.
HeaderLocation specifies the HTTP Location header.
HeaderRetryAfter specifies the HTTP Retry-After header.
UndefinedStatusCode is used when HTTP status code is not available for an error.
# Variables
StatusCodesForRetry are a defined group of status code for which the client will retry.
# Structs
APIKeyAuthorizer implements API Key authorization.
BasicAuthorizer implements basic HTTP authorization by adding the Authorization HTTP header with the value "Basic <TOKEN>" where <TOKEN> is a base64-encoded username:password tuple.
BearerAuthorizer implements the bearer authorization.
BearerAuthorizerCallback implements bearer authorization via a callback.
Client is the base for autorest generated clients.
ClientOptions contains various Client configuration options.
CognitiveServicesAuthorizer implements authorization for Cognitive Services.
DetailedError encloses a error with details of the package, method, and associated HTTP status code (if any).
EventGridKeyAuthorizer implements authorization for event grid using key authentication.
LoggingInspector implements request and response inspectors that log the full request and response to a supplied log.
NullAuthorizer implements a default, "do nothing" Authorizer.
Response serves as the base for all responses from generated clients.
RetriableRequest provides facilities for retrying an HTTP request.
# Interfaces
Authorizer is the interface that provides a PrepareDecorator used to supply request authorization.
Decoder defines the decoding method json.Decoder and xml.Decoder share.
Preparer is the interface that wraps the Prepare method.
Responder is the interface that wraps the Respond method.
Sender is the interface that wraps the Do method to send HTTP requests.
# Type aliases
BearerAuthorizerCallbackFunc is the authentication callback signature.
EncodedAs is a series of constants specifying various data encodings.
PrepareDecorator takes and possibly decorates, by wrapping, a Preparer.
PreparerFunc is a method that implements the Preparer interface.
RespondDecorator takes and possibly decorates, by wrapping, a Responder.
ResponderFunc is a method that implements the Responder interface.
SendDecorator takes and possibly decorates, by wrapping, a Sender.
SenderFunc is a method that implements the Sender interface.