mirror of
https://github.com/restic/restic.git
synced 2025-12-23 01:06:18 +00:00
Update vendored dependencies
This includes github.com/kurin/blazer 0.2.0, which resolves #1291
This commit is contained in:
245
vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/labs.go
generated
vendored
245
vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/labs.go
generated
vendored
@@ -14,9 +14,8 @@ package devtestlabs
|
||||
// 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"
|
||||
@@ -40,13 +39,11 @@ func NewLabsClientWithBaseURI(baseURI string, subscriptionID string) LabsClient
|
||||
return LabsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// ClaimAnyVM claim a random claimable virtual machine in the lab. This
|
||||
// operation can take a while to complete. This method may poll for completion.
|
||||
// Polling can be canceled by passing the cancel channel argument. The channel
|
||||
// will be used to cancel polling and any outstanding HTTP requests.
|
||||
// ClaimAnyVM claim a random claimable virtual machine in the lab. This operation can take a while to complete. This
|
||||
// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be
|
||||
// used to cancel polling and any outstanding HTTP requests.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. name is the name of the
|
||||
// lab.
|
||||
// resourceGroupName is the name of the resource group. name is the name of the lab.
|
||||
func (client LabsClient) ClaimAnyVM(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -54,8 +51,10 @@ func (client LabsClient) ClaimAnyVM(resourceGroupName string, name string, cance
|
||||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -121,14 +120,12 @@ func (client LabsClient) ClaimAnyVMResponder(resp *http.Response) (result autore
|
||||
return
|
||||
}
|
||||
|
||||
// CreateEnvironment create virtual machines in a lab. This operation can take
|
||||
// a while to complete. This method may poll for completion. Polling can be
|
||||
// canceled by passing the cancel channel argument. The channel will be used to
|
||||
// CreateEnvironment create virtual machines in a lab. This operation can take a while to complete. This method may
|
||||
// poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to
|
||||
// cancel polling and any outstanding HTTP requests.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. name is the name of the
|
||||
// lab. labVirtualMachineCreationParameter is properties for creating a virtual
|
||||
// machine.
|
||||
// resourceGroupName is the name of the resource group. name is the name of the lab. labVirtualMachineCreationParameter
|
||||
// is properties for creating a virtual machine.
|
||||
func (client LabsClient) CreateEnvironment(resourceGroupName string, name string, labVirtualMachineCreationParameter LabVirtualMachineCreationParameter, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -154,8 +151,10 @@ func (client LabsClient) CreateEnvironment(resourceGroupName string, name string
|
||||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -223,13 +222,11 @@ func (client LabsClient) CreateEnvironmentResponder(resp *http.Response) (result
|
||||
return
|
||||
}
|
||||
|
||||
// CreateOrUpdate create or replace an existing lab. This operation can take a
|
||||
// while to complete. This method may poll for completion. Polling can be
|
||||
// canceled by passing the cancel channel argument. The channel will be used to
|
||||
// cancel polling and any outstanding HTTP requests.
|
||||
// CreateOrUpdate create or replace an existing lab. This operation can take a while to complete. This method may poll
|
||||
// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
|
||||
// polling and any outstanding HTTP requests.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. name is the name of the
|
||||
// lab. lab is a lab.
|
||||
// resourceGroupName is the name of the resource group. name is the name of the lab. lab is a lab.
|
||||
func (client LabsClient) CreateOrUpdate(resourceGroupName string, name string, lab Lab, cancel <-chan struct{}) (<-chan Lab, <-chan error) {
|
||||
resultChan := make(chan Lab, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -237,8 +234,10 @@ func (client LabsClient) CreateOrUpdate(resourceGroupName string, name string, l
|
||||
var err error
|
||||
var result Lab
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -307,13 +306,11 @@ func (client LabsClient) CreateOrUpdateResponder(resp *http.Response) (result La
|
||||
return
|
||||
}
|
||||
|
||||
// Delete delete lab. This operation can take a while to complete. This method
|
||||
// may poll for completion. Polling can be canceled by passing the cancel
|
||||
// channel argument. The channel will be used to cancel polling and any
|
||||
// outstanding HTTP requests.
|
||||
// Delete delete lab. This operation can take a while to complete. This method may poll for completion. Polling can be
|
||||
// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP
|
||||
// requests.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. name is the name of the
|
||||
// lab.
|
||||
// resourceGroupName is the name of the resource group. name is the name of the lab.
|
||||
func (client LabsClient) Delete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -321,8 +318,10 @@ func (client LabsClient) Delete(resourceGroupName string, name string, cancel <-
|
||||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -388,15 +387,12 @@ func (client LabsClient) DeleteResponder(resp *http.Response) (result autorest.R
|
||||
return
|
||||
}
|
||||
|
||||
// ExportResourceUsage exports the lab resource usage into a storage account
|
||||
// This operation can take a while to complete. This method may poll for
|
||||
// completion. Polling can be canceled by passing the cancel channel argument.
|
||||
// The channel will be used to cancel polling and any outstanding HTTP
|
||||
// requests.
|
||||
// ExportResourceUsage exports the lab resource usage into a storage account This operation can take a while to
|
||||
// complete. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The
|
||||
// channel will be used to cancel polling and any outstanding HTTP requests.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. name is the name of the
|
||||
// lab. exportResourceUsageParameters is the parameters of the export
|
||||
// operation.
|
||||
// resourceGroupName is the name of the resource group. name is the name of the lab. exportResourceUsageParameters is
|
||||
// the parameters of the export operation.
|
||||
func (client LabsClient) ExportResourceUsage(resourceGroupName string, name string, exportResourceUsageParameters ExportResourceUsageParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -404,8 +400,10 @@ func (client LabsClient) ExportResourceUsage(resourceGroupName string, name stri
|
||||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -475,8 +473,8 @@ func (client LabsClient) ExportResourceUsageResponder(resp *http.Response) (resu
|
||||
|
||||
// GenerateUploadURI generate a URI for uploading custom disk images to a Lab.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. name is the name of the
|
||||
// lab. generateUploadURIParameter is properties for generating an upload URI.
|
||||
// resourceGroupName is the name of the resource group. name is the name of the lab. generateUploadURIParameter is
|
||||
// properties for generating an upload URI.
|
||||
func (client LabsClient) GenerateUploadURI(resourceGroupName string, name string, generateUploadURIParameter GenerateUploadURIParameter) (result GenerateUploadURIResponse, err error) {
|
||||
req, err := client.GenerateUploadURIPreparer(resourceGroupName, name, generateUploadURIParameter)
|
||||
if err != nil {
|
||||
@@ -543,9 +541,8 @@ func (client LabsClient) GenerateUploadURIResponder(resp *http.Response) (result
|
||||
|
||||
// Get get lab.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. name is the name of the
|
||||
// lab. expand is specify the $expand query. Example:
|
||||
// 'properties($select=defaultStorageAccount)'
|
||||
// resourceGroupName is the name of the resource group. name is the name of the lab. expand is specify the $expand
|
||||
// query. Example: 'properties($select=defaultStorageAccount)'
|
||||
func (client LabsClient) Get(resourceGroupName string, name string, expand string) (result Lab, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, name, expand)
|
||||
if err != nil {
|
||||
@@ -613,11 +610,10 @@ func (client LabsClient) GetResponder(resp *http.Response) (result Lab, err erro
|
||||
|
||||
// ListByResourceGroup list labs in a resource group.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. expand is specify the
|
||||
// $expand query. Example: 'properties($select=defaultStorageAccount)' filter
|
||||
// is the filter to apply to the operation. top is the maximum number of
|
||||
// resources to return from the operation. orderby is the ordering expression
|
||||
// for the results, using OData notation.
|
||||
// resourceGroupName is the name of the resource group. expand is specify the $expand query. Example:
|
||||
// 'properties($select=defaultStorageAccount)' filter is the filter to apply to the operation. top is the maximum
|
||||
// number of resources to return from the operation. orderby is the ordering expression for the results, using OData
|
||||
// notation.
|
||||
func (client LabsClient) ListByResourceGroup(resourceGroupName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLab, err error) {
|
||||
req, err := client.ListByResourceGroupPreparer(resourceGroupName, expand, filter, top, orderby)
|
||||
if err != nil {
|
||||
@@ -715,13 +711,56 @@ func (client LabsClient) ListByResourceGroupNextResults(lastResults ResponseWith
|
||||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroupComplete gets all elements from the list without paging.
|
||||
func (client LabsClient) ListByResourceGroupComplete(resourceGroupName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Lab, <-chan error) {
|
||||
resultChan := make(chan Lab)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByResourceGroup(resourceGroupName, expand, filter, top, orderby)
|
||||
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.ListByResourceGroupNextResults(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
|
||||
}
|
||||
|
||||
// ListBySubscription list labs in a subscription.
|
||||
//
|
||||
// expand is specify the $expand query. Example:
|
||||
// 'properties($select=defaultStorageAccount)' filter is the filter to apply to
|
||||
// the operation. top is the maximum number of resources to return from the
|
||||
// operation. orderby is the ordering expression for the results, using OData
|
||||
// notation.
|
||||
// expand is specify the $expand query. Example: 'properties($select=defaultStorageAccount)' filter is the filter to
|
||||
// apply to the operation. top is the maximum number of resources to return from the operation. orderby is the ordering
|
||||
// expression for the results, using OData notation.
|
||||
func (client LabsClient) ListBySubscription(expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLab, err error) {
|
||||
req, err := client.ListBySubscriptionPreparer(expand, filter, top, orderby)
|
||||
if err != nil {
|
||||
@@ -818,10 +857,54 @@ func (client LabsClient) ListBySubscriptionNextResults(lastResults ResponseWithC
|
||||
return
|
||||
}
|
||||
|
||||
// ListBySubscriptionComplete gets all elements from the list without paging.
|
||||
func (client LabsClient) ListBySubscriptionComplete(expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Lab, <-chan error) {
|
||||
resultChan := make(chan Lab)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListBySubscription(expand, filter, top, orderby)
|
||||
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.ListBySubscriptionNextResults(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
|
||||
}
|
||||
|
||||
// ListVhds list disk images available for custom image creation.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. name is the name of the
|
||||
// lab.
|
||||
// resourceGroupName is the name of the resource group. name is the name of the lab.
|
||||
func (client LabsClient) ListVhds(resourceGroupName string, name string) (result ResponseWithContinuationLabVhd, err error) {
|
||||
req, err := client.ListVhdsPreparer(resourceGroupName, name)
|
||||
if err != nil {
|
||||
@@ -908,10 +991,54 @@ func (client LabsClient) ListVhdsNextResults(lastResults ResponseWithContinuatio
|
||||
return
|
||||
}
|
||||
|
||||
// ListVhdsComplete gets all elements from the list without paging.
|
||||
func (client LabsClient) ListVhdsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan LabVhd, <-chan error) {
|
||||
resultChan := make(chan LabVhd)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListVhds(resourceGroupName, name)
|
||||
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.ListVhdsNextResults(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
|
||||
}
|
||||
|
||||
// Update modify properties of labs.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. name is the name of the
|
||||
// lab. lab is a lab.
|
||||
// resourceGroupName is the name of the resource group. name is the name of the lab. lab is a lab.
|
||||
func (client LabsClient) Update(resourceGroupName string, name string, lab LabFragment) (result Lab, err error) {
|
||||
req, err := client.UpdatePreparer(resourceGroupName, name, lab)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user