Switch to go modules
This commit is contained in:
parent
461954facb
commit
1720059244
763 changed files with 24896 additions and 177398 deletions
32
vendor/github.com/Azure/go-autorest/.gitignore
generated
vendored
32
vendor/github.com/Azure/go-autorest/.gitignore
generated
vendored
|
|
@ -1,32 +0,0 @@
|
|||
# The standard Go .gitignore file follows. (Sourced from: github.com/github/gitignore/master/Go.gitignore)
|
||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
|
||||
# Folders
|
||||
_obj
|
||||
_test
|
||||
.DS_Store
|
||||
.idea/
|
||||
.vscode/
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
[568vq].out
|
||||
|
||||
*.cgo1.go
|
||||
*.cgo2.c
|
||||
_cgo_defun.c
|
||||
_cgo_gotypes.go
|
||||
_cgo_export.*
|
||||
|
||||
_testmain.go
|
||||
|
||||
*.exe
|
||||
*.test
|
||||
*.prof
|
||||
|
||||
# go-autorest specific
|
||||
vendor/
|
||||
autorest/azure/example/example
|
||||
34
vendor/github.com/Azure/go-autorest/.travis.yml
generated
vendored
34
vendor/github.com/Azure/go-autorest/.travis.yml
generated
vendored
|
|
@ -1,34 +0,0 @@
|
|||
sudo: false
|
||||
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.10.x
|
||||
- 1.11.x
|
||||
- 1.12.x
|
||||
|
||||
env:
|
||||
global:
|
||||
- DEP_RELEASE_TAG=v0.5.1 # so the script knows which version to use
|
||||
- GOSEC_RELEASE_TAG=1.3.0
|
||||
|
||||
before_install:
|
||||
- curl -sSL https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||||
- curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $GOPATH/bin $GOSEC_RELEASE_TAG
|
||||
|
||||
install:
|
||||
- dep ensure -v
|
||||
- go install ./vendor/golang.org/x/lint/golint
|
||||
|
||||
script:
|
||||
- grep -L -r --include *.go --exclude-dir vendor -P "Copyright (\d{4}|\(c\)) Microsoft" ./ | tee /dev/stderr | test -z "$(< /dev/stdin)"
|
||||
- if [[ $TRAVIS_GO_VERSION == 1.11* ]]; then test -z "$(gofmt -s -l -w ./autorest/. | tee /dev/stderr)"; fi
|
||||
- test -z "$(golint ./autorest/... | tee /dev/stderr)"
|
||||
- go vet ./autorest/...
|
||||
#- test -z "$(gosec ./autorest/... | tee /dev/stderr | grep Error)"
|
||||
- go build -v ./autorest/...
|
||||
- go test -race -v ./autorest/...
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $GOPATH/pkg/dep
|
||||
787
vendor/github.com/Azure/go-autorest/CHANGELOG.md
generated
vendored
787
vendor/github.com/Azure/go-autorest/CHANGELOG.md
generated
vendored
|
|
@ -1,787 +0,0 @@
|
|||
# CHANGELOG
|
||||
|
||||
## v11.7.0
|
||||
|
||||
## New Features
|
||||
|
||||
- Added methods to obtain a ServicePrincipalToken on the various credential configuration types in the `auth` package.
|
||||
|
||||
## v11.6.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Fix ACR DNS endpoint for government clouds.
|
||||
- Add Cosmos DB DNS endpoints.
|
||||
- Update dependencies to resolve build breaks in OpenCensus.
|
||||
|
||||
## v11.6.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added type `autorest.BasicAuthorizer` to support Basic authentication.
|
||||
|
||||
## v11.5.2
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Fixed `GetTokenFromCLI` did not work with zsh.
|
||||
|
||||
## v11.5.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- In `Client.sender()` set the minimum TLS version on HTTP clients to 1.2.
|
||||
|
||||
## v11.5.0
|
||||
|
||||
### New Features
|
||||
|
||||
- The `auth` package has been refactored so that the environment and file settings are now available.
|
||||
- The methods used in `auth.NewAuthorizerFromEnvironment()` are now exported so that custom authorization chains can be created.
|
||||
- Added support for certificate authorization for file-based config.
|
||||
|
||||
## v11.4.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added `adal.AddToUserAgent()` so callers can append custom data to the user-agent header used for ADAL requests.
|
||||
- Exported `adal.UserAgent()` for parity with `autorest.Client`.
|
||||
|
||||
## v11.3.2
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- In `Future.WaitForCompletionRef()` if the provided context has a deadline don't add the default deadline.
|
||||
|
||||
## v11.3.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- For an LRO PUT operation the final GET URL was incorrectly set to the Location polling header in some cases.
|
||||
|
||||
## v11.3.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added method `ServicePrincipalToken()` to `DeviceFlowConfig` type.
|
||||
|
||||
## v11.2.8
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Deprecate content in the `version` package. The functionality has been superseded by content in the `autorest` package.
|
||||
|
||||
## v11.2.7
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Fix environment variable name for enabling tracing from `AZURE_SDK_TRACING_ENABELD` to `AZURE_SDK_TRACING_ENABLED`.
|
||||
Note that for backward compatibility reasons, both will work until the next major version release of the package.
|
||||
|
||||
## v11.2.6
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- If zero bytes are read from a polling response body don't attempt to unmarshal them.
|
||||
|
||||
## v11.2.5
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Removed race condition in `autorest.DoRetryForStatusCodes`.
|
||||
|
||||
## v11.2.4
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Function `cli.ProfilePath` now respects environment `AZURE_CONFIG_DIR` if available.
|
||||
|
||||
## v11.2.1
|
||||
|
||||
NOTE: Versions of Go prior to 1.10 have been removed from CI as they no
|
||||
longer work with golint.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Method `MSIConfig.Authorizer` now supports user-assigned identities.
|
||||
- The adal package now reports its own user-agent string.
|
||||
|
||||
## v11.2.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added `tracing` package that enables instrumentation of HTTP and API calls.
|
||||
Setting the env variable `AZURE_SDK_TRACING_ENABLED` or calling `tracing.Enable`
|
||||
will start instrumenting the code for metrics and traces.
|
||||
Additionally, setting the env variable `OCAGENT_TRACE_EXPORTER_ENDPOINT` or
|
||||
calling `tracing.EnableWithAIForwarding` will start the instrumentation and connect to an
|
||||
App Insights Local Forwarder that is needs to be running. Note that if the
|
||||
AI Local Forwarder is not running tracking will still be enabled.
|
||||
By default, instrumentation is disabled. Once enabled, instrumentation can also
|
||||
be programatically disabled by calling `Disable`.
|
||||
- Added `DoneWithContext` call for checking LRO status. `Done` has been deprecated.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Don't use the initial request's context for LRO polling.
|
||||
- Don't override the `refreshLock` and the `http.Client` when unmarshalling `ServicePrincipalToken` if
|
||||
it is already set.
|
||||
|
||||
## v11.1.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- When creating a future always include the polling tracker even if there's a failure; this allows the underlying response to be obtained by the caller.
|
||||
|
||||
## v11.1.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added `auth.NewAuthorizerFromCLI` to create an authorizer configured from the Azure 2.0 CLI.
|
||||
- Added `adal.NewOAuthConfigWithAPIVersion` to create an OAuthConfig with the specified API version.
|
||||
|
||||
## v11.0.1
|
||||
|
||||
### New Features
|
||||
|
||||
- Added `x5c` header to client assertion for certificate Issuer+Subject Name authentication.
|
||||
|
||||
## v11.0.0
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
- To handle differences between ADFS and AAD the following fields have had their types changed from `string` to `json.Number`
|
||||
- ExpiresIn
|
||||
- ExpiresOn
|
||||
- NotBefore
|
||||
|
||||
### New Features
|
||||
|
||||
- Added `auth.NewAuthorizerFromFileWithResource` to create an authorizer from the config file with the specified resource.
|
||||
- Setting a client's `PollingDuration` to zero will use the provided context to control a LRO's polling duration.
|
||||
|
||||
## v10.15.5
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- In `DoRetryForStatusCodes`, if a request's context is cancelled return the last response.
|
||||
|
||||
## v10.15.4
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- If a polling operation returns a failure status code return the associated error.
|
||||
|
||||
## v10.15.3
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Initialize the polling URL and method for an LRO tracker on each iteration, favoring the Azure-AsyncOperation header.
|
||||
|
||||
## v10.15.2
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Use fmt.Fprint when printing request/response so that any escape sequences aren't treated as format specifiers.
|
||||
|
||||
## v10.15.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- If an LRO API returns a `Failed` provisioning state in the initial response return an error at that point so the caller doesn't have to poll.
|
||||
- For failed LROs without an OData v4 error include the response body in the error's `AdditionalInfo` field to aid in diagnosing the failure.
|
||||
|
||||
## v10.15.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Add initial support for request/response logging via setting environment variables.
|
||||
Setting `AZURE_GO_SDK_LOG_LEVEL` to `LogInfo` will log request/response
|
||||
without their bodies. To include the bodies set the log level to `LogDebug`.
|
||||
By default the logger writes to strerr, however it can also write to stdout or a file
|
||||
if specified in `AZURE_GO_SDK_LOG_FILE`. Note that if the specified file
|
||||
already exists it will be truncated.
|
||||
IMPORTANT: by default the logger will redact the Authorization and Ocp-Apim-Subscription-Key
|
||||
headers. Any other secrets will _not_ be redacted.
|
||||
|
||||
## v10.14.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added package version that contains version constants and user-agent data.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Add the user-agent to token requests.
|
||||
|
||||
## v10.13.0
|
||||
|
||||
- Added support for additionalInfo in ServiceError type.
|
||||
|
||||
## v10.12.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added field ServicePrincipalToken.MaxMSIRefreshAttempts to configure the maximun number of attempts to refresh an MSI token.
|
||||
|
||||
## v10.11.4
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- If an LRO returns http.StatusOK on the initial response with no async headers return the response body from Future.GetResult().
|
||||
- If there is no "final GET URL" return an error from Future.GetResult().
|
||||
|
||||
## v10.11.3
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- In IMDS retry logic, if we don't receive a response don't retry.
|
||||
- Renamed the retry function so it's clear it's meant for IMDS only.
|
||||
- For error response bodies that aren't OData-v4 compliant stick the raw JSON in the ServiceError.Details field so the information isn't lost.
|
||||
- Also add the raw HTTP response to the DetailedResponse.
|
||||
- Removed superfluous wrapping of response error in azure.DoRetryWithRegistration().
|
||||
|
||||
## v10.11.2
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Validation for integers handles int and int64 types.
|
||||
|
||||
## v10.11.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Adding User information to authorization config as parsed from CLI cache.
|
||||
|
||||
## v10.11.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added NewServicePrincipalTokenFromManualTokenSecret for creating a new SPT using a manual token and secret
|
||||
- Added method ServicePrincipalToken.MarshalTokenJSON() to marshall the inner Token
|
||||
|
||||
## v10.10.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Most ServicePrincipalTokens can now be marshalled/unmarshall to/from JSON (ServicePrincipalCertificateSecret and ServicePrincipalMSISecret are not supported).
|
||||
- Added method ServicePrincipalToken.SetRefreshCallbacks().
|
||||
|
||||
## v10.9.2
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Refreshing a refresh token obtained from a web app authorization code now works.
|
||||
|
||||
## v10.9.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- The retry logic for MSI token requests now uses exponential backoff per the guidelines.
|
||||
- IsTemporaryNetworkError() will return true for errors that don't implement the net.Error interface.
|
||||
|
||||
## v10.9.0
|
||||
|
||||
### Deprecated Methods
|
||||
|
||||
| Old Method | New Method |
|
||||
| -------------------------: | :---------------------------: |
|
||||
| azure.NewFuture() | azure.NewFutureFromResponse() |
|
||||
| Future.WaitForCompletion() | Future.WaitForCompletionRef() |
|
||||
|
||||
### New Features
|
||||
|
||||
- Added azure.NewFutureFromResponse() for creating a Future from the initial response from an async operation.
|
||||
- Added Future.GetResult() for making the final GET call to retrieve the result from an async operation.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Some futures failed to return their results, this should now be fixed.
|
||||
|
||||
## v10.8.2
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Add nil-gaurd to token retry logic.
|
||||
|
||||
## v10.8.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Return a TokenRefreshError if the sender fails on the initial request.
|
||||
- Don't retry on non-temporary network errors.
|
||||
|
||||
## v10.8.0
|
||||
|
||||
- Added NewAuthorizerFromEnvironmentWithResource() helper function.
|
||||
|
||||
## v10.7.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added \*WithContext() methods to ADAL token refresh operations.
|
||||
|
||||
## v10.6.2
|
||||
|
||||
- Fixed a bug on device authentication.
|
||||
|
||||
## v10.6.1
|
||||
|
||||
- Added retries to MSI token get request.
|
||||
|
||||
## v10.6.0
|
||||
|
||||
- Changed MSI token implementation. Now, the token endpoint is the IMDS endpoint.
|
||||
|
||||
## v10.5.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- `DeviceFlowConfig.Authorizer()` now prints the device code message when running `go test`. `-v` flag is required.
|
||||
|
||||
## v10.5.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added NewPollingRequestWithContext() for use with polling asynchronous operations.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Make retry logic use the request's context instead of the deprecated Cancel object.
|
||||
|
||||
## v10.4.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added helper for parsing Azure Resource ID's.
|
||||
- Added deprecation message to utils.GetEnvVarOrExit()
|
||||
|
||||
## v10.3.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added EnvironmentFromURL method to load an Environment from a given URL. This function is particularly useful in the private and hybrid Cloud model, where one may define their own endpoints
|
||||
- Added TokenAudience endpoint to Environment structure. This is useful in private and hybrid cloud models where TokenAudience endpoint can be different from ResourceManagerEndpoint
|
||||
|
||||
## v10.2.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added endpoints for batch management.
|
||||
|
||||
## v10.1.3
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- In Client.Do() invoke WithInspection() last so that it will inspect WithAuthorization().
|
||||
- Fixed authorization methods to invoke p.Prepare() first, aligning them with the other preparers.
|
||||
|
||||
## v10.1.2
|
||||
|
||||
- Corrected comment for auth.NewAuthorizerFromFile() function.
|
||||
|
||||
## v10.1.1
|
||||
|
||||
- Updated version number to match current release.
|
||||
|
||||
## v10.1.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Expose the polling URL for futures.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Add validation.NewErrorWithValidationError back to prevent breaking changes (it is deprecated).
|
||||
|
||||
## v10.0.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added target and innererror fields to ServiceError to comply with OData v4 spec.
|
||||
- The Done() method on futures will now return a ServiceError object when available (it used to return a partial value of such errors).
|
||||
- Added helper methods for obtaining authorizers.
|
||||
- Expose the polling URL for futures.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Switched from glide to dep for dependency management.
|
||||
- Fixed unmarshaling of ServiceError for JSON bodies that don't conform to the OData spec.
|
||||
- Fixed a race condition in token refresh.
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
- The ServiceError.Details field type has been changed to match the OData v4 spec.
|
||||
- Go v1.7 has been dropped from CI.
|
||||
- API parameter validation failures will now return a unique error type validation.Error.
|
||||
- The adal.Token type has been decomposed from adal.ServicePrincipalToken (this was necessary in order to fix the token refresh race).
|
||||
|
||||
## v9.10.0
|
||||
|
||||
- Fix the Service Bus suffix in Azure public env
|
||||
- Add Service Bus Endpoint (AAD ResourceURI) for use in [Azure Service Bus RBAC Preview](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-role-based-access-control)
|
||||
|
||||
## v9.9.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added EventGridKeyAuthorizer for key authorization with event grid topics.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Fixed race condition when auto-refreshing service principal tokens.
|
||||
|
||||
## v9.8.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Added http.StatusNoContent (204) to the list of expected status codes for long-running operations.
|
||||
- Updated runtime version info so it's current.
|
||||
|
||||
## v9.8.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added type azure.AsyncOpIncompleteError to be returned from a future's Result() method when the operation has not completed.
|
||||
|
||||
## v9.7.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Use correct AAD and Graph endpoints for US Gov environment.
|
||||
|
||||
## v9.7.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added support for application/octet-stream MIME types.
|
||||
|
||||
## v9.6.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Ensure Authorization header is added to request when polling for registration status.
|
||||
|
||||
## v9.6.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added support for acquiring tokens via MSI with a user assigned identity.
|
||||
|
||||
## v9.5.3
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Don't remove encoding of existing URL Query parameters when calling autorest.WithQueryParameters.
|
||||
- Set correct Content Type when using autorest.WithFormData.
|
||||
|
||||
## v9.5.2
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Check for nil \*http.Response before dereferencing it.
|
||||
|
||||
## v9.5.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Don't count http.StatusTooManyRequests (429) against the retry cap.
|
||||
- Use retry logic when SkipResourceProviderRegistration is set to true.
|
||||
|
||||
## v9.5.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added support for username + password, API key, authoriazation code and cognitive services authentication.
|
||||
- Added field SkipResourceProviderRegistration to clients to provide a way to skip auto-registration of RPs.
|
||||
- Added utility function AsStringSlice() to convert its parameters to a string slice.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- When checking for authentication failures look at the error type not the status code as it could vary.
|
||||
|
||||
## v9.4.2
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Validate parameters when creating credentials.
|
||||
- Don't retry requests if the returned status is a 401 (http.StatusUnauthorized) as it will never succeed.
|
||||
|
||||
## v9.4.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Update the AccessTokensPath() to read access tokens path through AZURE_ACCESS_TOKEN_FILE. If this
|
||||
environment variable is not set, it will fall back to use default path set by Azure CLI.
|
||||
- Use case-insensitive string comparison for polling states.
|
||||
|
||||
## v9.4.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added WaitForCompletion() to Future as a default polling implementation.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Method Future.Done() shouldn't update polling status for unexpected HTTP status codes.
|
||||
|
||||
## v9.3.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- DoRetryForStatusCodes will retry if sender.Do returns a non-nil error.
|
||||
|
||||
## v9.3.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added PollingMethod() to Future so callers know what kind of polling mechanism is used.
|
||||
- Added azure.ChangeToGet() which transforms an http.Request into a GET (to be used with LROs).
|
||||
|
||||
## v9.2.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Added support for custom Azure Stack endpoints.
|
||||
- Added type azure.Future used to track the status of long-running operations.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Preserve the original error in DoRetryWithRegistration when registration fails.
|
||||
|
||||
## v9.1.1
|
||||
|
||||
- Fixes a bug regarding the cookie jar on `autorest.Client.Sender`.
|
||||
|
||||
## v9.1.0
|
||||
|
||||
### New Features
|
||||
|
||||
- In cases where there is a non-empty error from the service, attempt to unmarshal it instead of uniformly calling it an "Unknown" error.
|
||||
- Support for loading Azure CLI Authentication files.
|
||||
- Automatically register your subscription with the Azure Resource Provider if it hadn't been previously.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- RetriableRequest can now tolerate a ReadSeekable body being read but not reset.
|
||||
- Adding missing Apache Headers
|
||||
|
||||
## v9.0.0
|
||||
|
||||
> **IMPORTANT:** This release was intially labeled incorrectly as `v8.4.0`. From the time it was released, it should have been marked `v9.0.0` because it contains breaking changes to the MSI packages. We appologize for any inconvenience this causes.
|
||||
|
||||
Adding MSI Endpoint Support and CLI token rehydration.
|
||||
|
||||
## v8.3.1
|
||||
|
||||
Pick up bug fix in adal for MSI support.
|
||||
|
||||
## v8.3.0
|
||||
|
||||
Updates to Error string formats for clarity. Also, adding a copy of the http.Response to errors for an improved debugging experience.
|
||||
|
||||
## v8.2.0
|
||||
|
||||
### New Features
|
||||
|
||||
- Add support for bearer authentication callbacks
|
||||
- Support 429 response codes that include "Retry-After" header
|
||||
- Support validation constraint "Pattern" for map keys
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Make RetriableRequest work with multiple versions of Go
|
||||
|
||||
## v8.1.1
|
||||
|
||||
Updates the RetriableRequest to take advantage of GetBody() added in Go 1.8.
|
||||
|
||||
## v8.1.0
|
||||
|
||||
Adds RetriableRequest type for more efficient handling of retrying HTTP requests.
|
||||
|
||||
## v8.0.0
|
||||
|
||||
ADAL refactored into its own package.
|
||||
Support for UNIX time.
|
||||
|
||||
## v7.3.1
|
||||
|
||||
- Version Testing now removed from production bits that are shipped with the library.
|
||||
|
||||
## v7.3.0
|
||||
|
||||
- Exposing new `RespondDecorator`, `ByDiscardingBody`. This allows operations
|
||||
to acknowledge that they do not need either the entire or a trailing portion
|
||||
of accepts response body. In doing so, Go's http library can reuse HTTP
|
||||
connections more readily.
|
||||
- Adding `PrepareDecorator` to target custom BaseURLs.
|
||||
- Adding ACR suffix to public cloud environment.
|
||||
- Updating Glide dependencies.
|
||||
|
||||
## v7.2.5
|
||||
|
||||
- Fixed the Active Directory endpoint for the China cloud.
|
||||
- Removes UTF-8 BOM if present in response payload.
|
||||
- Added telemetry.
|
||||
|
||||
## v7.2.3
|
||||
|
||||
- Fixing bug in calls to `DelayForBackoff` that caused doubling of delay
|
||||
duration.
|
||||
|
||||
## v7.2.2
|
||||
|
||||
- autorest/azure: added ASM and ARM VM DNS suffixes.
|
||||
|
||||
## v7.2.1
|
||||
|
||||
- fixed parsing of UTC times that are not RFC3339 conformant.
|
||||
|
||||
## v7.2.0
|
||||
|
||||
- autorest/validation: Reformat validation error for better error message.
|
||||
|
||||
## v7.1.0
|
||||
|
||||
- preparer: Added support for multipart formdata - WithMultiPartFormdata()
|
||||
- preparer: Added support for sending file in request body - WithFile
|
||||
- client: Added RetryDuration parameter.
|
||||
- autorest/validation: new package for validation code for Azure Go SDK.
|
||||
|
||||
## v7.0.7
|
||||
|
||||
- Add trailing / to endpoint
|
||||
- azure: add EnvironmentFromName
|
||||
|
||||
## v7.0.6
|
||||
|
||||
- Add retry logic for 408, 500, 502, 503 and 504 status codes.
|
||||
- Change url path and query encoding logic.
|
||||
- Fix DelayForBackoff for proper exponential delay.
|
||||
- Add CookieJar in Client.
|
||||
|
||||
## v7.0.5
|
||||
|
||||
- Add check to start polling only when status is in [200,201,202].
|
||||
- Refactoring for unchecked errors.
|
||||
- azure/persist changes.
|
||||
- Fix 'file in use' issue in renewing token in deviceflow.
|
||||
- Store header RetryAfter for subsequent requests in polling.
|
||||
- Add attribute details in service error.
|
||||
|
||||
## v7.0.4
|
||||
|
||||
- Better error messages for long running operation failures
|
||||
|
||||
## v7.0.3
|
||||
|
||||
- Corrected DoPollForAsynchronous to properly handle the initial response
|
||||
|
||||
## v7.0.2
|
||||
|
||||
- Corrected DoPollForAsynchronous to continue using the polling method first discovered
|
||||
|
||||
## v7.0.1
|
||||
|
||||
- Fixed empty JSON input error in ByUnmarshallingJSON
|
||||
- Fixed polling support for GET calls
|
||||
- Changed format name from TimeRfc1123 to TimeRFC1123
|
||||
|
||||
## v7.0.0
|
||||
|
||||
- Added ByCopying responder with supporting TeeReadCloser
|
||||
- Rewrote Azure asynchronous handling
|
||||
- Reverted to only unmarshalling JSON
|
||||
- Corrected handling of RFC3339 time strings and added support for Rfc1123 time format
|
||||
|
||||
The `json.Decoder` does not catch bad data as thoroughly as `json.Unmarshal`. Since
|
||||
`encoding/json` successfully deserializes all core types, and extended types normally provide
|
||||
their custom JSON serialization handlers, the code has been reverted back to using
|
||||
`json.Unmarshal`. The original change to use `json.Decode` was made to reduce duplicate
|
||||
code; there is no loss of function, and there is a gain in accuracy, by reverting.
|
||||
|
||||
Additionally, Azure services indicate requests to be polled by multiple means. The existing code
|
||||
only checked for one of those (that is, the presence of the `Azure-AsyncOperation` header).
|
||||
The new code correctly covers all cases and aligns with the other Azure SDKs.
|
||||
|
||||
## v6.1.0
|
||||
|
||||
- Introduced `date.ByUnmarshallingJSONDate` and `date.ByUnmarshallingJSONTime` to enable JSON encoded values.
|
||||
|
||||
## v6.0.0
|
||||
|
||||
- Completely reworked the handling of polled and asynchronous requests
|
||||
- Removed unnecessary routines
|
||||
- Reworked `mocks.Sender` to replay a series of `http.Response` objects
|
||||
- Added `PrepareDecorators` for primitive types (e.g., bool, int32)
|
||||
|
||||
Handling polled and asynchronous requests is no longer part of `Client#Send`. Instead new
|
||||
`SendDecorators` implement different styles of polled behavior. See`autorest.DoPollForStatusCodes`
|
||||
and `azure.DoPollForAsynchronous` for examples.
|
||||
|
||||
## v5.0.0
|
||||
|
||||
- Added new RespondDecorators unmarshalling primitive types
|
||||
- Corrected application of inspection and authorization PrependDecorators
|
||||
|
||||
## v4.0.0
|
||||
|
||||
- Added support for Azure long-running operations.
|
||||
- Added cancelation support to all decorators and functions that may delay.
|
||||
- Breaking: `DelayForBackoff` now accepts a channel, which may be nil.
|
||||
|
||||
## v3.1.0
|
||||
|
||||
- Add support for OAuth Device Flow authorization.
|
||||
- Add support for ServicePrincipalTokens that are backed by an existing token, rather than other secret material.
|
||||
- Add helpers for persisting and restoring Tokens.
|
||||
- Increased code coverage in the github.com/Azure/autorest/azure package
|
||||
|
||||
## v3.0.0
|
||||
|
||||
- Breaking: `NewErrorWithError` no longer takes `statusCode int`.
|
||||
- Breaking: `NewErrorWithStatusCode` is replaced with `NewErrorWithResponse`.
|
||||
- Breaking: `Client#Send()` no longer takes `codes ...int` argument.
|
||||
- Add: XML unmarshaling support with `ByUnmarshallingXML()`
|
||||
- Stopped vending dependencies locally and switched to [Glide](https://github.com/Masterminds/glide).
|
||||
Applications using this library should either use Glide or vendor dependencies locally some other way.
|
||||
- Add: `azure.WithErrorUnlessStatusCode()` decorator to handle Azure errors.
|
||||
- Fix: use `net/http.DefaultClient` as base client.
|
||||
- Fix: Missing inspection for polling responses added.
|
||||
- Add: CopyAndDecode helpers.
|
||||
- Improved `./autorest/to` with `[]string` helpers.
|
||||
- Removed golint suppressions in .travis.yml.
|
||||
|
||||
## v2.1.0
|
||||
|
||||
- Added `StatusCode` to `Error` for more easily obtaining the HTTP Reponse StatusCode (if any)
|
||||
|
||||
## v2.0.0
|
||||
|
||||
- Changed `to.StringMapPtr` method signature to return a pointer
|
||||
- Changed `ServicePrincipalCertificateSecret` and `NewServicePrincipalTokenFromCertificate` to support generic certificate and private keys
|
||||
|
||||
## v1.0.0
|
||||
|
||||
- Added Logging inspectors to trace http.Request / Response
|
||||
- Added support for User-Agent header
|
||||
- Changed WithHeader PrepareDecorator to use set vs. add
|
||||
- Added JSON to error when unmarshalling fails
|
||||
- Added Client#Send method
|
||||
- Corrected case of "Azure" in package paths
|
||||
- Added "to" helpers, Azure helpers, and improved ease-of-use
|
||||
- Corrected golint issues
|
||||
|
||||
## v1.0.1
|
||||
|
||||
- Added CHANGELOG.md
|
||||
|
||||
## v1.1.0
|
||||
|
||||
- Added mechanism to retrieve a ServicePrincipalToken using a certificate-signed JWT
|
||||
- Added an example of creating a certificate-based ServicePrincipal and retrieving an OAuth token using the certificate
|
||||
|
||||
## v1.1.1
|
||||
|
||||
- Introduce godeps and vendor dependencies introduced in v1.1.1
|
||||
23
vendor/github.com/Azure/go-autorest/GNUmakefile
generated
vendored
23
vendor/github.com/Azure/go-autorest/GNUmakefile
generated
vendored
|
|
@ -1,23 +0,0 @@
|
|||
DIR?=./autorest/
|
||||
|
||||
default: build
|
||||
|
||||
build: fmt
|
||||
go install $(DIR)
|
||||
|
||||
test:
|
||||
go test $(DIR) || exit 1
|
||||
|
||||
vet:
|
||||
@echo "go vet ."
|
||||
@go vet $(DIR)... ; if [ $$? -eq 1 ]; then \
|
||||
echo ""; \
|
||||
echo "Vet found suspicious constructs. Please check the reported constructs"; \
|
||||
echo "and fix them if necessary before submitting the code for review."; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
fmt:
|
||||
gofmt -w $(DIR)
|
||||
|
||||
.PHONY: build test vet fmt
|
||||
311
vendor/github.com/Azure/go-autorest/Gopkg.lock
generated
vendored
311
vendor/github.com/Azure/go-autorest/Gopkg.lock
generated
vendored
|
|
@ -1,311 +0,0 @@
|
|||
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
|
||||
|
||||
|
||||
[[projects]]
|
||||
digest = "1:bfd9c4a3ff18fa3715d243c6dff6465eaf3c9c8cd0a61d81ce74ca0f6eb239f9"
|
||||
name = "contrib.go.opencensus.io/exporter/ocagent"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "902c0ccba68df93f7fefbe7e7c6f16be33108b40"
|
||||
version = "v0.4.9"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:fdb4ed936abeecb46a8c27dcac83f75c05c87a46d9ec7711411eb785c213fa02"
|
||||
name = "github.com/census-instrumentation/opencensus-proto"
|
||||
packages = [
|
||||
"gen-go/agent/common/v1",
|
||||
"gen-go/agent/metrics/v1",
|
||||
"gen-go/agent/trace/v1",
|
||||
"gen-go/metrics/v1",
|
||||
"gen-go/resource/v1",
|
||||
"gen-go/trace/v1",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "a105b96453fe85139acc07b68de48f2cbdd71249"
|
||||
version = "v0.2.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec"
|
||||
name = "github.com/davecgh/go-spew"
|
||||
packages = ["spew"]
|
||||
pruneopts = "UT"
|
||||
revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73"
|
||||
version = "v1.1.1"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:76dc72490af7174349349838f2fe118996381b31ea83243812a97e5a0fd5ed55"
|
||||
name = "github.com/dgrijalva/jwt-go"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e"
|
||||
version = "v3.2.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:cf0d2e435fd4ce45b789e93ef24b5f08e86be0e9807a16beb3694e2d8c9af965"
|
||||
name = "github.com/dimchansky/utfbom"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "d2133a1ce379ef6fa992b0514a77146c60db9d1c"
|
||||
version = "v1.1.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:489a99067cd08971bd9c1ee0055119ba8febc1429f9200ab0bec68d35e8c4833"
|
||||
name = "github.com/golang/protobuf"
|
||||
packages = [
|
||||
"jsonpb",
|
||||
"proto",
|
||||
"protoc-gen-go/descriptor",
|
||||
"protoc-gen-go/generator",
|
||||
"protoc-gen-go/generator/internal/remap",
|
||||
"protoc-gen-go/plugin",
|
||||
"ptypes",
|
||||
"ptypes/any",
|
||||
"ptypes/duration",
|
||||
"ptypes/struct",
|
||||
"ptypes/timestamp",
|
||||
"ptypes/wrappers",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "b5d812f8a3706043e23a9cd5babf2e5423744d30"
|
||||
version = "v1.3.1"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:4cbbca3db0ff89197d000fb2fa0b90ca4516a7fbd4d8cd9fa4bebf17df484f6d"
|
||||
name = "github.com/grpc-ecosystem/grpc-gateway"
|
||||
packages = [
|
||||
"internal",
|
||||
"runtime",
|
||||
"utilities",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "20f268a412e5b342ebfb1a0eef7c3b7bd6c260ea"
|
||||
version = "v1.8.5"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:67474f760e9ac3799f740db2c489e6423a4cde45520673ec123ac831ad849cb8"
|
||||
name = "github.com/hashicorp/golang-lru"
|
||||
packages = ["simplelru"]
|
||||
pruneopts = "UT"
|
||||
revision = "7087cb70de9f7a8bc0a10c375cb0d2280a8edf9c"
|
||||
version = "v0.5.1"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:5d231480e1c64a726869bc4142d270184c419749d34f167646baa21008eb0a79"
|
||||
name = "github.com/mitchellh/go-homedir"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "af06845cf3004701891bf4fdb884bfe4920b3727"
|
||||
version = "v1.1.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe"
|
||||
name = "github.com/pmezard/go-difflib"
|
||||
packages = ["difflib"]
|
||||
pruneopts = "UT"
|
||||
revision = "792786c7400a136282c1664665ae0a8db921c6c2"
|
||||
version = "v1.0.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:5da8ce674952566deae4dbc23d07c85caafc6cfa815b0b3e03e41979cedb8750"
|
||||
name = "github.com/stretchr/testify"
|
||||
packages = [
|
||||
"assert",
|
||||
"require",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053"
|
||||
version = "v1.3.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:006e728c96e02ac83ee246183a4b87b44b21e67e004d3a06edd891583a4bf197"
|
||||
name = "go.opencensus.io"
|
||||
packages = [
|
||||
".",
|
||||
"exemplar",
|
||||
"internal",
|
||||
"internal/tagencoding",
|
||||
"plugin/ochttp",
|
||||
"plugin/ochttp/propagation/b3",
|
||||
"plugin/ochttp/propagation/tracecontext",
|
||||
"resource",
|
||||
"stats",
|
||||
"stats/internal",
|
||||
"stats/view",
|
||||
"tag",
|
||||
"trace",
|
||||
"trace/internal",
|
||||
"trace/propagation",
|
||||
"trace/tracestate",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "3b8e2721f2c3c01fa1bf4a2e455874e7b8319cd7"
|
||||
version = "v0.19.2"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:994c4915a59f821705d08ea77b117ec7a3e6a46cc867fd194d887500dac1c3c2"
|
||||
name = "golang.org/x/crypto"
|
||||
packages = [
|
||||
"pkcs12",
|
||||
"pkcs12/internal/rc2",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "a5d413f7728c81fb97d96a2b722368945f651e78"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:340d6f630598ebfa4e9ee059a137fe928e493e837efd7cbb663dc32fef1d2b0a"
|
||||
name = "golang.org/x/lint"
|
||||
packages = [
|
||||
".",
|
||||
"golint",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "d0100b6bd8b389f0385611eb39152c4d7c3a7905"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:4512c74e2c934a151fa9246cdc565d29611f53295bfb05e7a6275e80ee540a0c"
|
||||
name = "golang.org/x/net"
|
||||
packages = [
|
||||
"context",
|
||||
"http/httpguts",
|
||||
"http2",
|
||||
"http2/hpack",
|
||||
"idna",
|
||||
"internal/timeseries",
|
||||
"trace",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "e3b2ff56ed879efa686c9d09ed74f9bfe42f1a1d"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:75515eedc0dc2cb0b40372008b616fa2841d831c63eedd403285ff286c593295"
|
||||
name = "golang.org/x/sync"
|
||||
packages = ["semaphore"]
|
||||
pruneopts = "UT"
|
||||
revision = "e225da77a7e68af35c70ccbf71af2b83e6acac3c"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:5637b3b43405643229e55140bb3049dfa7d73957ba9ecfccc31cdadbfbe0b1f9"
|
||||
name = "golang.org/x/sys"
|
||||
packages = ["unix"]
|
||||
pruneopts = "UT"
|
||||
revision = "f49334f85ddcf0f08d7fb6dd7363e9e6d6b777eb"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:a2ab62866c75542dd18d2b069fec854577a20211d7c0ea6ae746072a1dccdd18"
|
||||
name = "golang.org/x/text"
|
||||
packages = [
|
||||
"collate",
|
||||
"collate/build",
|
||||
"internal/colltab",
|
||||
"internal/gen",
|
||||
"internal/tag",
|
||||
"internal/triegen",
|
||||
"internal/ucd",
|
||||
"language",
|
||||
"secure/bidirule",
|
||||
"transform",
|
||||
"unicode/bidi",
|
||||
"unicode/cldr",
|
||||
"unicode/norm",
|
||||
"unicode/rangetable",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0"
|
||||
version = "v0.3.0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:a45ec3bb7c73e52430410dff3e0a5534ce518f72a8eb4355bc8502c546b91ecc"
|
||||
name = "golang.org/x/tools"
|
||||
packages = [
|
||||
"go/ast/astutil",
|
||||
"go/gcexportdata",
|
||||
"go/internal/gcimporter",
|
||||
"go/types/typeutil",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "5a8dccf5b48ae388eebac31f4077f14adda4dbc6"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:5f003878aabe31d7f6b842d4de32b41c46c214bb629bb485387dbcce1edf5643"
|
||||
name = "google.golang.org/api"
|
||||
packages = ["support/bundler"]
|
||||
pruneopts = "UT"
|
||||
revision = "e742f5a8defa1f9f5d723dfa04c962e680dc33f0"
|
||||
version = "v0.2.0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:5dc13cd8c0b417e12d187938d2ccb2348dda90f6d3d4a3d8402a40677a5ac982"
|
||||
name = "google.golang.org/genproto"
|
||||
packages = [
|
||||
"googleapis/api/httpbody",
|
||||
"googleapis/rpc/status",
|
||||
"protobuf/field_mask",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "e79c0c59cdb5e117ef82a6f885294df3d74065d5"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:c00eb80d7b152379c3e94c38d82b29deca98b1d0f53e4e20362589b7fcbffa07"
|
||||
name = "google.golang.org/grpc"
|
||||
packages = [
|
||||
".",
|
||||
"balancer",
|
||||
"balancer/base",
|
||||
"balancer/roundrobin",
|
||||
"binarylog/grpc_binarylog_v1",
|
||||
"codes",
|
||||
"connectivity",
|
||||
"credentials",
|
||||
"credentials/internal",
|
||||
"encoding",
|
||||
"encoding/proto",
|
||||
"grpclog",
|
||||
"internal",
|
||||
"internal/backoff",
|
||||
"internal/binarylog",
|
||||
"internal/channelz",
|
||||
"internal/envconfig",
|
||||
"internal/grpcrand",
|
||||
"internal/grpcsync",
|
||||
"internal/syscall",
|
||||
"internal/transport",
|
||||
"keepalive",
|
||||
"metadata",
|
||||
"naming",
|
||||
"peer",
|
||||
"resolver",
|
||||
"resolver/dns",
|
||||
"resolver/passthrough",
|
||||
"stats",
|
||||
"status",
|
||||
"tap",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "3507fb8e1a5ad030303c106fef3a47c9fdad16ad"
|
||||
version = "v1.19.1"
|
||||
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
analyzer-version = 1
|
||||
input-imports = [
|
||||
"contrib.go.opencensus.io/exporter/ocagent",
|
||||
"github.com/dgrijalva/jwt-go",
|
||||
"github.com/dimchansky/utfbom",
|
||||
"github.com/mitchellh/go-homedir",
|
||||
"github.com/stretchr/testify/require",
|
||||
"go.opencensus.io/plugin/ochttp",
|
||||
"go.opencensus.io/plugin/ochttp/propagation/tracecontext",
|
||||
"go.opencensus.io/stats/view",
|
||||
"go.opencensus.io/trace",
|
||||
"golang.org/x/crypto/pkcs12",
|
||||
"golang.org/x/lint/golint",
|
||||
]
|
||||
solver-name = "gps-cdcl"
|
||||
solver-version = 1
|
||||
50
vendor/github.com/Azure/go-autorest/Gopkg.toml
generated
vendored
50
vendor/github.com/Azure/go-autorest/Gopkg.toml
generated
vendored
|
|
@ -1,50 +0,0 @@
|
|||
# Gopkg.toml example
|
||||
#
|
||||
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
|
||||
# for detailed Gopkg.toml documentation.
|
||||
#
|
||||
# required = ["github.com/user/thing/cmd/thing"]
|
||||
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
|
||||
#
|
||||
# [[constraint]]
|
||||
# name = "github.com/user/project"
|
||||
# version = "1.0.0"
|
||||
#
|
||||
# [[constraint]]
|
||||
# name = "github.com/user/project2"
|
||||
# branch = "dev"
|
||||
# source = "github.com/myfork/project2"
|
||||
#
|
||||
# [[override]]
|
||||
# name = "github.com/x/y"
|
||||
# version = "2.4.0"
|
||||
|
||||
required = ["golang.org/x/lint/golint"]
|
||||
|
||||
[prune]
|
||||
unused-packages = true
|
||||
go-tests = true
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/dgrijalva/jwt-go"
|
||||
version = "3.1.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/dimchansky/utfbom"
|
||||
version = "1.0.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/mitchellh/go-homedir"
|
||||
version = "1.0.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/stretchr/testify"
|
||||
version = "1.2.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "go.opencensus.io"
|
||||
version = "0.19.2"
|
||||
|
||||
[[constraint]]
|
||||
name = "contrib.go.opencensus.io/exporter/ocagent"
|
||||
version = "0.4.5"
|
||||
149
vendor/github.com/Azure/go-autorest/README.md
generated
vendored
149
vendor/github.com/Azure/go-autorest/README.md
generated
vendored
|
|
@ -1,149 +0,0 @@
|
|||
# go-autorest
|
||||
|
||||
[](https://godoc.org/github.com/Azure/go-autorest/autorest)
|
||||
[](https://travis-ci.org/Azure/go-autorest)
|
||||
[](https://goreportcard.com/report/Azure/go-autorest)
|
||||
|
||||
Package go-autorest provides an HTTP request client for use with [Autorest](https://github.com/Azure/autorest.go)-generated API client packages.
|
||||
|
||||
An authentication client tested with Azure Active Directory (AAD) is also
|
||||
provided in this repo in the package
|
||||
`github.com/Azure/go-autorest/autorest/adal`. Despite its name, this package
|
||||
is maintained only as part of the Azure Go SDK and is not related to other
|
||||
"ADAL" libraries in [github.com/AzureAD](https://github.com/AzureAD).
|
||||
|
||||
## Overview
|
||||
|
||||
Package go-autorest implements an HTTP request pipeline suitable for use across
|
||||
multiple goroutines and provides the shared routines used by packages generated
|
||||
by [Autorest](https://github.com/Azure/autorest.go).
|
||||
|
||||
The package breaks sending and responding to HTTP requests into three phases: Preparing, Sending,
|
||||
and Responding. A typical pattern is:
|
||||
|
||||
```go
|
||||
req, err := Prepare(&http.Request{},
|
||||
token.WithAuthorization())
|
||||
|
||||
resp, err := Send(req,
|
||||
WithLogging(logger),
|
||||
DoErrorIfStatusCode(http.StatusInternalServerError),
|
||||
DoCloseIfError(),
|
||||
DoRetryForAttempts(5, time.Second))
|
||||
|
||||
err = Respond(resp,
|
||||
ByDiscardingBody(),
|
||||
ByClosing())
|
||||
```
|
||||
|
||||
Each phase relies on decorators to modify and / or manage processing. Decorators may first modify
|
||||
and then pass the data along, pass the data first and then modify the result, or wrap themselves
|
||||
around passing the data (such as a logger might do). Decorators run in the order provided. For
|
||||
example, the following:
|
||||
|
||||
```go
|
||||
req, err := Prepare(&http.Request{},
|
||||
WithBaseURL("https://microsoft.com/"),
|
||||
WithPath("a"),
|
||||
WithPath("b"),
|
||||
WithPath("c"))
|
||||
```
|
||||
|
||||
will set the URL to:
|
||||
|
||||
```
|
||||
https://microsoft.com/a/b/c
|
||||
```
|
||||
|
||||
Preparers and Responders may be shared and re-used (assuming the underlying decorators support
|
||||
sharing and re-use). Performant use is obtained by creating one or more Preparers and Responders
|
||||
shared among multiple go-routines, and a single Sender shared among multiple sending go-routines,
|
||||
all bound together by means of input / output channels.
|
||||
|
||||
Decorators hold their passed state within a closure (such as the path components in the example
|
||||
above). Be careful to share Preparers and Responders only in a context where such held state
|
||||
applies. For example, it may not make sense to share a Preparer that applies a query string from a
|
||||
fixed set of values. Similarly, sharing a Responder that reads the response body into a passed
|
||||
struct (e.g., `ByUnmarshallingJson`) is likely incorrect.
|
||||
|
||||
Errors raised by autorest objects and methods will conform to the `autorest.Error` interface.
|
||||
|
||||
See the included examples for more detail. For details on the suggested use of this package by
|
||||
generated clients, see the Client described below.
|
||||
|
||||
## Helpers
|
||||
|
||||
### Handling Swagger Dates
|
||||
|
||||
The Swagger specification (https://swagger.io) that drives AutoRest
|
||||
(https://github.com/Azure/autorest/) precisely defines two date forms: date and date-time. The
|
||||
github.com/Azure/go-autorest/autorest/date package provides time.Time derivations to ensure correct
|
||||
parsing and formatting.
|
||||
|
||||
### Handling Empty Values
|
||||
|
||||
In JSON, missing values have different semantics than empty values. This is especially true for
|
||||
services using the HTTP PATCH verb. The JSON submitted with a PATCH request generally contains
|
||||
only those values to modify. Missing values are to be left unchanged. Developers, then, require a
|
||||
means to both specify an empty value and to leave the value out of the submitted JSON.
|
||||
|
||||
The Go JSON package (`encoding/json`) supports the `omitempty` tag. When specified, it omits
|
||||
empty values from the rendered JSON. Since Go defines default values for all base types (such as ""
|
||||
for string and 0 for int) and provides no means to mark a value as actually empty, the JSON package
|
||||
treats default values as meaning empty, omitting them from the rendered JSON. This means that, using
|
||||
the Go base types encoded through the default JSON package, it is not possible to create JSON to
|
||||
clear a value at the server.
|
||||
|
||||
The workaround within the Go community is to use pointers to base types in lieu of base types within
|
||||
structures that map to JSON. For example, instead of a value of type `string`, the workaround uses
|
||||
`*string`. While this enables distinguishing empty values from those to be unchanged, creating
|
||||
pointers to a base type (notably constant, in-line values) requires additional variables. This, for
|
||||
example,
|
||||
|
||||
```go
|
||||
s := struct {
|
||||
S *string
|
||||
}{ S: &"foo" }
|
||||
```
|
||||
fails, while, this
|
||||
|
||||
```go
|
||||
v := "foo"
|
||||
s := struct {
|
||||
S *string
|
||||
}{ S: &v }
|
||||
```
|
||||
succeeds.
|
||||
|
||||
To ease using pointers, the subpackage `to` contains helpers that convert to and from pointers for
|
||||
Go base types which have Swagger analogs. It also provides a helper that converts between
|
||||
`map[string]string` and `map[string]*string`, enabling the JSON to specify that the value
|
||||
associated with a key should be cleared. With the helpers, the previous example becomes
|
||||
|
||||
```go
|
||||
s := struct {
|
||||
S *string
|
||||
}{ S: to.StringPtr("foo") }
|
||||
```
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
go get github.com/Azure/go-autorest/autorest
|
||||
go get github.com/Azure/go-autorest/autorest/azure
|
||||
go get github.com/Azure/go-autorest/autorest/date
|
||||
go get github.com/Azure/go-autorest/autorest/to
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
See LICENSE file.
|
||||
|
||||
-----
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of
|
||||
Conduct](https://opensource.microsoft.com/codeofconduct/). For more information
|
||||
see the [Code of Conduct
|
||||
FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact
|
||||
[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional
|
||||
questions or comments.
|
||||
15
vendor/github.com/Azure/go-autorest/autorest/client.go
generated
vendored
15
vendor/github.com/Azure/go-autorest/autorest/client.go
generated
vendored
|
|
@ -230,14 +230,23 @@ func (c Client) Do(r *http.Request) (*http.Response, error) {
|
|||
// sender returns the Sender to which to send requests.
|
||||
func (c Client) sender() Sender {
|
||||
if c.Sender == nil {
|
||||
j, _ := cookiejar.New(nil)
|
||||
// Use behaviour compatible with DefaultTransport, but require TLS minimum version.
|
||||
var defaultTransport = http.DefaultTransport.(*http.Transport)
|
||||
|
||||
tracing.Transport.Base = &http.Transport{
|
||||
Proxy: defaultTransport.Proxy,
|
||||
DialContext: defaultTransport.DialContext,
|
||||
MaxIdleConns: defaultTransport.MaxIdleConns,
|
||||
IdleConnTimeout: defaultTransport.IdleConnTimeout,
|
||||
TLSHandshakeTimeout: defaultTransport.TLSHandshakeTimeout,
|
||||
ExpectContinueTimeout: defaultTransport.ExpectContinueTimeout,
|
||||
TLSClientConfig: &tls.Config{
|
||||
MinVersion: tls.VersionTLS12,
|
||||
},
|
||||
}
|
||||
client := &http.Client{Jar: j, Transport: tracing.Transport}
|
||||
return client
|
||||
|
||||
j, _ := cookiejar.New(nil)
|
||||
return &http.Client{Jar: j, Transport: tracing.Transport}
|
||||
}
|
||||
|
||||
return c.Sender
|
||||
|
|
|
|||
2
vendor/github.com/Azure/go-autorest/autorest/version.go
generated
vendored
2
vendor/github.com/Azure/go-autorest/autorest/version.go
generated
vendored
|
|
@ -19,7 +19,7 @@ import (
|
|||
"runtime"
|
||||
)
|
||||
|
||||
const number = "v11.7.0"
|
||||
const number = "v11.7.1"
|
||||
|
||||
var (
|
||||
userAgent = fmt.Sprintf("Go/%s (%s-%s) go-autorest/%s",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue