vendor: update all dependencies to latest versions
This commit is contained in:
+53
-19
@@ -14,9 +14,8 @@ package recoveryservices
|
||||
// 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,8 +23,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// OperationsClient is the client for the Operations methods of the
|
||||
// Recoveryservices service.
|
||||
// OperationsClient is the recovery Services Client
|
||||
type OperationsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -35,18 +33,14 @@ func NewOperationsClient(subscriptionID string) OperationsClient {
|
||||
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient
|
||||
// client.
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
|
||||
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
|
||||
return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// List returns the list of available operations.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group where the recovery
|
||||
// services vault is present.
|
||||
func (client OperationsClient) List(resourceGroupName string) (result ClientDiscoveryResponse, err error) {
|
||||
req, err := client.ListPreparer(resourceGroupName)
|
||||
func (client OperationsClient) List() (result ClientDiscoveryResponse, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "recoveryservices.OperationsClient", "List", nil, "Failure preparing request")
|
||||
return
|
||||
@@ -68,12 +62,7 @@ func (client OperationsClient) List(resourceGroupName string) (result ClientDisc
|
||||
}
|
||||
|
||||
// ListPreparer prepares the List request.
|
||||
func (client OperationsClient) ListPreparer(resourceGroupName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
func (client OperationsClient) ListPreparer() (*http.Request, error) {
|
||||
const APIVersion = "2016-06-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
@@ -82,7 +71,7 @@ func (client OperationsClient) ListPreparer(resourceGroupName string) (*http.Req
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations", pathParameters),
|
||||
autorest.WithPath("/providers/Microsoft.RecoveryServices/operations"),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
@@ -129,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults ClientDiscoveryRespon
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan ClientDiscoveryValueForSingleAPI, <-chan error) {
|
||||
resultChan := make(chan ClientDiscoveryValueForSingleAPI)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.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
|
||||
}
|
||||
}
|
||||
}
|
||||
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