vendor: update all dependencies to latest versions
This commit is contained in:
Generated
Vendored
+52
-12
@@ -14,9 +14,8 @@ package recoveryservicesbackup
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -24,29 +23,25 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// BackupProtectionContainersClient is the client for the
|
||||
// BackupProtectionContainers methods of the Recoveryservicesbackup service.
|
||||
// BackupProtectionContainersClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
|
||||
type BackupProtectionContainersClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewBackupProtectionContainersClient creates an instance of the
|
||||
// BackupProtectionContainersClient client.
|
||||
// NewBackupProtectionContainersClient creates an instance of the BackupProtectionContainersClient client.
|
||||
func NewBackupProtectionContainersClient(subscriptionID string) BackupProtectionContainersClient {
|
||||
return NewBackupProtectionContainersClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewBackupProtectionContainersClientWithBaseURI creates an instance of the
|
||||
// BackupProtectionContainersClient client.
|
||||
// NewBackupProtectionContainersClientWithBaseURI creates an instance of the BackupProtectionContainersClient client.
|
||||
func NewBackupProtectionContainersClientWithBaseURI(baseURI string, subscriptionID string) BackupProtectionContainersClient {
|
||||
return BackupProtectionContainersClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// List lists the containers registered to Recovery Services Vault.
|
||||
//
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is
|
||||
// the name of the resource group where the recovery services vault is present.
|
||||
// filter is oData filter options.
|
||||
// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the
|
||||
// recovery services vault is present. filter is oData filter options.
|
||||
func (client BackupProtectionContainersClient) List(vaultName string, resourceGroupName string, filter string) (result ProtectionContainerResourceList, err error) {
|
||||
req, err := client.ListPreparer(vaultName, resourceGroupName, filter)
|
||||
if err != nil {
|
||||
@@ -135,3 +130,48 @@ func (client BackupProtectionContainersClient) ListNextResults(lastResults Prote
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client BackupProtectionContainersClient) ListComplete(vaultName string, resourceGroupName string, filter string, cancel <-chan struct{}) (<-chan ProtectionContainerResource, <-chan error) {
|
||||
resultChan := make(chan ProtectionContainerResource)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(vaultName, resourceGroupName, filter)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user