Update Azure Go SDK to v55.0.0
This commit is contained in:
@@ -1,96 +1,43 @@
|
||||
Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/compute/resource-manager/readme.md tag: `package-2019-12-01`
|
||||
|
||||
Code generator @microsoft.azure/autorest.go@2.1.178
|
||||
# Change History
|
||||
|
||||
## Additive Changes
|
||||
|
||||
### New Funcs
|
||||
|
||||
1. *ContainerServicesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ContainerServicesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *DedicatedHostsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *DedicatedHostsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *DedicatedHostsUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *DiskEncryptionSetsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *DiskEncryptionSetsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *DiskEncryptionSetsUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *DisksCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *DisksDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *DisksGrantAccessFuture.UnmarshalJSON([]byte) error
|
||||
1. *DisksRevokeAccessFuture.UnmarshalJSON([]byte) error
|
||||
1. *DisksUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *GalleriesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *GalleriesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *GalleriesUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *GalleryApplicationVersionsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *GalleryApplicationVersionsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *GalleryApplicationVersionsUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *GalleryApplicationsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *GalleryApplicationsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *GalleryApplicationsUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *GalleryImageVersionsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *GalleryImageVersionsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *GalleryImageVersionsUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *GalleryImagesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *GalleryImagesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *GalleryImagesUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ImagesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ImagesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ImagesUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *LogAnalyticsExportRequestRateByIntervalFuture.UnmarshalJSON([]byte) error
|
||||
1. *LogAnalyticsExportThrottledRequestsFuture.UnmarshalJSON([]byte) error
|
||||
1. *SnapshotsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *SnapshotsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *SnapshotsGrantAccessFuture.UnmarshalJSON([]byte) error
|
||||
1. *SnapshotsRevokeAccessFuture.UnmarshalJSON([]byte) error
|
||||
1. *SnapshotsUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineExtensionsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineExtensionsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineExtensionsUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetExtensionsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetExtensionsUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetRollingUpgradesCancelFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetVMExtensionsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetVMExtensionsUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetVMsDeallocateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetVMsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetVMsPerformMaintenanceFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetVMsPowerOffFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetVMsRedeployFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetVMsReimageAllFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetVMsReimageFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetVMsRestartFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetVMsRunCommandFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetVMsStartFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetVMsUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetsDeallocateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetsDeleteInstancesFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetsPerformMaintenanceFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetsPowerOffFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetsRedeployFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetsReimageAllFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetsReimageFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetsRestartFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetsSetOrchestrationServiceStateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetsStartFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetsUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachineScaleSetsUpdateInstancesFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachinesCaptureFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachinesConvertToManagedDisksFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachinesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachinesDeallocateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachinesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachinesPerformMaintenanceFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachinesPowerOffFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachinesReapplyFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachinesRedeployFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachinesReimageFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachinesRestartFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachinesRunCommandFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachinesStartFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualMachinesUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. AccessURI.MarshalJSON() ([]byte, error)
|
||||
1. BootDiagnosticsInstanceView.MarshalJSON() ([]byte, error)
|
||||
1. DataDiskImage.MarshalJSON() ([]byte, error)
|
||||
1. GalleryIdentifier.MarshalJSON() ([]byte, error)
|
||||
1. LogAnalyticsOperationResult.MarshalJSON() ([]byte, error)
|
||||
1. LogAnalyticsOutput.MarshalJSON() ([]byte, error)
|
||||
1. OperationListResult.MarshalJSON() ([]byte, error)
|
||||
1. OperationValueDisplay.MarshalJSON() ([]byte, error)
|
||||
1. OrchestrationServiceSummary.MarshalJSON() ([]byte, error)
|
||||
1. RecoveryWalkResponse.MarshalJSON() ([]byte, error)
|
||||
1. RegionalReplicationStatus.MarshalJSON() ([]byte, error)
|
||||
1. ReplicationStatus.MarshalJSON() ([]byte, error)
|
||||
1. ResourceSku.MarshalJSON() ([]byte, error)
|
||||
1. ResourceSkuCapabilities.MarshalJSON() ([]byte, error)
|
||||
1. ResourceSkuCapacity.MarshalJSON() ([]byte, error)
|
||||
1. ResourceSkuCosts.MarshalJSON() ([]byte, error)
|
||||
1. ResourceSkuLocationInfo.MarshalJSON() ([]byte, error)
|
||||
1. ResourceSkuRestrictionInfo.MarshalJSON() ([]byte, error)
|
||||
1. ResourceSkuRestrictions.MarshalJSON() ([]byte, error)
|
||||
1. ResourceSkuZoneDetails.MarshalJSON() ([]byte, error)
|
||||
1. RollbackStatusInfo.MarshalJSON() ([]byte, error)
|
||||
1. RollingUpgradeProgressInfo.MarshalJSON() ([]byte, error)
|
||||
1. RollingUpgradeRunningStatus.MarshalJSON() ([]byte, error)
|
||||
1. RollingUpgradeStatusInfoProperties.MarshalJSON() ([]byte, error)
|
||||
1. ShareInfoElement.MarshalJSON() ([]byte, error)
|
||||
1. SubResourceReadOnly.MarshalJSON() ([]byte, error)
|
||||
1. UpgradeOperationHistoricalStatusInfo.MarshalJSON() ([]byte, error)
|
||||
1. UpgradeOperationHistoricalStatusInfoProperties.MarshalJSON() ([]byte, error)
|
||||
1. UpgradeOperationHistoryStatus.MarshalJSON() ([]byte, error)
|
||||
1. VirtualMachineHealthStatus.MarshalJSON() ([]byte, error)
|
||||
1. VirtualMachineIdentityUserAssignedIdentitiesValue.MarshalJSON() ([]byte, error)
|
||||
1. VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue.MarshalJSON() ([]byte, error)
|
||||
1. VirtualMachineScaleSetInstanceViewStatusesSummary.MarshalJSON() ([]byte, error)
|
||||
1. VirtualMachineScaleSetSku.MarshalJSON() ([]byte, error)
|
||||
1. VirtualMachineScaleSetSkuCapacity.MarshalJSON() ([]byte, error)
|
||||
1. VirtualMachineScaleSetVMExtensionsSummary.MarshalJSON() ([]byte, error)
|
||||
1. VirtualMachineStatusCodeCount.MarshalJSON() ([]byte, error)
|
||||
|
11
vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/_meta.json
generated
vendored
Normal file
11
vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/_meta.json
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
|
||||
"readme": "/_/azure-rest-api-specs/specification/compute/resource-manager/readme.md",
|
||||
"tag": "package-2019-12-01",
|
||||
"use": "@microsoft.azure/autorest.go@2.1.183",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2019-12-01 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/compute/resource-manager/readme.md",
|
||||
"additional_properties": {
|
||||
"additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION"
|
||||
}
|
||||
}
|
311
vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go
generated
vendored
311
vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go
generated
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,23 +1,9 @@
|
||||
Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/containerregistry/resource-manager/readme.md tag: `package-2019-05`
|
||||
|
||||
Code generator @microsoft.azure/autorest.go@2.1.178
|
||||
# Change History
|
||||
|
||||
## Additive Changes
|
||||
|
||||
### New Funcs
|
||||
|
||||
1. *RegistriesCreateFuture.UnmarshalJSON([]byte) error
|
||||
1. *RegistriesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *RegistriesImportImageFuture.UnmarshalJSON([]byte) error
|
||||
1. *RegistriesScheduleRunFuture.UnmarshalJSON([]byte) error
|
||||
1. *RegistriesUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ReplicationsCreateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ReplicationsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ReplicationsUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *RunsCancelFuture.UnmarshalJSON([]byte) error
|
||||
1. *RunsUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *TasksCreateFuture.UnmarshalJSON([]byte) error
|
||||
1. *TasksDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *TasksUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *WebhooksCreateFuture.UnmarshalJSON([]byte) error
|
||||
1. *WebhooksDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *WebhooksUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. ProxyResource.MarshalJSON() ([]byte, error)
|
||||
1. ReplicationProperties.MarshalJSON() ([]byte, error)
|
||||
1. Status.MarshalJSON() ([]byte, error)
|
||||
|
11
vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/_meta.json
generated
vendored
Normal file
11
vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/_meta.json
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
|
||||
"readme": "/_/azure-rest-api-specs/specification/containerregistry/resource-manager/readme.md",
|
||||
"tag": "package-2019-05",
|
||||
"use": "@microsoft.azure/autorest.go@2.1.183",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2019-05 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerregistry/resource-manager/readme.md",
|
||||
"additional_properties": {
|
||||
"additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION"
|
||||
}
|
||||
}
|
@@ -1580,6 +1580,12 @@ type ProxyResource struct {
|
||||
Type *string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for ProxyResource.
|
||||
func (pr ProxyResource) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// QuarantinePolicy the quarantine policy for a container registry.
|
||||
type QuarantinePolicy struct {
|
||||
// Status - The value that indicates whether the policy is enabled or not. Possible values include: 'Enabled', 'Disabled'
|
||||
@@ -1621,6 +1627,7 @@ func (future *RegistriesCreateFuture) result(client RegistriesClient) (r Registr
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
r.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesCreateFuture")
|
||||
return
|
||||
}
|
||||
@@ -1663,6 +1670,7 @@ func (future *RegistriesDeleteFuture) result(client RegistriesClient) (ar autore
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesDeleteFuture")
|
||||
return
|
||||
}
|
||||
@@ -1699,6 +1707,7 @@ func (future *RegistriesImportImageFuture) result(client RegistriesClient) (ar a
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesImportImageFuture")
|
||||
return
|
||||
}
|
||||
@@ -1735,6 +1744,7 @@ func (future *RegistriesScheduleRunFuture) result(client RegistriesClient) (r Ru
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
r.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesScheduleRunFuture")
|
||||
return
|
||||
}
|
||||
@@ -1777,6 +1787,7 @@ func (future *RegistriesUpdateFuture) result(client RegistriesClient) (r Registr
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
r.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerregistry.RegistriesUpdateFuture")
|
||||
return
|
||||
}
|
||||
@@ -2502,6 +2513,12 @@ type ReplicationProperties struct {
|
||||
Status *Status `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for ReplicationProperties.
|
||||
func (rp ReplicationProperties) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// ReplicationsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
|
||||
// operation.
|
||||
type ReplicationsCreateFuture struct {
|
||||
@@ -2531,6 +2548,7 @@ func (future *ReplicationsCreateFuture) result(client ReplicationsClient) (r Rep
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
r.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsCreateFuture")
|
||||
return
|
||||
}
|
||||
@@ -2573,6 +2591,7 @@ func (future *ReplicationsDeleteFuture) result(client ReplicationsClient) (ar au
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsDeleteFuture")
|
||||
return
|
||||
}
|
||||
@@ -2609,6 +2628,7 @@ func (future *ReplicationsUpdateFuture) result(client ReplicationsClient) (r Rep
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
r.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerregistry.ReplicationsUpdateFuture")
|
||||
return
|
||||
}
|
||||
@@ -3198,6 +3218,7 @@ func (future *RunsCancelFuture) result(client RunsClient) (ar autorest.Response,
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerregistry.RunsCancelFuture")
|
||||
return
|
||||
}
|
||||
@@ -3233,6 +3254,7 @@ func (future *RunsUpdateFuture) result(client RunsClient) (r Run, err error) {
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
r.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerregistry.RunsUpdateFuture")
|
||||
return
|
||||
}
|
||||
@@ -3394,6 +3416,12 @@ type Status struct {
|
||||
Timestamp *date.Time `json:"timestamp,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for Status.
|
||||
func (s Status) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// StorageAccountProperties the properties of a storage account for a container registry. Only applicable
|
||||
// to Classic SKU.
|
||||
type StorageAccountProperties struct {
|
||||
@@ -4024,6 +4052,7 @@ func (future *TasksCreateFuture) result(client TasksClient) (t Task, err error)
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
t.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerregistry.TasksCreateFuture")
|
||||
return
|
||||
}
|
||||
@@ -4065,6 +4094,7 @@ func (future *TasksDeleteFuture) result(client TasksClient) (ar autorest.Respons
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerregistry.TasksDeleteFuture")
|
||||
return
|
||||
}
|
||||
@@ -4310,6 +4340,7 @@ func (future *TasksUpdateFuture) result(client TasksClient) (t Task, err error)
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
t.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerregistry.TasksUpdateFuture")
|
||||
return
|
||||
}
|
||||
@@ -4915,6 +4946,7 @@ func (future *WebhooksCreateFuture) result(client WebhooksClient) (w Webhook, er
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
w.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerregistry.WebhooksCreateFuture")
|
||||
return
|
||||
}
|
||||
@@ -4957,6 +4989,7 @@ func (future *WebhooksDeleteFuture) result(client WebhooksClient) (ar autorest.R
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerregistry.WebhooksDeleteFuture")
|
||||
return
|
||||
}
|
||||
@@ -4993,6 +5026,7 @@ func (future *WebhooksUpdateFuture) result(client WebhooksClient) (w Webhook, er
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
w.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerregistry.WebhooksUpdateFuture")
|
||||
return
|
||||
}
|
||||
|
@@ -1,20 +1,11 @@
|
||||
Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/containerservice/resource-manager/readme.md tag: `package-2020-04`
|
||||
|
||||
Code generator @microsoft.azure/autorest.go@2.1.178
|
||||
# Change History
|
||||
|
||||
## Additive Changes
|
||||
|
||||
### New Funcs
|
||||
|
||||
1. *AgentPoolsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *AgentPoolsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ContainerServicesCreateOrUpdateFutureType.UnmarshalJSON([]byte) error
|
||||
1. *ContainerServicesDeleteFutureType.UnmarshalJSON([]byte) error
|
||||
1. *ManagedClustersCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ManagedClustersDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ManagedClustersResetAADProfileFuture.UnmarshalJSON([]byte) error
|
||||
1. *ManagedClustersResetServicePrincipalProfileFuture.UnmarshalJSON([]byte) error
|
||||
1. *ManagedClustersRotateClusterCertificatesFuture.UnmarshalJSON([]byte) error
|
||||
1. *ManagedClustersUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *OpenShiftManagedClustersCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *OpenShiftManagedClustersDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *OpenShiftManagedClustersUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. CredentialResult.MarshalJSON() ([]byte, error)
|
||||
1. CredentialResults.MarshalJSON() ([]byte, error)
|
||||
1. OperationListResult.MarshalJSON() ([]byte, error)
|
||||
1. OperationValueDisplay.MarshalJSON() ([]byte, error)
|
||||
1. SubResource.MarshalJSON() ([]byte, error)
|
||||
|
11
vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/_meta.json
generated
vendored
Normal file
11
vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/_meta.json
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
|
||||
"readme": "/_/azure-rest-api-specs/specification/containerservice/resource-manager/readme.md",
|
||||
"tag": "package-2020-04",
|
||||
"use": "@microsoft.azure/autorest.go@2.1.183",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2020-04 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerservice/resource-manager/readme.md",
|
||||
"additional_properties": {
|
||||
"additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION"
|
||||
}
|
||||
}
|
@@ -441,6 +441,7 @@ func (future *AgentPoolsCreateOrUpdateFuture) result(client AgentPoolsClient) (a
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ap.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerservice.AgentPoolsCreateOrUpdateFuture")
|
||||
return
|
||||
}
|
||||
@@ -483,6 +484,7 @@ func (future *AgentPoolsDeleteFuture) result(client AgentPoolsClient) (ar autore
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerservice.AgentPoolsDeleteFuture")
|
||||
return
|
||||
}
|
||||
@@ -737,6 +739,7 @@ func (future *ContainerServicesCreateOrUpdateFutureType) result(client Container
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
cs.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType")
|
||||
return
|
||||
}
|
||||
@@ -779,6 +782,7 @@ func (future *ContainerServicesDeleteFutureType) result(client ContainerServices
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType")
|
||||
return
|
||||
}
|
||||
@@ -794,6 +798,12 @@ type CredentialResult struct {
|
||||
Value *[]byte `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for CredentialResult.
|
||||
func (cr CredentialResult) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// CredentialResults the list of credential result response.
|
||||
type CredentialResults struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -801,6 +811,12 @@ type CredentialResults struct {
|
||||
Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for CredentialResults.
|
||||
func (cr CredentialResults) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// CustomProfile properties to configure a custom container service cluster.
|
||||
type CustomProfile struct {
|
||||
// Orchestrator - The name of the custom orchestrator to use.
|
||||
@@ -1929,6 +1945,7 @@ func (future *ManagedClustersCreateOrUpdateFuture) result(client ManagedClusters
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
mc.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersCreateOrUpdateFuture")
|
||||
return
|
||||
}
|
||||
@@ -1971,6 +1988,7 @@ func (future *ManagedClustersDeleteFuture) result(client ManagedClustersClient)
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersDeleteFuture")
|
||||
return
|
||||
}
|
||||
@@ -2024,6 +2042,7 @@ func (future *ManagedClustersResetAADProfileFuture) result(client ManagedCluster
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetAADProfileFuture")
|
||||
return
|
||||
}
|
||||
@@ -2060,6 +2079,7 @@ func (future *ManagedClustersResetServicePrincipalProfileFuture) result(client M
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetServicePrincipalProfileFuture")
|
||||
return
|
||||
}
|
||||
@@ -2096,6 +2116,7 @@ func (future *ManagedClustersRotateClusterCertificatesFuture) result(client Mana
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersRotateClusterCertificatesFuture")
|
||||
return
|
||||
}
|
||||
@@ -2132,6 +2153,7 @@ func (future *ManagedClustersUpdateTagsFuture) result(client ManagedClustersClie
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
mc.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersUpdateTagsFuture")
|
||||
return
|
||||
}
|
||||
@@ -2880,6 +2902,7 @@ func (future *OpenShiftManagedClustersCreateOrUpdateFuture) result(client OpenSh
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
osmc.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersCreateOrUpdateFuture")
|
||||
return
|
||||
}
|
||||
@@ -2922,6 +2945,7 @@ func (future *OpenShiftManagedClustersDeleteFuture) result(client OpenShiftManag
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersDeleteFuture")
|
||||
return
|
||||
}
|
||||
@@ -2958,6 +2982,7 @@ func (future *OpenShiftManagedClustersUpdateTagsFuture) result(client OpenShiftM
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
osmc.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersUpdateTagsFuture")
|
||||
return
|
||||
}
|
||||
@@ -2997,6 +3022,12 @@ type OperationListResult struct {
|
||||
Value *[]OperationValue `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for OperationListResult.
|
||||
func (olr OperationListResult) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// OperationValue describes the properties of a Compute Operation value.
|
||||
type OperationValue struct {
|
||||
// Origin - READ-ONLY; The origin of the compute operation.
|
||||
@@ -3070,6 +3101,12 @@ type OperationValueDisplay struct {
|
||||
Provider *string `json:"provider,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for OperationValueDisplay.
|
||||
func (ovd OperationValueDisplay) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// OrchestratorProfile contains information about orchestrator.
|
||||
type OrchestratorProfile struct {
|
||||
// OrchestratorType - Orchestrator type.
|
||||
@@ -3310,6 +3347,12 @@ type SubResource struct {
|
||||
Type *string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for SubResource.
|
||||
func (sr SubResource) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// TagsObject tags object for patch operations.
|
||||
type TagsObject struct {
|
||||
// Tags - Resource tags.
|
||||
|
@@ -1,186 +1,28 @@
|
||||
Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/network/resource-manager/readme.md tag: `package-2019-06`
|
||||
|
||||
Code generator @microsoft.azure/autorest.go@2.1.178
|
||||
# Change History
|
||||
|
||||
## Additive Changes
|
||||
|
||||
### New Funcs
|
||||
|
||||
1. *ApplicationGatewaysBackendHealthFuture.UnmarshalJSON([]byte) error
|
||||
1. *ApplicationGatewaysBackendHealthOnDemandFuture.UnmarshalJSON([]byte) error
|
||||
1. *ApplicationGatewaysCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ApplicationGatewaysDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ApplicationGatewaysStartFuture.UnmarshalJSON([]byte) error
|
||||
1. *ApplicationGatewaysStopFuture.UnmarshalJSON([]byte) error
|
||||
1. *ApplicationGatewaysUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *ApplicationSecurityGroupsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ApplicationSecurityGroupsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ApplicationSecurityGroupsUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *AzureFirewallsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *AzureFirewallsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *BastionHostsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *BastionHostsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *BastionHostsUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *ConnectionMonitorsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ConnectionMonitorsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ConnectionMonitorsQueryFuture.UnmarshalJSON([]byte) error
|
||||
1. *ConnectionMonitorsStartFuture.UnmarshalJSON([]byte) error
|
||||
1. *ConnectionMonitorsStopFuture.UnmarshalJSON([]byte) error
|
||||
1. *DdosCustomPoliciesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *DdosCustomPoliciesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *DdosCustomPoliciesUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *DdosProtectionPlansCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *DdosProtectionPlansDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *DdosProtectionPlansUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCircuitAuthorizationsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCircuitConnectionsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCircuitConnectionsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCircuitPeeringsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCircuitPeeringsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCircuitsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCircuitsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCircuitsListArpTableFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCircuitsListRoutesTableFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCircuitsListRoutesTableSummaryFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCircuitsUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteConnectionsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteConnectionsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCrossConnectionPeeringsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCrossConnectionsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCrossConnectionsListArpTableFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCrossConnectionsListRoutesTableFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteCrossConnectionsUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteGatewaysCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRouteGatewaysDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRoutePortsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRoutePortsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ExpressRoutePortsUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *FirewallPoliciesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *FirewallPoliciesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *FirewallPolicyRuleGroupsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *FirewallPolicyRuleGroupsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *InboundNatRulesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *InboundNatRulesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *InterfaceTapConfigurationsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *InterfaceTapConfigurationsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *InterfacesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *InterfacesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *InterfacesGetEffectiveRouteTableFuture.UnmarshalJSON([]byte) error
|
||||
1. *InterfacesListEffectiveNetworkSecurityGroupsFuture.UnmarshalJSON([]byte) error
|
||||
1. *InterfacesUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *LoadBalancersCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *LoadBalancersDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *LoadBalancersUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *LocalNetworkGatewaysCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *LocalNetworkGatewaysDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *LocalNetworkGatewaysUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *NatGatewaysCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *NatGatewaysDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *P2sVpnGatewaysCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *P2sVpnGatewaysDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *P2sVpnGatewaysGenerateVpnProfileFuture.UnmarshalJSON([]byte) error
|
||||
1. *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture.UnmarshalJSON([]byte) error
|
||||
1. *P2sVpnGatewaysUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *P2sVpnServerConfigurationsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *P2sVpnServerConfigurationsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *PacketCapturesCreateFuture.UnmarshalJSON([]byte) error
|
||||
1. *PacketCapturesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *PacketCapturesGetStatusFuture.UnmarshalJSON([]byte) error
|
||||
1. *PacketCapturesStopFuture.UnmarshalJSON([]byte) error
|
||||
1. *PrivateEndpointsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *PrivateEndpointsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture.UnmarshalJSON([]byte) error
|
||||
1. *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture.UnmarshalJSON([]byte) error
|
||||
1. *PrivateLinkServicesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *PrivateLinkServicesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *PrivateLinkServicesDeletePrivateEndpointConnectionFuture.UnmarshalJSON([]byte) error
|
||||
1. *ProfilesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *PublicIPAddressesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *PublicIPAddressesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *PublicIPAddressesUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *PublicIPPrefixesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *PublicIPPrefixesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *PublicIPPrefixesUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *RouteFilterRulesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *RouteFilterRulesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *RouteFilterRulesUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *RouteFiltersCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *RouteFiltersDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *RouteFiltersUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *RouteTablesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *RouteTablesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *RouteTablesUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *RoutesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *RoutesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *SecurityGroupsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *SecurityGroupsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *SecurityGroupsUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *SecurityRulesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *SecurityRulesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ServiceEndpointPoliciesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ServiceEndpointPoliciesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *ServiceEndpointPoliciesUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ServiceEndpointPolicyDefinitionsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *SubnetsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *SubnetsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *SubnetsPrepareNetworkPoliciesFuture.UnmarshalJSON([]byte) error
|
||||
1. *SubnetsUnprepareNetworkPoliciesFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualHubsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualHubsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualHubsUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewayConnectionsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewayConnectionsResetSharedKeyFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewayConnectionsSetSharedKeyFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewayConnectionsUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewaysCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewaysDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewaysGenerateVpnProfileFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewaysGeneratevpnclientpackageFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewaysGetAdvertisedRoutesFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewaysGetBgpPeerStatusFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewaysGetLearnedRoutesFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewaysResetFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkGatewaysUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkPeeringsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkPeeringsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkTapsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkTapsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworkTapsUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworksCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworksDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualNetworksUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualWansCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualWansDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *VirtualWansUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *VpnConnectionsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VpnConnectionsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *VpnGatewaysCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VpnGatewaysDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *VpnGatewaysResetFuture.UnmarshalJSON([]byte) error
|
||||
1. *VpnGatewaysUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *VpnSitesConfigurationDownloadFuture.UnmarshalJSON([]byte) error
|
||||
1. *VpnSitesCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *VpnSitesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *VpnSitesUpdateTagsFuture.UnmarshalJSON([]byte) error
|
||||
1. *WatchersCheckConnectivityFuture.UnmarshalJSON([]byte) error
|
||||
1. *WatchersDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *WatchersGetAzureReachabilityReportFuture.UnmarshalJSON([]byte) error
|
||||
1. *WatchersGetFlowLogStatusFuture.UnmarshalJSON([]byte) error
|
||||
1. *WatchersGetNetworkConfigurationDiagnosticFuture.UnmarshalJSON([]byte) error
|
||||
1. *WatchersGetNextHopFuture.UnmarshalJSON([]byte) error
|
||||
1. *WatchersGetTroubleshootingFuture.UnmarshalJSON([]byte) error
|
||||
1. *WatchersGetTroubleshootingResultFuture.UnmarshalJSON([]byte) error
|
||||
1. *WatchersGetVMSecurityRulesFuture.UnmarshalJSON([]byte) error
|
||||
1. *WatchersListAvailableProvidersFuture.UnmarshalJSON([]byte) error
|
||||
1. *WatchersSetFlowLogConfigurationFuture.UnmarshalJSON([]byte) error
|
||||
1. *WatchersVerifyIPFlowFuture.UnmarshalJSON([]byte) error
|
||||
1. *WebApplicationFirewallPoliciesDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. ApplicationSecurityGroupPropertiesFormat.MarshalJSON() ([]byte, error)
|
||||
1. AzureFirewallFqdnTagPropertiesFormat.MarshalJSON() ([]byte, error)
|
||||
1. BgpPeerStatus.MarshalJSON() ([]byte, error)
|
||||
1. ConfigurationDiagnosticResponse.MarshalJSON() ([]byte, error)
|
||||
1. ConnectivityHop.MarshalJSON() ([]byte, error)
|
||||
1. ConnectivityInformation.MarshalJSON() ([]byte, error)
|
||||
1. ConnectivityIssue.MarshalJSON() ([]byte, error)
|
||||
1. ContainerNetworkInterfaceIPConfigurationPropertiesFormat.MarshalJSON() ([]byte, error)
|
||||
1. DdosProtectionPlanPropertiesFormat.MarshalJSON() ([]byte, error)
|
||||
1. ExpressRouteConnectionID.MarshalJSON() ([]byte, error)
|
||||
1. ExpressRoutePortsLocationBandwidths.MarshalJSON() ([]byte, error)
|
||||
1. GatewayRoute.MarshalJSON() ([]byte, error)
|
||||
1. ManagedServiceIdentityUserAssignedIdentitiesValue.MarshalJSON() ([]byte, error)
|
||||
1. ServiceTagInformation.MarshalJSON() ([]byte, error)
|
||||
1. ServiceTagInformationPropertiesFormat.MarshalJSON() ([]byte, error)
|
||||
1. ServiceTagsListResult.MarshalJSON() ([]byte, error)
|
||||
1. TunnelConnectionHealth.MarshalJSON() ([]byte, error)
|
||||
1. VirtualNetworkUsage.MarshalJSON() ([]byte, error)
|
||||
1. VirtualNetworkUsageName.MarshalJSON() ([]byte, error)
|
||||
1. VpnClientConnectionHealthDetail.MarshalJSON() ([]byte, error)
|
||||
1. VpnSiteID.MarshalJSON() ([]byte, error)
|
||||
1. WebApplicationFirewallPolicyListResult.MarshalJSON() ([]byte, error)
|
||||
|
11
vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/_meta.json
generated
vendored
Normal file
11
vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/_meta.json
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
|
||||
"readme": "/_/azure-rest-api-specs/specification/network/resource-manager/readme.md",
|
||||
"tag": "package-2019-06",
|
||||
"use": "@microsoft.azure/autorest.go@2.1.183",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2019-06 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/network/resource-manager/readme.md",
|
||||
"additional_properties": {
|
||||
"additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION"
|
||||
}
|
||||
}
|
311
vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go
generated
vendored
311
vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go
generated
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,18 +1,11 @@
|
||||
Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/resources/resource-manager/readme.md tag: `package-resources-2017-05`
|
||||
|
||||
Code generator @microsoft.azure/autorest.go@2.1.178
|
||||
# Change History
|
||||
|
||||
## Additive Changes
|
||||
|
||||
### New Funcs
|
||||
|
||||
1. *CreateOrUpdateByIDFuture.UnmarshalJSON([]byte) error
|
||||
1. *CreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *DeleteByIDFuture.UnmarshalJSON([]byte) error
|
||||
1. *DeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *DeploymentsCreateOrUpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *DeploymentsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *GroupsDeleteFuture.UnmarshalJSON([]byte) error
|
||||
1. *MoveResourcesFuture.UnmarshalJSON([]byte) error
|
||||
1. *UpdateByIDFuture.UnmarshalJSON([]byte) error
|
||||
1. *UpdateFuture.UnmarshalJSON([]byte) error
|
||||
1. *ValidateMoveResourcesFuture.UnmarshalJSON([]byte) error
|
||||
1. DeploymentOperationProperties.MarshalJSON() ([]byte, error)
|
||||
1. ErrorAdditionalInfo.MarshalJSON() ([]byte, error)
|
||||
1. ErrorResponse.MarshalJSON() ([]byte, error)
|
||||
1. GroupProperties.MarshalJSON() ([]byte, error)
|
||||
1. ManagementErrorWithDetails.MarshalJSON() ([]byte, error)
|
||||
|
11
vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/_meta.json
generated
vendored
Normal file
11
vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/_meta.json
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
|
||||
"readme": "/_/azure-rest-api-specs/specification/resources/resource-manager/readme.md",
|
||||
"tag": "package-resources-2017-05",
|
||||
"use": "@microsoft.azure/autorest.go@2.1.183",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-resources-2017-05 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/resources/resource-manager/readme.md",
|
||||
"additional_properties": {
|
||||
"additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION"
|
||||
}
|
||||
}
|
@@ -80,6 +80,7 @@ func (future *CreateOrUpdateByIDFuture) result(client Client) (gr GenericResourc
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
gr.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateByIDFuture")
|
||||
return
|
||||
}
|
||||
@@ -122,6 +123,7 @@ func (future *CreateOrUpdateFuture) result(client Client) (gr GenericResource, e
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
gr.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateFuture")
|
||||
return
|
||||
}
|
||||
@@ -169,6 +171,7 @@ func (future *DeleteByIDFuture) result(client Client) (ar autorest.Response, err
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("resources.DeleteByIDFuture")
|
||||
return
|
||||
}
|
||||
@@ -204,6 +207,7 @@ func (future *DeleteFuture) result(client Client) (ar autorest.Response, err err
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("resources.DeleteFuture")
|
||||
return
|
||||
}
|
||||
@@ -473,6 +477,12 @@ type DeploymentOperationProperties struct {
|
||||
Response *HTTPMessage `json:"response,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for DeploymentOperationProperties.
|
||||
func (dop DeploymentOperationProperties) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// DeploymentOperationsListResult list of deployment operations.
|
||||
type DeploymentOperationsListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -748,6 +758,7 @@ func (future *DeploymentsCreateOrUpdateFuture) result(client DeploymentsClient)
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
de.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
|
||||
return
|
||||
}
|
||||
@@ -790,6 +801,7 @@ func (future *DeploymentsDeleteFuture) result(client DeploymentsClient) (ar auto
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
|
||||
return
|
||||
}
|
||||
@@ -814,6 +826,12 @@ type ErrorAdditionalInfo struct {
|
||||
Info interface{} `json:"info,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for ErrorAdditionalInfo.
|
||||
func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for
|
||||
// failed operations. (This also follows the OData error response format.)
|
||||
type ErrorResponse struct {
|
||||
@@ -829,6 +847,12 @@ type ErrorResponse struct {
|
||||
AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for ErrorResponse.
|
||||
func (er ErrorResponse) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// ExportTemplateRequest export resource group template request parameters.
|
||||
type ExportTemplateRequest struct {
|
||||
// ResourcesProperty - The IDs of the resources to filter the export by. To export all resources, supply an array with single entry '*'.
|
||||
@@ -1223,6 +1247,12 @@ type GroupProperties struct {
|
||||
ProvisioningState *string `json:"provisioningState,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for GroupProperties.
|
||||
func (gp GroupProperties) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// GroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
|
||||
type GroupsDeleteFuture struct {
|
||||
azure.FutureAPI
|
||||
@@ -1251,6 +1281,7 @@ func (future *GroupsDeleteFuture) result(client GroupsClient) (ar autorest.Respo
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
|
||||
return
|
||||
}
|
||||
@@ -1463,6 +1494,12 @@ type ManagementErrorWithDetails struct {
|
||||
Details *[]ManagementErrorWithDetails `json:"details,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for ManagementErrorWithDetails.
|
||||
func (mewd ManagementErrorWithDetails) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// MoveInfo parameters of move resources.
|
||||
type MoveInfo struct {
|
||||
// ResourcesProperty - The IDs of the resources.
|
||||
@@ -1500,6 +1537,7 @@ func (future *MoveResourcesFuture) result(client Client) (ar autorest.Response,
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
|
||||
return
|
||||
}
|
||||
@@ -2099,6 +2137,7 @@ func (future *UpdateByIDFuture) result(client Client) (gr GenericResource, err e
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
gr.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("resources.UpdateByIDFuture")
|
||||
return
|
||||
}
|
||||
@@ -2140,6 +2179,7 @@ func (future *UpdateFuture) result(client Client) (gr GenericResource, err error
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
gr.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
|
||||
return
|
||||
}
|
||||
@@ -2182,6 +2222,7 @@ func (future *ValidateMoveResourcesFuture) result(client Client) (ar autorest.Re
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("resources.ValidateMoveResourcesFuture")
|
||||
return
|
||||
}
|
||||
|
@@ -1,10 +1,36 @@
|
||||
Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/storage/resource-manager/readme.md tag: `package-2019-06`
|
||||
|
||||
Code generator @microsoft.azure/autorest.go@2.1.178
|
||||
# Change History
|
||||
|
||||
## Additive Changes
|
||||
|
||||
### New Funcs
|
||||
|
||||
1. *AccountsCreateFuture.UnmarshalJSON([]byte) error
|
||||
1. *AccountsFailoverFuture.UnmarshalJSON([]byte) error
|
||||
1. *AccountsRestoreBlobRangesFuture.UnmarshalJSON([]byte) error
|
||||
1. AccountInternetEndpoints.MarshalJSON() ([]byte, error)
|
||||
1. AccountKey.MarshalJSON() ([]byte, error)
|
||||
1. AccountListKeysResult.MarshalJSON() ([]byte, error)
|
||||
1. AccountListResult.MarshalJSON() ([]byte, error)
|
||||
1. AccountMicrosoftEndpoints.MarshalJSON() ([]byte, error)
|
||||
1. AzureEntityResource.MarshalJSON() ([]byte, error)
|
||||
1. BlobRestoreStatus.MarshalJSON() ([]byte, error)
|
||||
1. BlobServiceItems.MarshalJSON() ([]byte, error)
|
||||
1. CheckNameAvailabilityResult.MarshalJSON() ([]byte, error)
|
||||
1. EncryptionScopeListResult.MarshalJSON() ([]byte, error)
|
||||
1. FileServiceItems.MarshalJSON() ([]byte, error)
|
||||
1. FileShareItems.MarshalJSON() ([]byte, error)
|
||||
1. GeoReplicationStats.MarshalJSON() ([]byte, error)
|
||||
1. ListAccountSasResponse.MarshalJSON() ([]byte, error)
|
||||
1. ListContainerItems.MarshalJSON() ([]byte, error)
|
||||
1. ListQueueResource.MarshalJSON() ([]byte, error)
|
||||
1. ListQueueServices.MarshalJSON() ([]byte, error)
|
||||
1. ListServiceSasResponse.MarshalJSON() ([]byte, error)
|
||||
1. ListTableResource.MarshalJSON() ([]byte, error)
|
||||
1. ListTableServices.MarshalJSON() ([]byte, error)
|
||||
1. PrivateEndpoint.MarshalJSON() ([]byte, error)
|
||||
1. ProxyResource.MarshalJSON() ([]byte, error)
|
||||
1. Resource.MarshalJSON() ([]byte, error)
|
||||
1. SKUCapability.MarshalJSON() ([]byte, error)
|
||||
1. SkuListResult.MarshalJSON() ([]byte, error)
|
||||
1. TableProperties.MarshalJSON() ([]byte, error)
|
||||
1. TagProperty.MarshalJSON() ([]byte, error)
|
||||
1. UpdateHistoryProperty.MarshalJSON() ([]byte, error)
|
||||
1. Usage.MarshalJSON() ([]byte, error)
|
||||
1. UsageName.MarshalJSON() ([]byte, error)
|
||||
|
11
vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/_meta.json
generated
vendored
Normal file
11
vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/_meta.json
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
|
||||
"readme": "/_/azure-rest-api-specs/specification/storage/resource-manager/readme.md",
|
||||
"tag": "package-2019-06",
|
||||
"use": "@microsoft.azure/autorest.go@2.1.183",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2019-06 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/storage/resource-manager/readme.md",
|
||||
"additional_properties": {
|
||||
"additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION"
|
||||
}
|
||||
}
|
183
vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go
generated
vendored
183
vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go
generated
vendored
@@ -288,6 +288,12 @@ type AccountInternetEndpoints struct {
|
||||
Dfs *string `json:"dfs,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for AccountInternetEndpoints.
|
||||
func (aie AccountInternetEndpoints) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// AccountKey an access key for the storage account.
|
||||
type AccountKey struct {
|
||||
// KeyName - READ-ONLY; Name of the key.
|
||||
@@ -298,6 +304,12 @@ type AccountKey struct {
|
||||
Permissions KeyPermission `json:"permissions,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for AccountKey.
|
||||
func (ak AccountKey) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// AccountListKeysResult the response from the ListKeys operation.
|
||||
type AccountListKeysResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -305,6 +317,12 @@ type AccountListKeysResult struct {
|
||||
Keys *[]AccountKey `json:"keys,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for AccountListKeysResult.
|
||||
func (alkr AccountListKeysResult) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// AccountListResult the response from the List Storage Accounts operation.
|
||||
type AccountListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -314,6 +332,12 @@ type AccountListResult struct {
|
||||
NextLink *string `json:"nextLink,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for AccountListResult.
|
||||
func (alr AccountListResult) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// AccountListResultIterator provides access to a complete listing of Account values.
|
||||
type AccountListResultIterator struct {
|
||||
i int
|
||||
@@ -481,6 +505,12 @@ type AccountMicrosoftEndpoints struct {
|
||||
Dfs *string `json:"dfs,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for AccountMicrosoftEndpoints.
|
||||
func (ame AccountMicrosoftEndpoints) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// AccountProperties properties of the storage account.
|
||||
type AccountProperties struct {
|
||||
// ProvisioningState - READ-ONLY; Gets the status of the storage account at the time the operation was called. Possible values include: 'Creating', 'ResolvingDNS', 'Succeeded'
|
||||
@@ -665,6 +695,7 @@ func (future *AccountsCreateFuture) result(client AccountsClient) (a Account, er
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
a.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("storage.AccountsCreateFuture")
|
||||
return
|
||||
}
|
||||
@@ -707,6 +738,7 @@ func (future *AccountsFailoverFuture) result(client AccountsClient) (ar autorest
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
ar.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("storage.AccountsFailoverFuture")
|
||||
return
|
||||
}
|
||||
@@ -743,6 +775,7 @@ func (future *AccountsRestoreBlobRangesFuture) result(client AccountsClient) (br
|
||||
return
|
||||
}
|
||||
if !done {
|
||||
brs.Response.Response = future.Response()
|
||||
err = azure.NewAsyncOpIncompleteError("storage.AccountsRestoreBlobRangesFuture")
|
||||
return
|
||||
}
|
||||
@@ -880,6 +913,12 @@ type AzureEntityResource struct {
|
||||
Type *string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for AzureEntityResource.
|
||||
func (aer AzureEntityResource) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// AzureFilesIdentityBasedAuthentication settings for Azure Files identity based authentication.
|
||||
type AzureFilesIdentityBasedAuthentication struct {
|
||||
// DirectoryServiceOptions - Indicates the directory service used. Possible values include: 'DirectoryServiceOptionsNone', 'DirectoryServiceOptionsAADDS', 'DirectoryServiceOptionsAD'
|
||||
@@ -1001,6 +1040,12 @@ type BlobRestoreStatus struct {
|
||||
Parameters *BlobRestoreParameters `json:"parameters,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for BlobRestoreStatus.
|
||||
func (brs BlobRestoreStatus) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// BlobServiceItems ...
|
||||
type BlobServiceItems struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -1008,6 +1053,12 @@ type BlobServiceItems struct {
|
||||
Value *[]BlobServiceProperties `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for BlobServiceItems.
|
||||
func (bsi BlobServiceItems) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// BlobServiceProperties the properties of a storage account’s Blob service.
|
||||
type BlobServiceProperties struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -1129,6 +1180,12 @@ type CheckNameAvailabilityResult struct {
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for CheckNameAvailabilityResult.
|
||||
func (cnar CheckNameAvailabilityResult) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// CloudError an error response from the Storage service.
|
||||
type CloudError struct {
|
||||
Error *CloudErrorBody `json:"error,omitempty"`
|
||||
@@ -1366,6 +1423,12 @@ type EncryptionScopeListResult struct {
|
||||
NextLink *string `json:"nextLink,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for EncryptionScopeListResult.
|
||||
func (eslr EncryptionScopeListResult) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// EncryptionScopeListResultIterator provides access to a complete listing of EncryptionScope values.
|
||||
type EncryptionScopeListResultIterator struct {
|
||||
i int
|
||||
@@ -1627,6 +1690,12 @@ type FileServiceItems struct {
|
||||
Value *[]FileServiceProperties `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for FileServiceItems.
|
||||
func (fsi FileServiceItems) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// FileServiceProperties the properties of File services in storage account.
|
||||
type FileServiceProperties struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -1896,6 +1965,12 @@ type FileShareItems struct {
|
||||
NextLink *string `json:"nextLink,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for FileShareItems.
|
||||
func (fsi FileShareItems) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// FileShareItemsIterator provides access to a complete listing of FileShareItem values.
|
||||
type FileShareItemsIterator struct {
|
||||
i int
|
||||
@@ -2108,6 +2183,12 @@ type GeoReplicationStats struct {
|
||||
CanFailover *bool `json:"canFailover,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for GeoReplicationStats.
|
||||
func (grs GeoReplicationStats) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// Identity identity for the resource.
|
||||
type Identity struct {
|
||||
// PrincipalID - READ-ONLY; The principal ID of resource identity.
|
||||
@@ -2397,6 +2478,12 @@ type ListAccountSasResponse struct {
|
||||
AccountSasToken *string `json:"accountSasToken,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for ListAccountSasResponse.
|
||||
func (lasr ListAccountSasResponse) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// ListContainerItem the blob container properties be listed out.
|
||||
type ListContainerItem struct {
|
||||
// ContainerProperties - The blob container properties be listed out.
|
||||
@@ -2490,6 +2577,12 @@ type ListContainerItems struct {
|
||||
NextLink *string `json:"nextLink,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for ListContainerItems.
|
||||
func (lci ListContainerItems) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// ListContainerItemsIterator provides access to a complete listing of ListContainerItem values.
|
||||
type ListContainerItemsIterator struct {
|
||||
i int
|
||||
@@ -2736,6 +2829,12 @@ type ListQueueResource struct {
|
||||
NextLink *string `json:"nextLink,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for ListQueueResource.
|
||||
func (lqr ListQueueResource) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// ListQueueResourceIterator provides access to a complete listing of ListQueue values.
|
||||
type ListQueueResourceIterator struct {
|
||||
i int
|
||||
@@ -2893,6 +2992,12 @@ type ListQueueServices struct {
|
||||
Value *[]QueueServiceProperties `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for ListQueueServices.
|
||||
func (lqs ListQueueServices) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// ListServiceSasResponse the List service SAS credentials operation response.
|
||||
type ListServiceSasResponse struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -2900,6 +3005,12 @@ type ListServiceSasResponse struct {
|
||||
ServiceSasToken *string `json:"serviceSasToken,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for ListServiceSasResponse.
|
||||
func (lssr ListServiceSasResponse) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// ListTableResource response schema. Contains list of tables returned
|
||||
type ListTableResource struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -2909,6 +3020,12 @@ type ListTableResource struct {
|
||||
NextLink *string `json:"nextLink,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for ListTableResource.
|
||||
func (ltr ListTableResource) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// ListTableResourceIterator provides access to a complete listing of Table values.
|
||||
type ListTableResourceIterator struct {
|
||||
i int
|
||||
@@ -3066,6 +3183,12 @@ type ListTableServices struct {
|
||||
Value *[]TableServiceProperties `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for ListTableServices.
|
||||
func (lts ListTableServices) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// ManagementPolicy the Get Storage Account ManagementPolicies operation response.
|
||||
type ManagementPolicy struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -3498,6 +3621,12 @@ type PrivateEndpoint struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for PrivateEndpoint.
|
||||
func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// PrivateEndpointConnection the Private Endpoint Connection resource.
|
||||
type PrivateEndpointConnection struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -3709,6 +3838,12 @@ type ProxyResource struct {
|
||||
Type *string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for ProxyResource.
|
||||
func (pr ProxyResource) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// Queue ...
|
||||
type Queue struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -3888,6 +4023,12 @@ type Resource struct {
|
||||
Type *string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for Resource.
|
||||
func (r Resource) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// RestorePolicyProperties the blob service properties for blob restore policy
|
||||
type RestorePolicyProperties struct {
|
||||
// Enabled - Blob restore is enabled if set to true.
|
||||
@@ -4005,6 +4146,12 @@ type SKUCapability struct {
|
||||
Value *string `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for SKUCapability.
|
||||
func (sc SKUCapability) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// SkuInformation storage SKU and its properties
|
||||
type SkuInformation struct {
|
||||
// Name - Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS'
|
||||
@@ -4045,6 +4192,12 @@ type SkuListResult struct {
|
||||
Value *[]SkuInformation `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for SkuListResult.
|
||||
func (slr SkuListResult) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// Table properties of the table, including Id, resource name, resource type.
|
||||
type Table struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -4124,6 +4277,12 @@ type TableProperties struct {
|
||||
TableName *string `json:"tableName,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for TableProperties.
|
||||
func (tp TableProperties) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// TableServiceProperties the properties of a storage account’s Table service.
|
||||
type TableServiceProperties struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -4227,6 +4386,12 @@ type TagProperty struct {
|
||||
Upn *string `json:"upn,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for TagProperty.
|
||||
func (tp TagProperty) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource
|
||||
// which has 'tags' and a 'location'
|
||||
type TrackedResource struct {
|
||||
@@ -4270,6 +4435,12 @@ type UpdateHistoryProperty struct {
|
||||
Upn *string `json:"upn,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for UpdateHistoryProperty.
|
||||
func (uhp UpdateHistoryProperty) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// Usage describes Storage Resource Usage.
|
||||
type Usage struct {
|
||||
// Unit - READ-ONLY; Gets the unit of measurement. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', 'BytesPerSecond'
|
||||
@@ -4282,6 +4453,12 @@ type Usage struct {
|
||||
Name *UsageName `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for Usage.
|
||||
func (u Usage) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// UsageListResult the response from the List Usages operation.
|
||||
type UsageListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
@@ -4297,6 +4474,12 @@ type UsageName struct {
|
||||
LocalizedValue *string `json:"localizedValue,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for UsageName.
|
||||
func (un UsageName) MarshalJSON() ([]byte, error) {
|
||||
objectMap := make(map[string]interface{})
|
||||
return json.Marshal(objectMap)
|
||||
}
|
||||
|
||||
// VirtualNetworkRule virtual Network rule.
|
||||
type VirtualNetworkRule struct {
|
||||
// VirtualNetworkResourceID - Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
|
||||
|
8
vendor/github.com/Azure/azure-sdk-for-go/storage/client.go
generated
vendored
8
vendor/github.com/Azure/azure-sdk-for-go/storage/client.go
generated
vendored
@@ -107,7 +107,7 @@ func (ds *DefaultSender) Send(c *Client, req *http.Request) (resp *http.Response
|
||||
return resp, err
|
||||
}
|
||||
resp, err = c.HTTPClient.Do(rr.Request())
|
||||
if err != nil || !autorest.ResponseHasStatusCode(resp, ds.ValidStatusCodes...) {
|
||||
if err == nil && !autorest.ResponseHasStatusCode(resp, ds.ValidStatusCodes...) {
|
||||
return resp, err
|
||||
}
|
||||
drainRespBody(resp)
|
||||
@@ -953,8 +953,10 @@ func readAndCloseBody(body io.ReadCloser) ([]byte, error) {
|
||||
|
||||
// reads the response body then closes it
|
||||
func drainRespBody(resp *http.Response) {
|
||||
io.Copy(ioutil.Discard, resp.Body)
|
||||
resp.Body.Close()
|
||||
if resp != nil {
|
||||
io.Copy(ioutil.Discard, resp.Body)
|
||||
resp.Body.Close()
|
||||
}
|
||||
}
|
||||
|
||||
func serviceErrFromXML(body []byte, storageErr *AzureStorageServiceError) error {
|
||||
|
20
vendor/github.com/Azure/azure-sdk-for-go/version/version.go
generated
vendored
20
vendor/github.com/Azure/azure-sdk-for-go/version/version.go
generated
vendored
@@ -1,21 +1,7 @@
|
||||
package version
|
||||
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
// Number contains the semantic version of this SDK.
|
||||
const Number = "v53.1.0"
|
||||
const Number = "v55.0.0"
|
||||
|
1
vendor/github.com/Azure/go-autorest/autorest/adal/go.mod
generated
vendored
1
vendor/github.com/Azure/go-autorest/autorest/adal/go.mod
generated
vendored
@@ -6,6 +6,7 @@ require (
|
||||
github.com/Azure/go-autorest v14.2.0+incompatible
|
||||
github.com/Azure/go-autorest/autorest/date v0.3.0
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.4.1
|
||||
github.com/Azure/go-autorest/logger v0.2.1
|
||||
github.com/Azure/go-autorest/tracing v0.6.0
|
||||
github.com/form3tech-oss/jwt-go v3.2.2+incompatible
|
||||
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0
|
||||
|
2
vendor/github.com/Azure/go-autorest/autorest/adal/go.sum
generated
vendored
2
vendor/github.com/Azure/go-autorest/autorest/adal/go.sum
generated
vendored
@@ -4,6 +4,8 @@ github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8K
|
||||
github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
|
||||
github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg=
|
||||
github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
|
||||
github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo=
|
||||
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
|
||||
github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk=
|
||||
|
1
vendor/github.com/Azure/go-autorest/autorest/adal/sender.go
generated
vendored
1
vendor/github.com/Azure/go-autorest/autorest/adal/sender.go
generated
vendored
@@ -28,6 +28,7 @@ const (
|
||||
mimeTypeFormPost = "application/x-www-form-urlencoded"
|
||||
)
|
||||
|
||||
// DO NOT ACCESS THIS DIRECTLY. go through sender()
|
||||
var defaultSender Sender
|
||||
var defaultSenderInit = &sync.Once{}
|
||||
|
||||
|
302
vendor/github.com/Azure/go-autorest/autorest/adal/token.go
generated
vendored
302
vendor/github.com/Azure/go-autorest/autorest/adal/token.go
generated
vendored
@@ -36,6 +36,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/Azure/go-autorest/autorest/date"
|
||||
"github.com/Azure/go-autorest/logger"
|
||||
"github.com/form3tech-oss/jwt-go"
|
||||
)
|
||||
|
||||
@@ -70,13 +71,13 @@ const (
|
||||
defaultMaxMSIRefreshAttempts = 5
|
||||
|
||||
// asMSIEndpointEnv is the environment variable used to store the endpoint on App Service and Functions
|
||||
asMSIEndpointEnv = "MSI_ENDPOINT"
|
||||
msiEndpointEnv = "MSI_ENDPOINT"
|
||||
|
||||
// asMSISecretEnv is the environment variable used to store the request secret on App Service and Functions
|
||||
asMSISecretEnv = "MSI_SECRET"
|
||||
msiSecretEnv = "MSI_SECRET"
|
||||
|
||||
// the API version to use for the App Service MSI endpoint
|
||||
appServiceAPIVersion = "2017-09-01"
|
||||
// the API version to use for the legacy App Service MSI endpoint
|
||||
appServiceAPIVersion2017 = "2017-09-01"
|
||||
|
||||
// secret header used when authenticating against app service MSI endpoint
|
||||
secretHeader = "Secret"
|
||||
@@ -292,6 +293,8 @@ func (secret ServicePrincipalCertificateSecret) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// ServicePrincipalMSISecret implements ServicePrincipalSecret for machines running the MSI Extension.
|
||||
type ServicePrincipalMSISecret struct {
|
||||
msiType msiType
|
||||
clientResourceID string
|
||||
}
|
||||
|
||||
// SetAuthenticationValues is a method of the interface ServicePrincipalSecret.
|
||||
@@ -662,96 +665,173 @@ func NewServicePrincipalTokenFromAuthorizationCode(oauthConfig OAuthConfig, clie
|
||||
)
|
||||
}
|
||||
|
||||
type msiType int
|
||||
|
||||
const (
|
||||
msiTypeUnavailable msiType = iota
|
||||
msiTypeAppServiceV20170901
|
||||
msiTypeCloudShell
|
||||
msiTypeIMDS
|
||||
)
|
||||
|
||||
func (m msiType) String() string {
|
||||
switch m {
|
||||
case msiTypeUnavailable:
|
||||
return "unavailable"
|
||||
case msiTypeAppServiceV20170901:
|
||||
return "AppServiceV20170901"
|
||||
case msiTypeCloudShell:
|
||||
return "CloudShell"
|
||||
case msiTypeIMDS:
|
||||
return "IMDS"
|
||||
default:
|
||||
return fmt.Sprintf("unhandled MSI type %d", m)
|
||||
}
|
||||
}
|
||||
|
||||
// returns the MSI type and endpoint, or an error
|
||||
func getMSIType() (msiType, string, error) {
|
||||
if endpointEnvVar := os.Getenv(msiEndpointEnv); endpointEnvVar != "" {
|
||||
// if the env var MSI_ENDPOINT is set
|
||||
if secretEnvVar := os.Getenv(msiSecretEnv); secretEnvVar != "" {
|
||||
// if BOTH the env vars MSI_ENDPOINT and MSI_SECRET are set the msiType is AppService
|
||||
return msiTypeAppServiceV20170901, endpointEnvVar, nil
|
||||
}
|
||||
// if ONLY the env var MSI_ENDPOINT is set the msiType is CloudShell
|
||||
return msiTypeCloudShell, endpointEnvVar, nil
|
||||
} else if msiAvailableHook(context.Background(), sender()) {
|
||||
// if MSI_ENDPOINT is NOT set AND the IMDS endpoint is available the msiType is IMDS. This will timeout after 500 milliseconds
|
||||
return msiTypeIMDS, msiEndpoint, nil
|
||||
} else {
|
||||
// if MSI_ENDPOINT is NOT set and IMDS endpoint is not available Managed Identity is not available
|
||||
return msiTypeUnavailable, "", errors.New("MSI not available")
|
||||
}
|
||||
}
|
||||
|
||||
// GetMSIVMEndpoint gets the MSI endpoint on Virtual Machines.
|
||||
// NOTE: this always returns the IMDS endpoint, it does not work for app services or cloud shell.
|
||||
// Deprecated: NewServicePrincipalTokenFromMSI() and variants will automatically detect the endpoint.
|
||||
func GetMSIVMEndpoint() (string, error) {
|
||||
return msiEndpoint, nil
|
||||
}
|
||||
|
||||
// NOTE: this only indicates if the ASE environment credentials have been set
|
||||
// which does not necessarily mean that the caller is authenticating via ASE!
|
||||
func isAppService() bool {
|
||||
_, asMSIEndpointEnvExists := os.LookupEnv(asMSIEndpointEnv)
|
||||
_, asMSISecretEnvExists := os.LookupEnv(asMSISecretEnv)
|
||||
|
||||
return asMSIEndpointEnvExists && asMSISecretEnvExists
|
||||
}
|
||||
|
||||
// GetMSIAppServiceEndpoint get the MSI endpoint for App Service and Functions
|
||||
// GetMSIAppServiceEndpoint get the MSI endpoint for App Service and Functions.
|
||||
// It will return an error when not running in an app service/functions environment.
|
||||
// Deprecated: NewServicePrincipalTokenFromMSI() and variants will automatically detect the endpoint.
|
||||
func GetMSIAppServiceEndpoint() (string, error) {
|
||||
asMSIEndpoint, asMSIEndpointEnvExists := os.LookupEnv(asMSIEndpointEnv)
|
||||
|
||||
if asMSIEndpointEnvExists {
|
||||
return asMSIEndpoint, nil
|
||||
msiType, endpoint, err := getMSIType()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
switch msiType {
|
||||
case msiTypeAppServiceV20170901:
|
||||
return endpoint, nil
|
||||
default:
|
||||
return "", fmt.Errorf("%s is not app service environment", msiType)
|
||||
}
|
||||
return "", errors.New("MSI endpoint not found")
|
||||
}
|
||||
|
||||
// GetMSIEndpoint get the appropriate MSI endpoint depending on the runtime environment
|
||||
// Deprecated: NewServicePrincipalTokenFromMSI() and variants will automatically detect the endpoint.
|
||||
func GetMSIEndpoint() (string, error) {
|
||||
if isAppService() {
|
||||
return GetMSIAppServiceEndpoint()
|
||||
}
|
||||
return GetMSIVMEndpoint()
|
||||
_, endpoint, err := getMSIType()
|
||||
return endpoint, err
|
||||
}
|
||||
|
||||
// NewServicePrincipalTokenFromMSI creates a ServicePrincipalToken via the MSI VM Extension.
|
||||
// It will use the system assigned identity when creating the token.
|
||||
// msiEndpoint - empty string, or pass a non-empty string to override the default value.
|
||||
// Deprecated: use NewServicePrincipalTokenFromManagedIdentity() instead.
|
||||
func NewServicePrincipalTokenFromMSI(msiEndpoint, resource string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
|
||||
return newServicePrincipalTokenFromMSI(msiEndpoint, resource, nil, nil, callbacks...)
|
||||
return newServicePrincipalTokenFromMSI(msiEndpoint, resource, "", "", callbacks...)
|
||||
}
|
||||
|
||||
// NewServicePrincipalTokenFromMSIWithUserAssignedID creates a ServicePrincipalToken via the MSI VM Extension.
|
||||
// It will use the clientID of specified user assigned identity when creating the token.
|
||||
// msiEndpoint - empty string, or pass a non-empty string to override the default value.
|
||||
// Deprecated: use NewServicePrincipalTokenFromManagedIdentity() instead.
|
||||
func NewServicePrincipalTokenFromMSIWithUserAssignedID(msiEndpoint, resource string, userAssignedID string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
|
||||
return newServicePrincipalTokenFromMSI(msiEndpoint, resource, &userAssignedID, nil, callbacks...)
|
||||
if err := validateStringParam(userAssignedID, "userAssignedID"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return newServicePrincipalTokenFromMSI(msiEndpoint, resource, userAssignedID, "", callbacks...)
|
||||
}
|
||||
|
||||
// NewServicePrincipalTokenFromMSIWithIdentityResourceID creates a ServicePrincipalToken via the MSI VM Extension.
|
||||
// It will use the azure resource id of user assigned identity when creating the token.
|
||||
// msiEndpoint - empty string, or pass a non-empty string to override the default value.
|
||||
// Deprecated: use NewServicePrincipalTokenFromManagedIdentity() instead.
|
||||
func NewServicePrincipalTokenFromMSIWithIdentityResourceID(msiEndpoint, resource string, identityResourceID string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
|
||||
return newServicePrincipalTokenFromMSI(msiEndpoint, resource, nil, &identityResourceID, callbacks...)
|
||||
}
|
||||
|
||||
func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedID *string, identityResourceID *string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
|
||||
if err := validateStringParam(msiEndpoint, "msiEndpoint"); err != nil {
|
||||
if err := validateStringParam(identityResourceID, "identityResourceID"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return newServicePrincipalTokenFromMSI(msiEndpoint, resource, "", identityResourceID, callbacks...)
|
||||
}
|
||||
|
||||
// ManagedIdentityOptions contains optional values for configuring managed identity authentication.
|
||||
type ManagedIdentityOptions struct {
|
||||
// ClientID is the user-assigned identity to use during authentication.
|
||||
// It is mutually exclusive with IdentityResourceID.
|
||||
ClientID string
|
||||
|
||||
// IdentityResourceID is the resource ID of the user-assigned identity to use during authentication.
|
||||
// It is mutually exclusive with ClientID.
|
||||
IdentityResourceID string
|
||||
}
|
||||
|
||||
// NewServicePrincipalTokenFromManagedIdentity creates a ServicePrincipalToken using a managed identity.
|
||||
// It supports the following managed identity environments.
|
||||
// - App Service Environment (API version 2017-09-01 only)
|
||||
// - Cloud shell
|
||||
// - IMDS with a system or user assigned identity
|
||||
func NewServicePrincipalTokenFromManagedIdentity(resource string, options *ManagedIdentityOptions, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
|
||||
if options == nil {
|
||||
options = &ManagedIdentityOptions{}
|
||||
}
|
||||
return newServicePrincipalTokenFromMSI("", resource, options.ClientID, options.IdentityResourceID, callbacks...)
|
||||
}
|
||||
|
||||
func newServicePrincipalTokenFromMSI(msiEndpoint, resource, userAssignedID, identityResourceID string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
|
||||
if err := validateStringParam(resource, "resource"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if userAssignedID != nil {
|
||||
if err := validateStringParam(*userAssignedID, "userAssignedID"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if userAssignedID != "" && identityResourceID != "" {
|
||||
return nil, errors.New("cannot specify userAssignedID and identityResourceID")
|
||||
}
|
||||
if identityResourceID != nil {
|
||||
if err := validateStringParam(*identityResourceID, "identityResourceID"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
msiType, endpoint, err := getMSIType()
|
||||
if err != nil {
|
||||
logger.Instance.Writef(logger.LogError, "Error determining managed identity environment: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
// We set the oauth config token endpoint to be MSI's endpoint
|
||||
msiEndpointURL, err := url.Parse(msiEndpoint)
|
||||
logger.Instance.Writef(logger.LogInfo, "Managed identity environment is %s, endpoint is %s", msiType, endpoint)
|
||||
if msiEndpoint != "" {
|
||||
endpoint = msiEndpoint
|
||||
logger.Instance.Writef(logger.LogInfo, "Managed identity custom endpoint is %s", endpoint)
|
||||
}
|
||||
msiEndpointURL, err := url.Parse(endpoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
v := url.Values{}
|
||||
v.Set("resource", resource)
|
||||
// we only support token API version 2017-09-01 for app services
|
||||
clientIDParam := "client_id"
|
||||
if isASEEndpoint(*msiEndpointURL) {
|
||||
v.Set("api-version", appServiceAPIVersion)
|
||||
clientIDParam = "clientid"
|
||||
} else {
|
||||
v.Set("api-version", msiAPIVersion)
|
||||
// cloud shell sends its data in the request body
|
||||
if msiType != msiTypeCloudShell {
|
||||
v := url.Values{}
|
||||
v.Set("resource", resource)
|
||||
clientIDParam := "client_id"
|
||||
switch msiType {
|
||||
case msiTypeAppServiceV20170901:
|
||||
clientIDParam = "clientid"
|
||||
v.Set("api-version", appServiceAPIVersion2017)
|
||||
break
|
||||
case msiTypeIMDS:
|
||||
v.Set("api-version", msiAPIVersion)
|
||||
}
|
||||
if userAssignedID != "" {
|
||||
v.Set(clientIDParam, userAssignedID)
|
||||
} else if identityResourceID != "" {
|
||||
v.Set("mi_res_id", identityResourceID)
|
||||
}
|
||||
msiEndpointURL.RawQuery = v.Encode()
|
||||
}
|
||||
if userAssignedID != nil {
|
||||
v.Set(clientIDParam, *userAssignedID)
|
||||
}
|
||||
if identityResourceID != nil {
|
||||
v.Set("mi_res_id", *identityResourceID)
|
||||
}
|
||||
msiEndpointURL.RawQuery = v.Encode()
|
||||
|
||||
spt := &ServicePrincipalToken{
|
||||
inner: servicePrincipalToken{
|
||||
@@ -759,10 +839,14 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI
|
||||
OauthConfig: OAuthConfig{
|
||||
TokenEndpoint: *msiEndpointURL,
|
||||
},
|
||||
Secret: &ServicePrincipalMSISecret{},
|
||||
Secret: &ServicePrincipalMSISecret{
|
||||
msiType: msiType,
|
||||
clientResourceID: identityResourceID,
|
||||
},
|
||||
Resource: resource,
|
||||
AutoRefresh: true,
|
||||
RefreshWithin: defaultRefresh,
|
||||
ClientID: userAssignedID,
|
||||
},
|
||||
refreshLock: &sync.RWMutex{},
|
||||
sender: sender(),
|
||||
@@ -770,10 +854,6 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI
|
||||
MaxMSIRefreshAttempts: defaultMaxMSIRefreshAttempts,
|
||||
}
|
||||
|
||||
if userAssignedID != nil {
|
||||
spt.inner.ClientID = *userAssignedID
|
||||
}
|
||||
|
||||
return spt, nil
|
||||
}
|
||||
|
||||
@@ -870,31 +950,6 @@ func (spt *ServicePrincipalToken) getGrantType() string {
|
||||
}
|
||||
}
|
||||
|
||||
func isIMDS(u url.URL) bool {
|
||||
return isMSIEndpoint(u) == true || isASEEndpoint(u) == true
|
||||
}
|
||||
|
||||
func isMSIEndpoint(endpoint url.URL) bool {
|
||||
msi, err := url.Parse(msiEndpoint)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return endpoint.Host == msi.Host && endpoint.Path == msi.Path
|
||||
}
|
||||
|
||||
func isASEEndpoint(endpoint url.URL) bool {
|
||||
aseEndpoint, err := GetMSIAppServiceEndpoint()
|
||||
if err != nil {
|
||||
// app service environment isn't enabled
|
||||
return false
|
||||
}
|
||||
ase, err := url.Parse(aseEndpoint)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return endpoint.Host == ase.Host && endpoint.Path == ase.Path
|
||||
}
|
||||
|
||||
func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource string) error {
|
||||
if spt.customRefreshFunc != nil {
|
||||
token, err := spt.customRefreshFunc(ctx, resource)
|
||||
@@ -909,13 +964,40 @@ func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource
|
||||
return fmt.Errorf("adal: Failed to build the refresh request. Error = '%v'", err)
|
||||
}
|
||||
req.Header.Add("User-Agent", UserAgent())
|
||||
// Add header when runtime is on App Service or Functions
|
||||
if isASEEndpoint(spt.inner.OauthConfig.TokenEndpoint) {
|
||||
asMSISecret, _ := os.LookupEnv(asMSISecretEnv)
|
||||
req.Header.Add(secretHeader, asMSISecret)
|
||||
}
|
||||
req = req.WithContext(ctx)
|
||||
if !isIMDS(spt.inner.OauthConfig.TokenEndpoint) {
|
||||
var resp *http.Response
|
||||
authBodyFilter := func(b []byte) []byte {
|
||||
if logger.Level() != logger.LogAuth {
|
||||
return []byte("**REDACTED** authentication body")
|
||||
}
|
||||
return b
|
||||
}
|
||||
if msiSecret, ok := spt.inner.Secret.(*ServicePrincipalMSISecret); ok {
|
||||
switch msiSecret.msiType {
|
||||
case msiTypeAppServiceV20170901:
|
||||
req.Method = http.MethodGet
|
||||
req.Header.Set("secret", os.Getenv(msiSecretEnv))
|
||||
break
|
||||
case msiTypeCloudShell:
|
||||
req.Header.Set("Metadata", "true")
|
||||
data := url.Values{}
|
||||
data.Set("resource", spt.inner.Resource)
|
||||
if spt.inner.ClientID != "" {
|
||||
data.Set("client_id", spt.inner.ClientID)
|
||||
} else if msiSecret.clientResourceID != "" {
|
||||
data.Set("msi_res_id", msiSecret.clientResourceID)
|
||||
}
|
||||
req.Body = ioutil.NopCloser(strings.NewReader(data.Encode()))
|
||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
break
|
||||
case msiTypeIMDS:
|
||||
req.Method = http.MethodGet
|
||||
req.Header.Set("Metadata", "true")
|
||||
break
|
||||
}
|
||||
logger.Instance.WriteRequest(req, logger.Filter{Body: authBodyFilter})
|
||||
resp, err = retryForIMDS(spt.sender, req, spt.MaxMSIRefreshAttempts)
|
||||
} else {
|
||||
v := url.Values{}
|
||||
v.Set("client_id", spt.inner.ClientID)
|
||||
v.Set("resource", resource)
|
||||
@@ -944,35 +1026,18 @@ func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource
|
||||
req.ContentLength = int64(len(s))
|
||||
req.Header.Set(contentType, mimeTypeFormPost)
|
||||
req.Body = body
|
||||
}
|
||||
|
||||
if _, ok := spt.inner.Secret.(*ServicePrincipalMSISecret); ok {
|
||||
req.Method = http.MethodGet
|
||||
// the metadata header isn't applicable for ASE
|
||||
if !isASEEndpoint(spt.inner.OauthConfig.TokenEndpoint) {
|
||||
req.Header.Set(metadataHeader, "true")
|
||||
}
|
||||
}
|
||||
|
||||
var resp *http.Response
|
||||
if isMSIEndpoint(spt.inner.OauthConfig.TokenEndpoint) {
|
||||
resp, err = getMSIEndpoint(ctx, spt.sender)
|
||||
if err != nil {
|
||||
// return a TokenRefreshError here so that we don't keep retrying
|
||||
return newTokenRefreshError(fmt.Sprintf("the MSI endpoint is not available. Failed HTTP request to MSI endpoint: %v", err), nil)
|
||||
}
|
||||
resp.Body.Close()
|
||||
}
|
||||
if isIMDS(spt.inner.OauthConfig.TokenEndpoint) {
|
||||
resp, err = retryForIMDS(spt.sender, req, spt.MaxMSIRefreshAttempts)
|
||||
} else {
|
||||
logger.Instance.WriteRequest(req, logger.Filter{Body: authBodyFilter})
|
||||
resp, err = spt.sender.Do(req)
|
||||
}
|
||||
|
||||
// don't return a TokenRefreshError here; this will allow retry logic to apply
|
||||
if err != nil {
|
||||
// don't return a TokenRefreshError here; this will allow retry logic to apply
|
||||
return fmt.Errorf("adal: Failed to execute the refresh request. Error = '%v'", err)
|
||||
} else if resp == nil {
|
||||
return fmt.Errorf("adal: received nil response and error")
|
||||
}
|
||||
|
||||
logger.Instance.WriteResponse(resp, logger.Filter{Body: authBodyFilter})
|
||||
defer resp.Body.Close()
|
||||
rb, err := ioutil.ReadAll(resp.Body)
|
||||
|
||||
@@ -1264,3 +1329,8 @@ func MSIAvailable(ctx context.Context, sender Sender) bool {
|
||||
}
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// used for testing purposes
|
||||
var msiAvailableHook = func(ctx context.Context, sender Sender) bool {
|
||||
return MSIAvailable(ctx, sender)
|
||||
}
|
||||
|
2
vendor/github.com/Azure/go-autorest/autorest/adal/token_1.13.go
generated
vendored
2
vendor/github.com/Azure/go-autorest/autorest/adal/token_1.13.go
generated
vendored
@@ -24,8 +24,6 @@ import (
|
||||
)
|
||||
|
||||
func getMSIEndpoint(ctx context.Context, sender Sender) (*http.Response, error) {
|
||||
// this cannot fail, the return sig is due to legacy reasons
|
||||
msiEndpoint, _ := GetMSIVMEndpoint()
|
||||
tempCtx, cancel := context.WithTimeout(ctx, 500*time.Millisecond)
|
||||
defer cancel()
|
||||
// http.NewRequestWithContext() was added in Go 1.13
|
||||
|
2
vendor/github.com/Azure/go-autorest/autorest/adal/token_legacy.go
generated
vendored
2
vendor/github.com/Azure/go-autorest/autorest/adal/token_legacy.go
generated
vendored
@@ -23,8 +23,6 @@ import (
|
||||
)
|
||||
|
||||
func getMSIEndpoint(ctx context.Context, sender Sender) (*http.Response, error) {
|
||||
// this cannot fail, the return sig is due to legacy reasons
|
||||
msiEndpoint, _ := GetMSIVMEndpoint()
|
||||
tempCtx, cancel := context.WithTimeout(ctx, 500*time.Millisecond)
|
||||
defer cancel()
|
||||
req, _ := http.NewRequest(http.MethodGet, msiEndpoint, nil)
|
||||
|
4
vendor/github.com/Azure/go-autorest/autorest/client.go
generated
vendored
4
vendor/github.com/Azure/go-autorest/autorest/client.go
generated
vendored
@@ -17,6 +17,7 @@ package autorest
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
@@ -260,6 +261,9 @@ func (c Client) Do(r *http.Request) (*http.Response, error) {
|
||||
},
|
||||
})
|
||||
resp, err := SendWithSender(c.sender(tls.RenegotiateNever), r)
|
||||
if resp == nil && err == nil {
|
||||
err = errors.New("autorest: received nil response and error")
|
||||
}
|
||||
logger.Instance.WriteResponse(resp, logger.Filter{})
|
||||
Respond(resp, c.ByInspecting())
|
||||
return resp, err
|
||||
|
4
vendor/github.com/Azure/go-autorest/autorest/go.mod
generated
vendored
4
vendor/github.com/Azure/go-autorest/autorest/go.mod
generated
vendored
@@ -4,9 +4,9 @@ go 1.12
|
||||
|
||||
require (
|
||||
github.com/Azure/go-autorest v14.2.0+incompatible
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.5
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.13
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.4.1
|
||||
github.com/Azure/go-autorest/logger v0.2.0
|
||||
github.com/Azure/go-autorest/logger v0.2.1
|
||||
github.com/Azure/go-autorest/tracing v0.6.0
|
||||
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0
|
||||
)
|
||||
|
8
vendor/github.com/Azure/go-autorest/autorest/go.sum
generated
vendored
8
vendor/github.com/Azure/go-autorest/autorest/go.sum
generated
vendored
@@ -1,13 +1,13 @@
|
||||
github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs=
|
||||
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.5 h1:Y3bBUV4rTuxenJJs41HU3qmqsb+auo+a3Lz+PlJPpL0=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.13 h1:Mp5hbtOePIzM8pJVRa3YLrWWmZtoxRXqUEzCfJt3+/Q=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
|
||||
github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw=
|
||||
github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
|
||||
github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE=
|
||||
github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
|
||||
github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg=
|
||||
github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
|
||||
github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo=
|
||||
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
|
||||
github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk=
|
||||
|
2
vendor/github.com/Azure/go-autorest/autorest/to/go.mod
generated
vendored
2
vendor/github.com/Azure/go-autorest/autorest/to/go.mod
generated
vendored
@@ -1,3 +1,5 @@
|
||||
module github.com/Azure/go-autorest/autorest/to
|
||||
|
||||
go 1.12
|
||||
|
||||
require github.com/Azure/go-autorest v14.2.0+incompatible
|
||||
|
2
vendor/github.com/Azure/go-autorest/autorest/to/go.sum
generated
vendored
Normal file
2
vendor/github.com/Azure/go-autorest/autorest/to/go.sum
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs=
|
||||
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
|
24
vendor/github.com/Azure/go-autorest/autorest/to/go_mod_tidy_hack.go
generated
vendored
Normal file
24
vendor/github.com/Azure/go-autorest/autorest/to/go_mod_tidy_hack.go
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
// +build modhack
|
||||
|
||||
package to
|
||||
|
||||
// Copyright 2017 Microsoft Corporation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// This file, and the github.com/Azure/go-autorest import, won't actually become part of
|
||||
// the resultant binary.
|
||||
|
||||
// Necessary for safely adding multi-module repo.
|
||||
// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository
|
||||
import _ "github.com/Azure/go-autorest"
|
9
vendor/github.com/Azure/go-autorest/logger/logger.go
generated
vendored
9
vendor/github.com/Azure/go-autorest/logger/logger.go
generated
vendored
@@ -55,6 +55,10 @@ const (
|
||||
|
||||
// LogDebug tells a logger to log all LogDebug, LogInfo, LogWarning, LogError, LogPanic and LogFatal entries passed to it.
|
||||
LogDebug
|
||||
|
||||
// LogAuth is a special case of LogDebug, it tells a logger to also log the body of an authentication request and response.
|
||||
// NOTE: this can disclose sensitive information, use with care.
|
||||
LogAuth
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -65,6 +69,7 @@ const (
|
||||
logWarning = "WARNING"
|
||||
logInfo = "INFO"
|
||||
logDebug = "DEBUG"
|
||||
logAuth = "AUTH"
|
||||
logUnknown = "UNKNOWN"
|
||||
)
|
||||
|
||||
@@ -83,6 +88,8 @@ func ParseLevel(s string) (lt LevelType, err error) {
|
||||
lt = LogInfo
|
||||
case logDebug:
|
||||
lt = LogDebug
|
||||
case logAuth:
|
||||
lt = LogAuth
|
||||
default:
|
||||
err = fmt.Errorf("bad log level '%s'", s)
|
||||
}
|
||||
@@ -106,6 +113,8 @@ func (lt LevelType) String() string {
|
||||
return logInfo
|
||||
case LogDebug:
|
||||
return logDebug
|
||||
case LogAuth:
|
||||
return logAuth
|
||||
default:
|
||||
return logUnknown
|
||||
}
|
||||
|
4
vendor/github.com/go-openapi/jsonpointer/.travis.yml
generated
vendored
4
vendor/github.com/go-openapi/jsonpointer/.travis.yml
generated
vendored
@@ -1,8 +1,8 @@
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
go:
|
||||
- 1.11.x
|
||||
- 1.12.x
|
||||
- 1.14.x
|
||||
- 1.15.x
|
||||
install:
|
||||
- GO111MODULE=off go get -u gotest.tools/gotestsum
|
||||
env:
|
||||
|
64
vendor/github.com/go-openapi/jsonpointer/pointer.go
generated
vendored
64
vendor/github.com/go-openapi/jsonpointer/pointer.go
generated
vendored
@@ -114,16 +114,16 @@ func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.Nam
|
||||
rValue := reflect.Indirect(reflect.ValueOf(node))
|
||||
kind := rValue.Kind()
|
||||
|
||||
switch kind {
|
||||
|
||||
case reflect.Struct:
|
||||
if rValue.Type().Implements(jsonPointableType) {
|
||||
r, err := node.(JSONPointable).JSONLookup(decodedToken)
|
||||
if err != nil {
|
||||
return nil, kind, err
|
||||
}
|
||||
return r, kind, nil
|
||||
if rValue.Type().Implements(jsonPointableType) {
|
||||
r, err := node.(JSONPointable).JSONLookup(decodedToken)
|
||||
if err != nil {
|
||||
return nil, kind, err
|
||||
}
|
||||
return r, kind, nil
|
||||
}
|
||||
|
||||
switch kind {
|
||||
case reflect.Struct:
|
||||
nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken)
|
||||
if !ok {
|
||||
return nil, kind, fmt.Errorf("object has no field %q", decodedToken)
|
||||
@@ -161,17 +161,17 @@ func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.Nam
|
||||
|
||||
func setSingleImpl(node, data interface{}, decodedToken string, nameProvider *swag.NameProvider) error {
|
||||
rValue := reflect.Indirect(reflect.ValueOf(node))
|
||||
|
||||
if ns, ok := node.(JSONSetable); ok { // pointer impl
|
||||
return ns.JSONSet(decodedToken, data)
|
||||
}
|
||||
|
||||
if rValue.Type().Implements(jsonSetableType) {
|
||||
return node.(JSONSetable).JSONSet(decodedToken, data)
|
||||
}
|
||||
|
||||
switch rValue.Kind() {
|
||||
|
||||
case reflect.Struct:
|
||||
if ns, ok := node.(JSONSetable); ok { // pointer impl
|
||||
return ns.JSONSet(decodedToken, data)
|
||||
}
|
||||
|
||||
if rValue.Type().Implements(jsonSetableType) {
|
||||
return node.(JSONSetable).JSONSet(decodedToken, data)
|
||||
}
|
||||
|
||||
nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken)
|
||||
if !ok {
|
||||
return fmt.Errorf("object has no field %q", decodedToken)
|
||||
@@ -270,22 +270,22 @@ func (p *Pointer) set(node, data interface{}, nameProvider *swag.NameProvider) e
|
||||
rValue := reflect.Indirect(reflect.ValueOf(node))
|
||||
kind := rValue.Kind()
|
||||
|
||||
switch kind {
|
||||
|
||||
case reflect.Struct:
|
||||
if rValue.Type().Implements(jsonPointableType) {
|
||||
r, err := node.(JSONPointable).JSONLookup(decodedToken)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fld := reflect.ValueOf(r)
|
||||
if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Ptr {
|
||||
node = fld.Addr().Interface()
|
||||
continue
|
||||
}
|
||||
node = r
|
||||
if rValue.Type().Implements(jsonPointableType) {
|
||||
r, err := node.(JSONPointable).JSONLookup(decodedToken)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fld := reflect.ValueOf(r)
|
||||
if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Ptr {
|
||||
node = fld.Addr().Interface()
|
||||
continue
|
||||
}
|
||||
node = r
|
||||
continue
|
||||
}
|
||||
|
||||
switch kind {
|
||||
case reflect.Struct:
|
||||
nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken)
|
||||
if !ok {
|
||||
return fmt.Errorf("object has no field %q", decodedToken)
|
||||
|
41
vendor/github.com/go-openapi/jsonreference/.golangci.yml
generated
vendored
Normal file
41
vendor/github.com/go-openapi/jsonreference/.golangci.yml
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
linters-settings:
|
||||
govet:
|
||||
check-shadowing: true
|
||||
golint:
|
||||
min-confidence: 0
|
||||
gocyclo:
|
||||
min-complexity: 30
|
||||
maligned:
|
||||
suggest-new: true
|
||||
dupl:
|
||||
threshold: 100
|
||||
goconst:
|
||||
min-len: 2
|
||||
min-occurrences: 4
|
||||
linters:
|
||||
enable-all: true
|
||||
disable:
|
||||
- maligned
|
||||
- lll
|
||||
- gochecknoglobals
|
||||
- godox
|
||||
- gocognit
|
||||
- whitespace
|
||||
- wsl
|
||||
- funlen
|
||||
- gochecknoglobals
|
||||
- gochecknoinits
|
||||
- scopelint
|
||||
- wrapcheck
|
||||
- exhaustivestruct
|
||||
- exhaustive
|
||||
- nlreturn
|
||||
- testpackage
|
||||
- gci
|
||||
- gofumpt
|
||||
- goerr113
|
||||
- gomnd
|
||||
- tparallel
|
||||
- nestif
|
||||
- godot
|
||||
- errorlint
|
15
vendor/github.com/go-openapi/jsonreference/.travis.yml
generated
vendored
15
vendor/github.com/go-openapi/jsonreference/.travis.yml
generated
vendored
@@ -1,10 +1,19 @@
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
go:
|
||||
- 1.11.x
|
||||
- 1.12.x
|
||||
- 1.14.x
|
||||
- 1.x
|
||||
install:
|
||||
- GO111MODULE=off go get -u gotest.tools/gotestsum
|
||||
- go get gotest.tools/gotestsum
|
||||
jobs:
|
||||
include:
|
||||
# include linting job, but only for latest go version and amd64 arch
|
||||
- go: 1.x
|
||||
arch: amd64
|
||||
install:
|
||||
go get github.com/golangci/golangci-lint/cmd/golangci-lint
|
||||
script:
|
||||
- golangci-lint run --new-from-rev master
|
||||
env:
|
||||
- GO111MODULE=on
|
||||
language: go
|
||||
|
2
vendor/github.com/go-openapi/jsonreference/README.md
generated
vendored
2
vendor/github.com/go-openapi/jsonreference/README.md
generated
vendored
@@ -4,7 +4,7 @@
|
||||
An implementation of JSON Reference - Go language
|
||||
|
||||
## Status
|
||||
Work in progress ( 90% done )
|
||||
Feature complete. Stable API
|
||||
|
||||
## Dependencies
|
||||
https://github.com/go-openapi/jsonpointer
|
||||
|
2
vendor/github.com/go-openapi/jsonreference/go.mod
generated
vendored
2
vendor/github.com/go-openapi/jsonreference/go.mod
generated
vendored
@@ -6,7 +6,7 @@ require (
|
||||
github.com/go-openapi/jsonpointer v0.19.3
|
||||
github.com/stretchr/testify v1.3.0
|
||||
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 // indirect
|
||||
golang.org/x/text v0.3.2 // indirect
|
||||
golang.org/x/text v0.3.3 // indirect
|
||||
)
|
||||
|
||||
go 1.13
|
||||
|
10
vendor/github.com/go-openapi/jsonreference/go.sum
generated
vendored
10
vendor/github.com/go-openapi/jsonreference/go.sum
generated
vendored
@@ -5,12 +5,8 @@ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdko
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0=
|
||||
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
|
||||
github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w=
|
||||
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||
github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE=
|
||||
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY=
|
||||
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
@@ -28,14 +24,12 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
|
||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM=
|
||||
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
|
17
vendor/github.com/go-openapi/swag/.golangci.yml
generated
vendored
17
vendor/github.com/go-openapi/swag/.golangci.yml
generated
vendored
@@ -20,3 +20,20 @@ linters:
|
||||
- lll
|
||||
- gochecknoinits
|
||||
- gochecknoglobals
|
||||
- nlreturn
|
||||
- testpackage
|
||||
- wrapcheck
|
||||
- gomnd
|
||||
- exhaustive
|
||||
- exhaustivestruct
|
||||
- goerr113
|
||||
- wsl
|
||||
- whitespace
|
||||
- gofumpt
|
||||
- godot
|
||||
- nestif
|
||||
- godox
|
||||
- funlen
|
||||
- gci
|
||||
- gocognit
|
||||
- paralleltest
|
||||
|
30
vendor/github.com/go-openapi/swag/.travis.yml
generated
vendored
30
vendor/github.com/go-openapi/swag/.travis.yml
generated
vendored
@@ -1,12 +1,34 @@
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
go:
|
||||
- 1.11.x
|
||||
- 1.12.x
|
||||
- 1.14.x
|
||||
- 1.x
|
||||
arch:
|
||||
- amd64
|
||||
jobs:
|
||||
include:
|
||||
# include arch ppc, but only for latest go version - skip testing for race
|
||||
- go: 1.x
|
||||
arch: ppc64le
|
||||
install: ~
|
||||
script:
|
||||
- go test -v
|
||||
|
||||
#- go: 1.x
|
||||
# arch: arm
|
||||
# install: ~
|
||||
# script:
|
||||
# - go test -v
|
||||
|
||||
# include linting job, but only for latest go version and amd64 arch
|
||||
- go: 1.x
|
||||
arch: amd64
|
||||
install:
|
||||
go get github.com/golangci/golangci-lint/cmd/golangci-lint
|
||||
script:
|
||||
- golangci-lint run --new-from-rev master
|
||||
install:
|
||||
- GO111MODULE=off go get -u gotest.tools/gotestsum
|
||||
env:
|
||||
- GO111MODULE=on
|
||||
language: go
|
||||
notifications:
|
||||
slack:
|
||||
|
1
vendor/github.com/go-openapi/swag/README.md
generated
vendored
1
vendor/github.com/go-openapi/swag/README.md
generated
vendored
@@ -2,7 +2,6 @@
|
||||
|
||||
[](https://raw.githubusercontent.com/go-openapi/swag/master/LICENSE)
|
||||
[](http://godoc.org/github.com/go-openapi/swag)
|
||||
[](https://golangci.com)
|
||||
[](https://goreportcard.com/report/github.com/go-openapi/swag)
|
||||
|
||||
Contains a bunch of helper functions for go-openapi and go-swagger projects.
|
||||
|
16
vendor/github.com/go-openapi/swag/convert.go
generated
vendored
16
vendor/github.com/go-openapi/swag/convert.go
generated
vendored
@@ -88,7 +88,7 @@ func ConvertFloat64(str string) (float64, error) {
|
||||
return strconv.ParseFloat(str, 64)
|
||||
}
|
||||
|
||||
// ConvertInt8 turn a string into int8 boolean
|
||||
// ConvertInt8 turn a string into an int8
|
||||
func ConvertInt8(str string) (int8, error) {
|
||||
i, err := strconv.ParseInt(str, 10, 8)
|
||||
if err != nil {
|
||||
@@ -97,7 +97,7 @@ func ConvertInt8(str string) (int8, error) {
|
||||
return int8(i), nil
|
||||
}
|
||||
|
||||
// ConvertInt16 turn a string into a int16
|
||||
// ConvertInt16 turn a string into an int16
|
||||
func ConvertInt16(str string) (int16, error) {
|
||||
i, err := strconv.ParseInt(str, 10, 16)
|
||||
if err != nil {
|
||||
@@ -106,7 +106,7 @@ func ConvertInt16(str string) (int16, error) {
|
||||
return int16(i), nil
|
||||
}
|
||||
|
||||
// ConvertInt32 turn a string into a int32
|
||||
// ConvertInt32 turn a string into an int32
|
||||
func ConvertInt32(str string) (int32, error) {
|
||||
i, err := strconv.ParseInt(str, 10, 32)
|
||||
if err != nil {
|
||||
@@ -115,12 +115,12 @@ func ConvertInt32(str string) (int32, error) {
|
||||
return int32(i), nil
|
||||
}
|
||||
|
||||
// ConvertInt64 turn a string into a int64
|
||||
// ConvertInt64 turn a string into an int64
|
||||
func ConvertInt64(str string) (int64, error) {
|
||||
return strconv.ParseInt(str, 10, 64)
|
||||
}
|
||||
|
||||
// ConvertUint8 turn a string into a uint8
|
||||
// ConvertUint8 turn a string into an uint8
|
||||
func ConvertUint8(str string) (uint8, error) {
|
||||
i, err := strconv.ParseUint(str, 10, 8)
|
||||
if err != nil {
|
||||
@@ -129,7 +129,7 @@ func ConvertUint8(str string) (uint8, error) {
|
||||
return uint8(i), nil
|
||||
}
|
||||
|
||||
// ConvertUint16 turn a string into a uint16
|
||||
// ConvertUint16 turn a string into an uint16
|
||||
func ConvertUint16(str string) (uint16, error) {
|
||||
i, err := strconv.ParseUint(str, 10, 16)
|
||||
if err != nil {
|
||||
@@ -138,7 +138,7 @@ func ConvertUint16(str string) (uint16, error) {
|
||||
return uint16(i), nil
|
||||
}
|
||||
|
||||
// ConvertUint32 turn a string into a uint32
|
||||
// ConvertUint32 turn a string into an uint32
|
||||
func ConvertUint32(str string) (uint32, error) {
|
||||
i, err := strconv.ParseUint(str, 10, 32)
|
||||
if err != nil {
|
||||
@@ -147,7 +147,7 @@ func ConvertUint32(str string) (uint32, error) {
|
||||
return uint32(i), nil
|
||||
}
|
||||
|
||||
// ConvertUint64 turn a string into a uint64
|
||||
// ConvertUint64 turn a string into an uint64
|
||||
func ConvertUint64(str string) (uint64, error) {
|
||||
return strconv.ParseUint(str, 10, 64)
|
||||
}
|
||||
|
195
vendor/github.com/go-openapi/swag/convert_types.go
generated
vendored
195
vendor/github.com/go-openapi/swag/convert_types.go
generated
vendored
@@ -181,12 +181,12 @@ func IntValueMap(src map[string]*int) map[string]int {
|
||||
return dst
|
||||
}
|
||||
|
||||
// Int32 returns a pointer to of the int64 value passed in.
|
||||
// Int32 returns a pointer to of the int32 value passed in.
|
||||
func Int32(v int32) *int32 {
|
||||
return &v
|
||||
}
|
||||
|
||||
// Int32Value returns the value of the int64 pointer passed in or
|
||||
// Int32Value returns the value of the int32 pointer passed in or
|
||||
// 0 if the pointer is nil.
|
||||
func Int32Value(v *int32) int32 {
|
||||
if v != nil {
|
||||
@@ -195,7 +195,7 @@ func Int32Value(v *int32) int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// Int32Slice converts a slice of int64 values into a slice of
|
||||
// Int32Slice converts a slice of int32 values into a slice of
|
||||
// int32 pointers
|
||||
func Int32Slice(src []int32) []*int32 {
|
||||
dst := make([]*int32, len(src))
|
||||
@@ -299,13 +299,80 @@ func Int64ValueMap(src map[string]*int64) map[string]int64 {
|
||||
return dst
|
||||
}
|
||||
|
||||
// Uint returns a pouinter to of the uint value passed in.
|
||||
// Uint16 returns a pointer to of the uint16 value passed in.
|
||||
func Uint16(v uint16) *uint16 {
|
||||
return &v
|
||||
}
|
||||
|
||||
// Uint16Value returns the value of the uint16 pointer passed in or
|
||||
// 0 if the pointer is nil.
|
||||
func Uint16Value(v *uint16) uint16 {
|
||||
if v != nil {
|
||||
return *v
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
// Uint16Slice converts a slice of uint16 values into a slice of
|
||||
// uint16 pointers
|
||||
func Uint16Slice(src []uint16) []*uint16 {
|
||||
dst := make([]*uint16, len(src))
|
||||
for i := 0; i < len(src); i++ {
|
||||
dst[i] = &(src[i])
|
||||
}
|
||||
|
||||
return dst
|
||||
}
|
||||
|
||||
// Uint16ValueSlice converts a slice of uint16 pointers into a slice of
|
||||
// uint16 values
|
||||
func Uint16ValueSlice(src []*uint16) []uint16 {
|
||||
dst := make([]uint16, len(src))
|
||||
|
||||
for i := 0; i < len(src); i++ {
|
||||
if src[i] != nil {
|
||||
dst[i] = *(src[i])
|
||||
}
|
||||
}
|
||||
|
||||
return dst
|
||||
}
|
||||
|
||||
// Uint16Map converts a string map of uint16 values into a string
|
||||
// map of uint16 pointers
|
||||
func Uint16Map(src map[string]uint16) map[string]*uint16 {
|
||||
dst := make(map[string]*uint16)
|
||||
|
||||
for k, val := range src {
|
||||
v := val
|
||||
dst[k] = &v
|
||||
}
|
||||
|
||||
return dst
|
||||
}
|
||||
|
||||
// Uint16ValueMap converts a string map of uint16 pointers into a string
|
||||
// map of uint16 values
|
||||
func Uint16ValueMap(src map[string]*uint16) map[string]uint16 {
|
||||
dst := make(map[string]uint16)
|
||||
|
||||
for k, val := range src {
|
||||
if val != nil {
|
||||
dst[k] = *val
|
||||
}
|
||||
}
|
||||
|
||||
return dst
|
||||
}
|
||||
|
||||
// Uint returns a pointer to of the uint value passed in.
|
||||
func Uint(v uint) *uint {
|
||||
return &v
|
||||
}
|
||||
|
||||
// UintValue returns the value of the uint pouinter passed in or
|
||||
// 0 if the pouinter is nil.
|
||||
// UintValue returns the value of the uint pointer passed in or
|
||||
// 0 if the pointer is nil.
|
||||
func UintValue(v *uint) uint {
|
||||
if v != nil {
|
||||
return *v
|
||||
@@ -313,8 +380,8 @@ func UintValue(v *uint) uint {
|
||||
return 0
|
||||
}
|
||||
|
||||
// UintSlice converts a slice of uint values uinto a slice of
|
||||
// uint pouinters
|
||||
// UintSlice converts a slice of uint values into a slice of
|
||||
// uint pointers
|
||||
func UintSlice(src []uint) []*uint {
|
||||
dst := make([]*uint, len(src))
|
||||
for i := 0; i < len(src); i++ {
|
||||
@@ -323,7 +390,7 @@ func UintSlice(src []uint) []*uint {
|
||||
return dst
|
||||
}
|
||||
|
||||
// UintValueSlice converts a slice of uint pouinters uinto a slice of
|
||||
// UintValueSlice converts a slice of uint pointers into a slice of
|
||||
// uint values
|
||||
func UintValueSlice(src []*uint) []uint {
|
||||
dst := make([]uint, len(src))
|
||||
@@ -335,8 +402,8 @@ func UintValueSlice(src []*uint) []uint {
|
||||
return dst
|
||||
}
|
||||
|
||||
// UintMap converts a string map of uint values uinto a string
|
||||
// map of uint pouinters
|
||||
// UintMap converts a string map of uint values into a string
|
||||
// map of uint pointers
|
||||
func UintMap(src map[string]uint) map[string]*uint {
|
||||
dst := make(map[string]*uint)
|
||||
for k, val := range src {
|
||||
@@ -346,7 +413,7 @@ func UintMap(src map[string]uint) map[string]*uint {
|
||||
return dst
|
||||
}
|
||||
|
||||
// UintValueMap converts a string map of uint pouinters uinto a string
|
||||
// UintValueMap converts a string map of uint pointers into a string
|
||||
// map of uint values
|
||||
func UintValueMap(src map[string]*uint) map[string]uint {
|
||||
dst := make(map[string]uint)
|
||||
@@ -358,13 +425,13 @@ func UintValueMap(src map[string]*uint) map[string]uint {
|
||||
return dst
|
||||
}
|
||||
|
||||
// Uint32 returns a pouinter to of the uint64 value passed in.
|
||||
// Uint32 returns a pointer to of the uint32 value passed in.
|
||||
func Uint32(v uint32) *uint32 {
|
||||
return &v
|
||||
}
|
||||
|
||||
// Uint32Value returns the value of the uint64 pouinter passed in or
|
||||
// 0 if the pouinter is nil.
|
||||
// Uint32Value returns the value of the uint32 pointer passed in or
|
||||
// 0 if the pointer is nil.
|
||||
func Uint32Value(v *uint32) uint32 {
|
||||
if v != nil {
|
||||
return *v
|
||||
@@ -372,8 +439,8 @@ func Uint32Value(v *uint32) uint32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// Uint32Slice converts a slice of uint64 values uinto a slice of
|
||||
// uint32 pouinters
|
||||
// Uint32Slice converts a slice of uint32 values into a slice of
|
||||
// uint32 pointers
|
||||
func Uint32Slice(src []uint32) []*uint32 {
|
||||
dst := make([]*uint32, len(src))
|
||||
for i := 0; i < len(src); i++ {
|
||||
@@ -382,7 +449,7 @@ func Uint32Slice(src []uint32) []*uint32 {
|
||||
return dst
|
||||
}
|
||||
|
||||
// Uint32ValueSlice converts a slice of uint32 pouinters uinto a slice of
|
||||
// Uint32ValueSlice converts a slice of uint32 pointers into a slice of
|
||||
// uint32 values
|
||||
func Uint32ValueSlice(src []*uint32) []uint32 {
|
||||
dst := make([]uint32, len(src))
|
||||
@@ -394,8 +461,8 @@ func Uint32ValueSlice(src []*uint32) []uint32 {
|
||||
return dst
|
||||
}
|
||||
|
||||
// Uint32Map converts a string map of uint32 values uinto a string
|
||||
// map of uint32 pouinters
|
||||
// Uint32Map converts a string map of uint32 values into a string
|
||||
// map of uint32 pointers
|
||||
func Uint32Map(src map[string]uint32) map[string]*uint32 {
|
||||
dst := make(map[string]*uint32)
|
||||
for k, val := range src {
|
||||
@@ -405,7 +472,7 @@ func Uint32Map(src map[string]uint32) map[string]*uint32 {
|
||||
return dst
|
||||
}
|
||||
|
||||
// Uint32ValueMap converts a string map of uint32 pouinters uinto a string
|
||||
// Uint32ValueMap converts a string map of uint32 pointers into a string
|
||||
// map of uint32 values
|
||||
func Uint32ValueMap(src map[string]*uint32) map[string]uint32 {
|
||||
dst := make(map[string]uint32)
|
||||
@@ -417,13 +484,13 @@ func Uint32ValueMap(src map[string]*uint32) map[string]uint32 {
|
||||
return dst
|
||||
}
|
||||
|
||||
// Uint64 returns a pouinter to of the uint64 value passed in.
|
||||
// Uint64 returns a pointer to of the uint64 value passed in.
|
||||
func Uint64(v uint64) *uint64 {
|
||||
return &v
|
||||
}
|
||||
|
||||
// Uint64Value returns the value of the uint64 pouinter passed in or
|
||||
// 0 if the pouinter is nil.
|
||||
// Uint64Value returns the value of the uint64 pointer passed in or
|
||||
// 0 if the pointer is nil.
|
||||
func Uint64Value(v *uint64) uint64 {
|
||||
if v != nil {
|
||||
return *v
|
||||
@@ -431,8 +498,8 @@ func Uint64Value(v *uint64) uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// Uint64Slice converts a slice of uint64 values uinto a slice of
|
||||
// uint64 pouinters
|
||||
// Uint64Slice converts a slice of uint64 values into a slice of
|
||||
// uint64 pointers
|
||||
func Uint64Slice(src []uint64) []*uint64 {
|
||||
dst := make([]*uint64, len(src))
|
||||
for i := 0; i < len(src); i++ {
|
||||
@@ -441,7 +508,7 @@ func Uint64Slice(src []uint64) []*uint64 {
|
||||
return dst
|
||||
}
|
||||
|
||||
// Uint64ValueSlice converts a slice of uint64 pouinters uinto a slice of
|
||||
// Uint64ValueSlice converts a slice of uint64 pointers into a slice of
|
||||
// uint64 values
|
||||
func Uint64ValueSlice(src []*uint64) []uint64 {
|
||||
dst := make([]uint64, len(src))
|
||||
@@ -453,8 +520,8 @@ func Uint64ValueSlice(src []*uint64) []uint64 {
|
||||
return dst
|
||||
}
|
||||
|
||||
// Uint64Map converts a string map of uint64 values uinto a string
|
||||
// map of uint64 pouinters
|
||||
// Uint64Map converts a string map of uint64 values into a string
|
||||
// map of uint64 pointers
|
||||
func Uint64Map(src map[string]uint64) map[string]*uint64 {
|
||||
dst := make(map[string]*uint64)
|
||||
for k, val := range src {
|
||||
@@ -464,7 +531,7 @@ func Uint64Map(src map[string]uint64) map[string]*uint64 {
|
||||
return dst
|
||||
}
|
||||
|
||||
// Uint64ValueMap converts a string map of uint64 pouinters uinto a string
|
||||
// Uint64ValueMap converts a string map of uint64 pointers into a string
|
||||
// map of uint64 values
|
||||
func Uint64ValueMap(src map[string]*uint64) map[string]uint64 {
|
||||
dst := make(map[string]uint64)
|
||||
@@ -476,6 +543,74 @@ func Uint64ValueMap(src map[string]*uint64) map[string]uint64 {
|
||||
return dst
|
||||
}
|
||||
|
||||
// Float32 returns a pointer to of the float32 value passed in.
|
||||
func Float32(v float32) *float32 {
|
||||
return &v
|
||||
}
|
||||
|
||||
// Float32Value returns the value of the float32 pointer passed in or
|
||||
// 0 if the pointer is nil.
|
||||
func Float32Value(v *float32) float32 {
|
||||
if v != nil {
|
||||
return *v
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
// Float32Slice converts a slice of float32 values into a slice of
|
||||
// float32 pointers
|
||||
func Float32Slice(src []float32) []*float32 {
|
||||
dst := make([]*float32, len(src))
|
||||
|
||||
for i := 0; i < len(src); i++ {
|
||||
dst[i] = &(src[i])
|
||||
}
|
||||
|
||||
return dst
|
||||
}
|
||||
|
||||
// Float32ValueSlice converts a slice of float32 pointers into a slice of
|
||||
// float32 values
|
||||
func Float32ValueSlice(src []*float32) []float32 {
|
||||
dst := make([]float32, len(src))
|
||||
|
||||
for i := 0; i < len(src); i++ {
|
||||
if src[i] != nil {
|
||||
dst[i] = *(src[i])
|
||||
}
|
||||
}
|
||||
|
||||
return dst
|
||||
}
|
||||
|
||||
// Float32Map converts a string map of float32 values into a string
|
||||
// map of float32 pointers
|
||||
func Float32Map(src map[string]float32) map[string]*float32 {
|
||||
dst := make(map[string]*float32)
|
||||
|
||||
for k, val := range src {
|
||||
v := val
|
||||
dst[k] = &v
|
||||
}
|
||||
|
||||
return dst
|
||||
}
|
||||
|
||||
// Float32ValueMap converts a string map of float32 pointers into a string
|
||||
// map of float32 values
|
||||
func Float32ValueMap(src map[string]*float32) map[string]float32 {
|
||||
dst := make(map[string]float32)
|
||||
|
||||
for k, val := range src {
|
||||
if val != nil {
|
||||
dst[k] = *val
|
||||
}
|
||||
}
|
||||
|
||||
return dst
|
||||
}
|
||||
|
||||
// Float64 returns a pointer to of the float64 value passed in.
|
||||
func Float64(v float64) *float64 {
|
||||
return &v
|
||||
|
14
vendor/github.com/go-openapi/swag/go.mod
generated
vendored
14
vendor/github.com/go-openapi/swag/go.mod
generated
vendored
@@ -2,13 +2,17 @@ module github.com/go-openapi/swag
|
||||
|
||||
require (
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/kr/pretty v0.1.0 // indirect
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63
|
||||
github.com/stretchr/testify v1.3.0
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
|
||||
gopkg.in/yaml.v2 v2.2.2
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/mailru/easyjson v0.7.6
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
|
||||
github.com/stretchr/testify v1.6.1
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
|
||||
)
|
||||
|
||||
replace github.com/golang/lint => golang.org/x/lint v0.0.0-20190409202823-959b441ac422
|
||||
|
||||
replace sourcegraph.com/sourcegraph/go-diff => github.com/sourcegraph/go-diff v0.5.1
|
||||
|
||||
go 1.11
|
||||
|
29
vendor/github.com/go-openapi/swag/go.sum
generated
vendored
29
vendor/github.com/go-openapi/swag/go.sum
generated
vendored
@@ -1,20 +1,29 @@
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA=
|
||||
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
|
8
vendor/github.com/go-openapi/swag/json.go
generated
vendored
8
vendor/github.com/go-openapi/swag/json.go
generated
vendored
@@ -51,7 +51,7 @@ type ejUnmarshaler interface {
|
||||
UnmarshalEasyJSON(w *jlexer.Lexer)
|
||||
}
|
||||
|
||||
// WriteJSON writes json data, prefers finding an appropriate interface to short-circuit the marshaller
|
||||
// WriteJSON writes json data, prefers finding an appropriate interface to short-circuit the marshaler
|
||||
// so it takes the fastest option available.
|
||||
func WriteJSON(data interface{}) ([]byte, error) {
|
||||
if d, ok := data.(ejMarshaler); ok {
|
||||
@@ -65,8 +65,8 @@ func WriteJSON(data interface{}) ([]byte, error) {
|
||||
return json.Marshal(data)
|
||||
}
|
||||
|
||||
// ReadJSON reads json data, prefers finding an appropriate interface to short-circuit the unmarshaller
|
||||
// so it takes the fastes option available
|
||||
// ReadJSON reads json data, prefers finding an appropriate interface to short-circuit the unmarshaler
|
||||
// so it takes the fastest option available
|
||||
func ReadJSON(data []byte, value interface{}) error {
|
||||
trimmedData := bytes.Trim(data, "\x00")
|
||||
if d, ok := value.(ejUnmarshaler); ok {
|
||||
@@ -189,7 +189,7 @@ func FromDynamicJSON(data, target interface{}) error {
|
||||
return json.Unmarshal(b, target)
|
||||
}
|
||||
|
||||
// NameProvider represents an object capabale of translating from go property names
|
||||
// NameProvider represents an object capable of translating from go property names
|
||||
// to json property names
|
||||
// This type is thread-safe.
|
||||
type NameProvider struct {
|
||||
|
42
vendor/github.com/go-openapi/swag/loading.go
generated
vendored
42
vendor/github.com/go-openapi/swag/loading.go
generated
vendored
@@ -19,7 +19,9 @@ import (
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
@@ -27,6 +29,15 @@ import (
|
||||
// LoadHTTPTimeout the default timeout for load requests
|
||||
var LoadHTTPTimeout = 30 * time.Second
|
||||
|
||||
// LoadHTTPBasicAuthUsername the username to use when load requests require basic auth
|
||||
var LoadHTTPBasicAuthUsername = ""
|
||||
|
||||
// LoadHTTPBasicAuthPassword the password to use when load requests require basic auth
|
||||
var LoadHTTPBasicAuthPassword = ""
|
||||
|
||||
// LoadHTTPCustomHeaders an optional collection of custom HTTP headers for load requests
|
||||
var LoadHTTPCustomHeaders = map[string]string{}
|
||||
|
||||
// LoadFromFileOrHTTP loads the bytes from a file or a remote http server based on the path passed in
|
||||
func LoadFromFileOrHTTP(path string) ([]byte, error) {
|
||||
return LoadStrategy(path, ioutil.ReadFile, loadHTTPBytes(LoadHTTPTimeout))(path)
|
||||
@@ -48,6 +59,26 @@ func LoadStrategy(path string, local, remote func(string) ([]byte, error)) func(
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if strings.HasPrefix(pth, `file://`) {
|
||||
if runtime.GOOS == "windows" {
|
||||
// support for canonical file URIs on windows.
|
||||
// Zero tolerance here for dodgy URIs.
|
||||
u, _ := url.Parse(upth)
|
||||
if u.Host != "" {
|
||||
// assume UNC name (volume share)
|
||||
// file://host/share/folder\... ==> \\host\share\path\folder
|
||||
// NOTE: UNC port not yet supported
|
||||
upth = strings.Join([]string{`\`, u.Host, u.Path}, `\`)
|
||||
} else {
|
||||
// file:///c:/folder/... ==> just remove the leading slash
|
||||
upth = strings.TrimPrefix(upth, `file:///`)
|
||||
}
|
||||
} else {
|
||||
upth = strings.TrimPrefix(upth, `file://`)
|
||||
}
|
||||
}
|
||||
|
||||
return local(filepath.FromSlash(upth))
|
||||
}
|
||||
}
|
||||
@@ -55,10 +86,19 @@ func LoadStrategy(path string, local, remote func(string) ([]byte, error)) func(
|
||||
func loadHTTPBytes(timeout time.Duration) func(path string) ([]byte, error) {
|
||||
return func(path string) ([]byte, error) {
|
||||
client := &http.Client{Timeout: timeout}
|
||||
req, err := http.NewRequest("GET", path, nil)
|
||||
req, err := http.NewRequest("GET", path, nil) // nolint: noctx
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if LoadHTTPBasicAuthUsername != "" && LoadHTTPBasicAuthPassword != "" {
|
||||
req.SetBasicAuth(LoadHTTPBasicAuthUsername, LoadHTTPBasicAuthPassword)
|
||||
}
|
||||
|
||||
for key, val := range LoadHTTPCustomHeaders {
|
||||
req.Header.Set(key, val)
|
||||
}
|
||||
|
||||
resp, err := client.Do(req)
|
||||
defer func() {
|
||||
if resp != nil {
|
||||
|
6
vendor/github.com/go-openapi/swag/util.go
generated
vendored
6
vendor/github.com/go-openapi/swag/util.go
generated
vendored
@@ -31,7 +31,7 @@ var isInitialism func(string) bool
|
||||
// GoNamePrefixFunc sets an optional rule to prefix go names
|
||||
// which do not start with a letter.
|
||||
//
|
||||
// e.g. to help converting "123" into "{prefix}123"
|
||||
// e.g. to help convert "123" into "{prefix}123"
|
||||
//
|
||||
// The default is to prefix with "X"
|
||||
var GoNamePrefixFunc func(string) string
|
||||
@@ -91,7 +91,7 @@ func init() {
|
||||
}
|
||||
|
||||
const (
|
||||
//collectionFormatComma = "csv"
|
||||
// collectionFormatComma = "csv"
|
||||
collectionFormatSpace = "ssv"
|
||||
collectionFormatTab = "tsv"
|
||||
collectionFormatPipe = "pipes"
|
||||
@@ -370,7 +370,7 @@ func IsZero(data interface{}) bool {
|
||||
// AddInitialisms add additional initialisms
|
||||
func AddInitialisms(words ...string) {
|
||||
for _, word := range words {
|
||||
//commonInitialisms[upper(word)] = true
|
||||
// commonInitialisms[upper(word)] = true
|
||||
commonInitialisms.add(upper(word))
|
||||
}
|
||||
// sort again
|
||||
|
5
vendor/github.com/josharian/intern/README.md
generated
vendored
Normal file
5
vendor/github.com/josharian/intern/README.md
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
Docs: https://godoc.org/github.com/josharian/intern
|
||||
|
||||
See also [Go issue 5160](https://golang.org/issue/5160).
|
||||
|
||||
License: MIT
|
3
vendor/github.com/josharian/intern/go.mod
generated
vendored
Normal file
3
vendor/github.com/josharian/intern/go.mod
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
module github.com/josharian/intern
|
||||
|
||||
go 1.5
|
44
vendor/github.com/josharian/intern/intern.go
generated
vendored
Normal file
44
vendor/github.com/josharian/intern/intern.go
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
// Package intern interns strings.
|
||||
// Interning is best effort only.
|
||||
// Interned strings may be removed automatically
|
||||
// at any time without notification.
|
||||
// All functions may be called concurrently
|
||||
// with themselves and each other.
|
||||
package intern
|
||||
|
||||
import "sync"
|
||||
|
||||
var (
|
||||
pool sync.Pool = sync.Pool{
|
||||
New: func() interface{} {
|
||||
return make(map[string]string)
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
// String returns s, interned.
|
||||
func String(s string) string {
|
||||
m := pool.Get().(map[string]string)
|
||||
c, ok := m[s]
|
||||
if ok {
|
||||
pool.Put(m)
|
||||
return c
|
||||
}
|
||||
m[s] = s
|
||||
pool.Put(m)
|
||||
return s
|
||||
}
|
||||
|
||||
// Bytes returns b converted to a string, interned.
|
||||
func Bytes(b []byte) string {
|
||||
m := pool.Get().(map[string]string)
|
||||
c, ok := m[string(b)]
|
||||
if ok {
|
||||
pool.Put(m)
|
||||
return c
|
||||
}
|
||||
s := string(b)
|
||||
m[s] = s
|
||||
pool.Put(m)
|
||||
return s
|
||||
}
|
21
vendor/github.com/josharian/intern/license.md
generated
vendored
Normal file
21
vendor/github.com/josharian/intern/license.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Josh Bleecher Snyder
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
72
vendor/github.com/mailru/easyjson/buffer/pool.go
generated
vendored
72
vendor/github.com/mailru/easyjson/buffer/pool.go
generated
vendored
@@ -4,6 +4,7 @@ package buffer
|
||||
|
||||
import (
|
||||
"io"
|
||||
"net"
|
||||
"sync"
|
||||
)
|
||||
|
||||
@@ -52,14 +53,12 @@ func putBuf(buf []byte) {
|
||||
|
||||
// getBuf gets a chunk from reuse pool or creates a new one if reuse failed.
|
||||
func getBuf(size int) []byte {
|
||||
if size < config.PooledSize {
|
||||
return make([]byte, 0, size)
|
||||
}
|
||||
|
||||
if c := buffers[size]; c != nil {
|
||||
v := c.Get()
|
||||
if v != nil {
|
||||
return v.([]byte)
|
||||
if size >= config.PooledSize {
|
||||
if c := buffers[size]; c != nil {
|
||||
v := c.Get()
|
||||
if v != nil {
|
||||
return v.([]byte)
|
||||
}
|
||||
}
|
||||
}
|
||||
return make([]byte, 0, size)
|
||||
@@ -78,9 +77,12 @@ type Buffer struct {
|
||||
// EnsureSpace makes sure that the current chunk contains at least s free bytes,
|
||||
// possibly creating a new chunk.
|
||||
func (b *Buffer) EnsureSpace(s int) {
|
||||
if cap(b.Buf)-len(b.Buf) >= s {
|
||||
return
|
||||
if cap(b.Buf)-len(b.Buf) < s {
|
||||
b.ensureSpaceSlow(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Buffer) ensureSpaceSlow(s int) {
|
||||
l := len(b.Buf)
|
||||
if l > 0 {
|
||||
if cap(b.toPool) != cap(b.Buf) {
|
||||
@@ -105,18 +107,22 @@ func (b *Buffer) EnsureSpace(s int) {
|
||||
|
||||
// AppendByte appends a single byte to buffer.
|
||||
func (b *Buffer) AppendByte(data byte) {
|
||||
if cap(b.Buf) == len(b.Buf) { // EnsureSpace won't be inlined.
|
||||
b.EnsureSpace(1)
|
||||
}
|
||||
b.EnsureSpace(1)
|
||||
b.Buf = append(b.Buf, data)
|
||||
}
|
||||
|
||||
// AppendBytes appends a byte slice to buffer.
|
||||
func (b *Buffer) AppendBytes(data []byte) {
|
||||
if len(data) <= cap(b.Buf)-len(b.Buf) {
|
||||
b.Buf = append(b.Buf, data...) // fast path
|
||||
} else {
|
||||
b.appendBytesSlow(data)
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Buffer) appendBytesSlow(data []byte) {
|
||||
for len(data) > 0 {
|
||||
if cap(b.Buf) == len(b.Buf) { // EnsureSpace won't be inlined.
|
||||
b.EnsureSpace(1)
|
||||
}
|
||||
b.EnsureSpace(1)
|
||||
|
||||
sz := cap(b.Buf) - len(b.Buf)
|
||||
if sz > len(data) {
|
||||
@@ -128,12 +134,18 @@ func (b *Buffer) AppendBytes(data []byte) {
|
||||
}
|
||||
}
|
||||
|
||||
// AppendBytes appends a string to buffer.
|
||||
// AppendString appends a string to buffer.
|
||||
func (b *Buffer) AppendString(data string) {
|
||||
if len(data) <= cap(b.Buf)-len(b.Buf) {
|
||||
b.Buf = append(b.Buf, data...) // fast path
|
||||
} else {
|
||||
b.appendStringSlow(data)
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Buffer) appendStringSlow(data string) {
|
||||
for len(data) > 0 {
|
||||
if cap(b.Buf) == len(b.Buf) { // EnsureSpace won't be inlined.
|
||||
b.EnsureSpace(1)
|
||||
}
|
||||
b.EnsureSpace(1)
|
||||
|
||||
sz := cap(b.Buf) - len(b.Buf)
|
||||
if sz > len(data) {
|
||||
@@ -156,18 +168,14 @@ func (b *Buffer) Size() int {
|
||||
|
||||
// DumpTo outputs the contents of a buffer to a writer and resets the buffer.
|
||||
func (b *Buffer) DumpTo(w io.Writer) (written int, err error) {
|
||||
var n int
|
||||
for _, buf := range b.bufs {
|
||||
if err == nil {
|
||||
n, err = w.Write(buf)
|
||||
written += n
|
||||
}
|
||||
putBuf(buf)
|
||||
bufs := net.Buffers(b.bufs)
|
||||
if len(b.Buf) > 0 {
|
||||
bufs = append(bufs, b.Buf)
|
||||
}
|
||||
n, err := bufs.WriteTo(w)
|
||||
|
||||
if err == nil {
|
||||
n, err = w.Write(b.Buf)
|
||||
written += n
|
||||
for _, buf := range b.bufs {
|
||||
putBuf(buf)
|
||||
}
|
||||
putBuf(b.toPool)
|
||||
|
||||
@@ -175,7 +183,7 @@ func (b *Buffer) DumpTo(w io.Writer) (written int, err error) {
|
||||
b.Buf = nil
|
||||
b.toPool = nil
|
||||
|
||||
return
|
||||
return int(n), err
|
||||
}
|
||||
|
||||
// BuildBytes creates a single byte slice with all the contents of the buffer. Data is
|
||||
@@ -192,7 +200,7 @@ func (b *Buffer) BuildBytes(reuse ...[]byte) []byte {
|
||||
var ret []byte
|
||||
size := b.Size()
|
||||
|
||||
// If we got a buffer as argument and it is big enought, reuse it.
|
||||
// If we got a buffer as argument and it is big enough, reuse it.
|
||||
if len(reuse) == 1 && cap(reuse[0]) >= size {
|
||||
ret = reuse[0][:0]
|
||||
} else {
|
||||
|
216
vendor/github.com/mailru/easyjson/jlexer/lexer.go
generated
vendored
216
vendor/github.com/mailru/easyjson/jlexer/lexer.go
generated
vendored
@@ -5,6 +5,7 @@
|
||||
package jlexer
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
@@ -14,6 +15,8 @@ import (
|
||||
"unicode"
|
||||
"unicode/utf16"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/josharian/intern"
|
||||
)
|
||||
|
||||
// tokenKind determines type of a token.
|
||||
@@ -32,9 +35,10 @@ const (
|
||||
type token struct {
|
||||
kind tokenKind // Type of a token.
|
||||
|
||||
boolValue bool // Value if a boolean literal token.
|
||||
byteValue []byte // Raw value of a token.
|
||||
delimValue byte
|
||||
boolValue bool // Value if a boolean literal token.
|
||||
byteValueCloned bool // true if byteValue was allocated and does not refer to original json body
|
||||
byteValue []byte // Raw value of a token.
|
||||
delimValue byte
|
||||
}
|
||||
|
||||
// Lexer is a JSON lexer: it iterates over JSON tokens in a byte slice.
|
||||
@@ -240,23 +244,65 @@ func (r *Lexer) fetchNumber() {
|
||||
|
||||
// findStringLen tries to scan into the string literal for ending quote char to determine required size.
|
||||
// The size will be exact if no escapes are present and may be inexact if there are escaped chars.
|
||||
func findStringLen(data []byte) (isValid, hasEscapes bool, length int) {
|
||||
delta := 0
|
||||
|
||||
for i := 0; i < len(data); i++ {
|
||||
switch data[i] {
|
||||
case '\\':
|
||||
i++
|
||||
delta++
|
||||
if i < len(data) && data[i] == 'u' {
|
||||
delta++
|
||||
}
|
||||
case '"':
|
||||
return true, (delta > 0), (i - delta)
|
||||
func findStringLen(data []byte) (isValid bool, length int) {
|
||||
for {
|
||||
idx := bytes.IndexByte(data, '"')
|
||||
if idx == -1 {
|
||||
return false, len(data)
|
||||
}
|
||||
if idx == 0 || (idx > 0 && data[idx-1] != '\\') {
|
||||
return true, length + idx
|
||||
}
|
||||
|
||||
// count \\\\\\\ sequences. even number of slashes means quote is not really escaped
|
||||
cnt := 1
|
||||
for idx-cnt-1 >= 0 && data[idx-cnt-1] == '\\' {
|
||||
cnt++
|
||||
}
|
||||
if cnt%2 == 0 {
|
||||
return true, length + idx
|
||||
}
|
||||
|
||||
length += idx + 1
|
||||
data = data[idx+1:]
|
||||
}
|
||||
}
|
||||
|
||||
// unescapeStringToken performs unescaping of string token.
|
||||
// if no escaping is needed, original string is returned, otherwise - a new one allocated
|
||||
func (r *Lexer) unescapeStringToken() (err error) {
|
||||
data := r.token.byteValue
|
||||
var unescapedData []byte
|
||||
|
||||
for {
|
||||
i := bytes.IndexByte(data, '\\')
|
||||
if i == -1 {
|
||||
break
|
||||
}
|
||||
|
||||
escapedRune, escapedBytes, err := decodeEscape(data[i:])
|
||||
if err != nil {
|
||||
r.errParse(err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
if unescapedData == nil {
|
||||
unescapedData = make([]byte, 0, len(r.token.byteValue))
|
||||
}
|
||||
|
||||
var d [4]byte
|
||||
s := utf8.EncodeRune(d[:], escapedRune)
|
||||
unescapedData = append(unescapedData, data[:i]...)
|
||||
unescapedData = append(unescapedData, d[:s]...)
|
||||
|
||||
data = data[i+escapedBytes:]
|
||||
}
|
||||
|
||||
return false, false, len(data)
|
||||
if unescapedData != nil {
|
||||
r.token.byteValue = append(unescapedData, data...)
|
||||
r.token.byteValueCloned = true
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// getu4 decodes \uXXXX from the beginning of s, returning the hex value,
|
||||
@@ -286,36 +332,30 @@ func getu4(s []byte) rune {
|
||||
return val
|
||||
}
|
||||
|
||||
// processEscape processes a single escape sequence and returns number of bytes processed.
|
||||
func (r *Lexer) processEscape(data []byte) (int, error) {
|
||||
// decodeEscape processes a single escape sequence and returns number of bytes processed.
|
||||
func decodeEscape(data []byte) (decoded rune, bytesProcessed int, err error) {
|
||||
if len(data) < 2 {
|
||||
return 0, fmt.Errorf("syntax error at %v", string(data))
|
||||
return 0, 0, errors.New("incorrect escape symbol \\ at the end of token")
|
||||
}
|
||||
|
||||
c := data[1]
|
||||
switch c {
|
||||
case '"', '/', '\\':
|
||||
r.token.byteValue = append(r.token.byteValue, c)
|
||||
return 2, nil
|
||||
return rune(c), 2, nil
|
||||
case 'b':
|
||||
r.token.byteValue = append(r.token.byteValue, '\b')
|
||||
return 2, nil
|
||||
return '\b', 2, nil
|
||||
case 'f':
|
||||
r.token.byteValue = append(r.token.byteValue, '\f')
|
||||
return 2, nil
|
||||
return '\f', 2, nil
|
||||
case 'n':
|
||||
r.token.byteValue = append(r.token.byteValue, '\n')
|
||||
return 2, nil
|
||||
return '\n', 2, nil
|
||||
case 'r':
|
||||
r.token.byteValue = append(r.token.byteValue, '\r')
|
||||
return 2, nil
|
||||
return '\r', 2, nil
|
||||
case 't':
|
||||
r.token.byteValue = append(r.token.byteValue, '\t')
|
||||
return 2, nil
|
||||
return '\t', 2, nil
|
||||
case 'u':
|
||||
rr := getu4(data)
|
||||
if rr < 0 {
|
||||
return 0, errors.New("syntax error")
|
||||
return 0, 0, errors.New("incorrectly escaped \\uXXXX sequence")
|
||||
}
|
||||
|
||||
read := 6
|
||||
@@ -328,13 +368,10 @@ func (r *Lexer) processEscape(data []byte) (int, error) {
|
||||
rr = unicode.ReplacementChar
|
||||
}
|
||||
}
|
||||
var d [4]byte
|
||||
s := utf8.EncodeRune(d[:], rr)
|
||||
r.token.byteValue = append(r.token.byteValue, d[:s]...)
|
||||
return read, nil
|
||||
return rr, read, nil
|
||||
}
|
||||
|
||||
return 0, errors.New("syntax error")
|
||||
return 0, 0, errors.New("incorrectly escaped bytes")
|
||||
}
|
||||
|
||||
// fetchString scans a string literal token.
|
||||
@@ -342,43 +379,14 @@ func (r *Lexer) fetchString() {
|
||||
r.pos++
|
||||
data := r.Data[r.pos:]
|
||||
|
||||
isValid, hasEscapes, length := findStringLen(data)
|
||||
isValid, length := findStringLen(data)
|
||||
if !isValid {
|
||||
r.pos += length
|
||||
r.errParse("unterminated string literal")
|
||||
return
|
||||
}
|
||||
if !hasEscapes {
|
||||
r.token.byteValue = data[:length]
|
||||
r.pos += length + 1
|
||||
return
|
||||
}
|
||||
|
||||
r.token.byteValue = make([]byte, 0, length)
|
||||
p := 0
|
||||
for i := 0; i < len(data); {
|
||||
switch data[i] {
|
||||
case '"':
|
||||
r.pos += i + 1
|
||||
r.token.byteValue = append(r.token.byteValue, data[p:i]...)
|
||||
i++
|
||||
return
|
||||
|
||||
case '\\':
|
||||
r.token.byteValue = append(r.token.byteValue, data[p:i]...)
|
||||
off, err := r.processEscape(data[i:])
|
||||
if err != nil {
|
||||
r.errParse(err.Error())
|
||||
return
|
||||
}
|
||||
i += off
|
||||
p = i
|
||||
|
||||
default:
|
||||
i++
|
||||
}
|
||||
}
|
||||
r.errParse("unterminated string literal")
|
||||
r.token.byteValue = data[:length]
|
||||
r.pos += length + 1 // skip closing '"' as well
|
||||
}
|
||||
|
||||
// scanToken scans the next token if no token is currently available in the lexer.
|
||||
@@ -602,7 +610,7 @@ func (r *Lexer) Consumed() {
|
||||
}
|
||||
}
|
||||
|
||||
func (r *Lexer) unsafeString() (string, []byte) {
|
||||
func (r *Lexer) unsafeString(skipUnescape bool) (string, []byte) {
|
||||
if r.token.kind == tokenUndef && r.Ok() {
|
||||
r.FetchToken()
|
||||
}
|
||||
@@ -610,6 +618,13 @@ func (r *Lexer) unsafeString() (string, []byte) {
|
||||
r.errInvalidToken("string")
|
||||
return "", nil
|
||||
}
|
||||
if !skipUnescape {
|
||||
if err := r.unescapeStringToken(); err != nil {
|
||||
r.errInvalidToken("string")
|
||||
return "", nil
|
||||
}
|
||||
}
|
||||
|
||||
bytes := r.token.byteValue
|
||||
ret := bytesToStr(r.token.byteValue)
|
||||
r.consume()
|
||||
@@ -621,13 +636,19 @@ func (r *Lexer) unsafeString() (string, []byte) {
|
||||
// Warning: returned string may point to the input buffer, so the string should not outlive
|
||||
// the input buffer. Intended pattern of usage is as an argument to a switch statement.
|
||||
func (r *Lexer) UnsafeString() string {
|
||||
ret, _ := r.unsafeString()
|
||||
ret, _ := r.unsafeString(false)
|
||||
return ret
|
||||
}
|
||||
|
||||
// UnsafeBytes returns the byte slice if the token is a string literal.
|
||||
func (r *Lexer) UnsafeBytes() []byte {
|
||||
_, ret := r.unsafeString()
|
||||
_, ret := r.unsafeString(false)
|
||||
return ret
|
||||
}
|
||||
|
||||
// UnsafeFieldName returns current member name string token
|
||||
func (r *Lexer) UnsafeFieldName(skipUnescape bool) string {
|
||||
ret, _ := r.unsafeString(skipUnescape)
|
||||
return ret
|
||||
}
|
||||
|
||||
@@ -640,7 +661,34 @@ func (r *Lexer) String() string {
|
||||
r.errInvalidToken("string")
|
||||
return ""
|
||||
}
|
||||
ret := string(r.token.byteValue)
|
||||
if err := r.unescapeStringToken(); err != nil {
|
||||
r.errInvalidToken("string")
|
||||
return ""
|
||||
}
|
||||
var ret string
|
||||
if r.token.byteValueCloned {
|
||||
ret = bytesToStr(r.token.byteValue)
|
||||
} else {
|
||||
ret = string(r.token.byteValue)
|
||||
}
|
||||
r.consume()
|
||||
return ret
|
||||
}
|
||||
|
||||
// StringIntern reads a string literal, and performs string interning on it.
|
||||
func (r *Lexer) StringIntern() string {
|
||||
if r.token.kind == tokenUndef && r.Ok() {
|
||||
r.FetchToken()
|
||||
}
|
||||
if !r.Ok() || r.token.kind != tokenString {
|
||||
r.errInvalidToken("string")
|
||||
return ""
|
||||
}
|
||||
if err := r.unescapeStringToken(); err != nil {
|
||||
r.errInvalidToken("string")
|
||||
return ""
|
||||
}
|
||||
ret := intern.Bytes(r.token.byteValue)
|
||||
r.consume()
|
||||
return ret
|
||||
}
|
||||
@@ -839,7 +887,7 @@ func (r *Lexer) Int() int {
|
||||
}
|
||||
|
||||
func (r *Lexer) Uint8Str() uint8 {
|
||||
s, b := r.unsafeString()
|
||||
s, b := r.unsafeString(false)
|
||||
if !r.Ok() {
|
||||
return 0
|
||||
}
|
||||
@@ -856,7 +904,7 @@ func (r *Lexer) Uint8Str() uint8 {
|
||||
}
|
||||
|
||||
func (r *Lexer) Uint16Str() uint16 {
|
||||
s, b := r.unsafeString()
|
||||
s, b := r.unsafeString(false)
|
||||
if !r.Ok() {
|
||||
return 0
|
||||
}
|
||||
@@ -873,7 +921,7 @@ func (r *Lexer) Uint16Str() uint16 {
|
||||
}
|
||||
|
||||
func (r *Lexer) Uint32Str() uint32 {
|
||||
s, b := r.unsafeString()
|
||||
s, b := r.unsafeString(false)
|
||||
if !r.Ok() {
|
||||
return 0
|
||||
}
|
||||
@@ -890,7 +938,7 @@ func (r *Lexer) Uint32Str() uint32 {
|
||||
}
|
||||
|
||||
func (r *Lexer) Uint64Str() uint64 {
|
||||
s, b := r.unsafeString()
|
||||
s, b := r.unsafeString(false)
|
||||
if !r.Ok() {
|
||||
return 0
|
||||
}
|
||||
@@ -915,7 +963,7 @@ func (r *Lexer) UintptrStr() uintptr {
|
||||
}
|
||||
|
||||
func (r *Lexer) Int8Str() int8 {
|
||||
s, b := r.unsafeString()
|
||||
s, b := r.unsafeString(false)
|
||||
if !r.Ok() {
|
||||
return 0
|
||||
}
|
||||
@@ -932,7 +980,7 @@ func (r *Lexer) Int8Str() int8 {
|
||||
}
|
||||
|
||||
func (r *Lexer) Int16Str() int16 {
|
||||
s, b := r.unsafeString()
|
||||
s, b := r.unsafeString(false)
|
||||
if !r.Ok() {
|
||||
return 0
|
||||
}
|
||||
@@ -949,7 +997,7 @@ func (r *Lexer) Int16Str() int16 {
|
||||
}
|
||||
|
||||
func (r *Lexer) Int32Str() int32 {
|
||||
s, b := r.unsafeString()
|
||||
s, b := r.unsafeString(false)
|
||||
if !r.Ok() {
|
||||
return 0
|
||||
}
|
||||
@@ -966,7 +1014,7 @@ func (r *Lexer) Int32Str() int32 {
|
||||
}
|
||||
|
||||
func (r *Lexer) Int64Str() int64 {
|
||||
s, b := r.unsafeString()
|
||||
s, b := r.unsafeString(false)
|
||||
if !r.Ok() {
|
||||
return 0
|
||||
}
|
||||
@@ -1004,7 +1052,7 @@ func (r *Lexer) Float32() float32 {
|
||||
}
|
||||
|
||||
func (r *Lexer) Float32Str() float32 {
|
||||
s, b := r.unsafeString()
|
||||
s, b := r.unsafeString(false)
|
||||
if !r.Ok() {
|
||||
return 0
|
||||
}
|
||||
@@ -1037,7 +1085,7 @@ func (r *Lexer) Float64() float64 {
|
||||
}
|
||||
|
||||
func (r *Lexer) Float64Str() float64 {
|
||||
s, b := r.unsafeString()
|
||||
s, b := r.unsafeString(false)
|
||||
if !r.Ok() {
|
||||
return 0
|
||||
}
|
||||
|
41
vendor/github.com/mailru/easyjson/jwriter/writer.go
generated
vendored
41
vendor/github.com/mailru/easyjson/jwriter/writer.go
generated
vendored
@@ -270,16 +270,25 @@ func (w *Writer) Bool(v bool) {
|
||||
|
||||
const chars = "0123456789abcdef"
|
||||
|
||||
func isNotEscapedSingleChar(c byte, escapeHTML bool) bool {
|
||||
// Note: might make sense to use a table if there are more chars to escape. With 4 chars
|
||||
// it benchmarks the same.
|
||||
if escapeHTML {
|
||||
return c != '<' && c != '>' && c != '&' && c != '\\' && c != '"' && c >= 0x20 && c < utf8.RuneSelf
|
||||
} else {
|
||||
return c != '\\' && c != '"' && c >= 0x20 && c < utf8.RuneSelf
|
||||
func getTable(falseValues ...int) [128]bool {
|
||||
table := [128]bool{}
|
||||
|
||||
for i := 0; i < 128; i++ {
|
||||
table[i] = true
|
||||
}
|
||||
|
||||
for _, v := range falseValues {
|
||||
table[v] = false
|
||||
}
|
||||
|
||||
return table
|
||||
}
|
||||
|
||||
var (
|
||||
htmlEscapeTable = getTable(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, '"', '&', '<', '>', '\\')
|
||||
htmlNoEscapeTable = getTable(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, '"', '\\')
|
||||
)
|
||||
|
||||
func (w *Writer) String(s string) {
|
||||
w.Buffer.AppendByte('"')
|
||||
|
||||
@@ -288,15 +297,21 @@ func (w *Writer) String(s string) {
|
||||
|
||||
p := 0 // last non-escape symbol
|
||||
|
||||
escapeTable := &htmlEscapeTable
|
||||
if w.NoEscapeHTML {
|
||||
escapeTable = &htmlNoEscapeTable
|
||||
}
|
||||
|
||||
for i := 0; i < len(s); {
|
||||
c := s[i]
|
||||
|
||||
if isNotEscapedSingleChar(c, !w.NoEscapeHTML) {
|
||||
// single-width character, no escaping is required
|
||||
i++
|
||||
continue
|
||||
} else if c < utf8.RuneSelf {
|
||||
// single-with character, need to escape
|
||||
if c < utf8.RuneSelf {
|
||||
if escapeTable[c] {
|
||||
// single-width character, no escaping is required
|
||||
i++
|
||||
continue
|
||||
}
|
||||
|
||||
w.Buffer.AppendString(s[p:i])
|
||||
switch c {
|
||||
case '\t':
|
||||
|
Reference in New Issue
Block a user