| 1 | package azblobscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ |
| 2 | |
| 3 | // Code generated by Microsoft (R) AutoRest Code Generator. |
| 4 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. |
| 5 | |
| 6 | import ( |
| 7 | "bytesscip-go gomod github.com/golang/go/src go1.15 bytes/" |
| 8 | "contextscip-go gomod github.com/golang/go/src go1.15 context/" |
| 9 | "encoding/xmlscip-go gomod github.com/golang/go/src go1.15 `encoding/xml`/" |
| 10 | "github.com/Azure/azure-pipeline-go/pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/" |
| 11 | "ioscip-go gomod github.com/golang/go/src go1.15 io/" |
| 12 | "io/ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/" |
| 13 | "net/httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/" |
| 14 | "net/urlscip-go gomod github.com/golang/go/src go1.15 `net/url`/" |
| 15 | "strconvscip-go gomod github.com/golang/go/src go1.15 strconv/" |
| 16 | "timescip-go gomod github.com/golang/go/src go1.15 time/" |
| 17 | ) |
| 18 | |
| 19 | // containerClient is the client for the Container methods of the Azblob service. |
| 20 | type containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient# struct { |
| 21 | managementClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#managementClient. |
| 22 | } |
| 23 | |
| 24 | // newContainerClient creates an instance of the containerClient client. |
| 25 | func newContainerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/newContainerClient().(url urlscip-go gomod github.com/golang/go/src go1.15 `net/url`/.URLscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#, p pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#) containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient# { |
| 26 | return containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#{newManagementClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/newManagementClient().(url, p)} |
| 27 | } |
| 28 | |
| 29 | // AcquireLease [Update] establishes and manages a lock on a container for delete operations. The lock duration can be |
| 30 | // 15 to 60 seconds, or can be infinite |
| 31 | // |
| 32 | // timeout is the timeout parameter is expressed in seconds. For more information, see <a |
| 33 | // href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting |
| 34 | // Timeouts for Blob Service Operations.</a> duration is specifies the duration of the lease, in seconds, or negative |
| 35 | // one (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration |
| 36 | // cannot be changed using renew or change. proposedLeaseID is proposed lease ID, in a GUID string format. The Blob |
| 37 | // service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor |
| 38 | // (String) for a list of valid GUID string formats. ifModifiedSince is specify this header value to operate only on a |
| 39 | // blob if it has been modified since the specified date/time. ifUnmodifiedSince is specify this header value to |
| 40 | // operate only on a blob if it has not been modified since the specified date/time. requestID is provides a |
| 41 | // client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage |
| 42 | // analytics logging is enabled. |
| 43 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) AcquireLeasescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#AcquireLease().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, timeout *int32, duration *int32, proposedLeaseID *string, ifModifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, ifUnmodifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, requestID *string) (*ContainerAcquireLeaseResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerAcquireLeaseResponse#, error) { |
| 44 | if err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 45 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: timeout, |
| 46 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 47 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 0, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}}); err != nil { |
| 48 | return nil, err |
| 49 | } |
| 50 | req, err := client.acquireLeasePreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#acquireLeasePreparer().(timeout, duration, proposedLeaseID, ifModifiedSince, ifUnmodifiedSince, requestID) |
| 51 | if err != nil { |
| 52 | return nil, err |
| 53 | } |
| 54 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.acquireLeaseResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#acquireLeaseResponder().}, req) |
| 55 | if err != nil { |
| 56 | return nil, err |
| 57 | } |
| 58 | return resp.(*ContainerAcquireLeaseResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerAcquireLeaseResponse#), err |
| 59 | } |
| 60 | |
| 61 | // acquireLeasePreparer prepares the AcquireLease request. |
| 62 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) acquireLeasePreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#acquireLeasePreparer().(timeout *int32, duration *int32, proposedLeaseID *string, ifModifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, ifUnmodifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, requestID *string) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 63 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("PUT", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., nil) |
| 64 | if err != nil { |
| 65 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 66 | } |
| 67 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 68 | if timeout != nil { |
| 69 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("timeout", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*timeout), 10)) |
| 70 | } |
| 71 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("comp", "lease") |
| 72 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "container") |
| 73 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 74 | if duration != nil { |
| 75 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-lease-duration", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*duration), 10)) |
| 76 | } |
| 77 | if proposedLeaseID != nil { |
| 78 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-proposed-lease-id", *proposedLeaseID) |
| 79 | } |
| 80 | if ifModifiedSince != nil { |
| 81 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("If-Modified-Since", (*ifModifiedSince).Inscip-go gomod github.com/golang/go/src go1.15 time/Time#In().(gmtscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/gmt.).Formatscip-go gomod github.com/golang/go/src go1.15 time/Time#Format().(timescip-go gomod github.com/golang/go/src go1.15 time/.RFC1123scip-go gomod github.com/golang/go/src go1.15 time/RFC1123.)) |
| 82 | } |
| 83 | if ifUnmodifiedSince != nil { |
| 84 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("If-Unmodified-Since", (*ifUnmodifiedSince).Inscip-go gomod github.com/golang/go/src go1.15 time/Time#In().(gmtscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/gmt.).Formatscip-go gomod github.com/golang/go/src go1.15 time/Time#Format().(timescip-go gomod github.com/golang/go/src go1.15 time/.RFC1123scip-go gomod github.com/golang/go/src go1.15 time/RFC1123.)) |
| 85 | } |
| 86 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 87 | if requestID != nil { |
| 88 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-client-request-id", *requestID) |
| 89 | } |
| 90 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-lease-action", "acquire") |
| 91 | return req, nil |
| 92 | } |
| 93 | |
| 94 | // acquireLeaseResponder handles the response to the AcquireLease request. |
| 95 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) acquireLeaseResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#acquireLeaseResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 96 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK., httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusCreatedscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusCreated.) |
| 97 | if resp == nil { |
| 98 | return nil, err |
| 99 | } |
| 100 | ioscip-go gomod github.com/golang/go/src go1.15 io/.Copyscip-go gomod github.com/golang/go/src go1.15 io/Copy().(ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/.Discardscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/Discard., resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body.) |
| 101 | resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body..Closescip-go gomod github.com/golang/go/src go1.15 io/Closer#Close().() |
| 102 | return &ContainerAcquireLeaseResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerAcquireLeaseResponse#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerAcquireLeaseResponse#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()}, err |
| 103 | } |
| 104 | |
| 105 | // BreakLease [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 |
| 106 | // to 60 seconds, or can be infinite |
| 107 | // |
| 108 | // timeout is the timeout parameter is expressed in seconds. For more information, see <a |
| 109 | // href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting |
| 110 | // Timeouts for Blob Service Operations.</a> breakPeriod is for a break operation, proposed duration the lease should |
| 111 | // continue before it is broken, in seconds, between 0 and 60. This break period is only used if it is shorter than the |
| 112 | // time remaining on the lease. If longer, the time remaining on the lease is used. A new lease will not be available |
| 113 | // before the break period has expired, but the lease may be held for longer than the break period. If this header does |
| 114 | // not appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an |
| 115 | // infinite lease breaks immediately. ifModifiedSince is specify this header value to operate only on a blob if it has |
| 116 | // been modified since the specified date/time. ifUnmodifiedSince is specify this header value to operate only on a |
| 117 | // blob if it has not been modified since the specified date/time. requestID is provides a client-generated, opaque |
| 118 | // value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. |
| 119 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) BreakLeasescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#BreakLease().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, timeout *int32, breakPeriod *int32, ifModifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, ifUnmodifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, requestID *string) (*ContainerBreakLeaseResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerBreakLeaseResponse#, error) { |
| 120 | if err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 121 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: timeout, |
| 122 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 123 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 0, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}}); err != nil { |
| 124 | return nil, err |
| 125 | } |
| 126 | req, err := client.breakLeasePreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#breakLeasePreparer().(timeout, breakPeriod, ifModifiedSince, ifUnmodifiedSince, requestID) |
| 127 | if err != nil { |
| 128 | return nil, err |
| 129 | } |
| 130 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.breakLeaseResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#breakLeaseResponder().}, req) |
| 131 | if err != nil { |
| 132 | return nil, err |
| 133 | } |
| 134 | return resp.(*ContainerBreakLeaseResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerBreakLeaseResponse#), err |
| 135 | } |
| 136 | |
| 137 | // breakLeasePreparer prepares the BreakLease request. |
| 138 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) breakLeasePreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#breakLeasePreparer().(timeout *int32, breakPeriod *int32, ifModifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, ifUnmodifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, requestID *string) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 139 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("PUT", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., nil) |
| 140 | if err != nil { |
| 141 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 142 | } |
| 143 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 144 | if timeout != nil { |
| 145 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("timeout", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*timeout), 10)) |
| 146 | } |
| 147 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("comp", "lease") |
| 148 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "container") |
| 149 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 150 | if breakPeriod != nil { |
| 151 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-lease-break-period", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*breakPeriod), 10)) |
| 152 | } |
| 153 | if ifModifiedSince != nil { |
| 154 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("If-Modified-Since", (*ifModifiedSince).Inscip-go gomod github.com/golang/go/src go1.15 time/Time#In().(gmtscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/gmt.).Formatscip-go gomod github.com/golang/go/src go1.15 time/Time#Format().(timescip-go gomod github.com/golang/go/src go1.15 time/.RFC1123scip-go gomod github.com/golang/go/src go1.15 time/RFC1123.)) |
| 155 | } |
| 156 | if ifUnmodifiedSince != nil { |
| 157 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("If-Unmodified-Since", (*ifUnmodifiedSince).Inscip-go gomod github.com/golang/go/src go1.15 time/Time#In().(gmtscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/gmt.).Formatscip-go gomod github.com/golang/go/src go1.15 time/Time#Format().(timescip-go gomod github.com/golang/go/src go1.15 time/.RFC1123scip-go gomod github.com/golang/go/src go1.15 time/RFC1123.)) |
| 158 | } |
| 159 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 160 | if requestID != nil { |
| 161 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-client-request-id", *requestID) |
| 162 | } |
| 163 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-lease-action", "break") |
| 164 | return req, nil |
| 165 | } |
| 166 | |
| 167 | // breakLeaseResponder handles the response to the BreakLease request. |
| 168 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) breakLeaseResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#breakLeaseResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 169 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK., httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusAcceptedscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusAccepted.) |
| 170 | if resp == nil { |
| 171 | return nil, err |
| 172 | } |
| 173 | ioscip-go gomod github.com/golang/go/src go1.15 io/.Copyscip-go gomod github.com/golang/go/src go1.15 io/Copy().(ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/.Discardscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/Discard., resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body.) |
| 174 | resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body..Closescip-go gomod github.com/golang/go/src go1.15 io/Closer#Close().() |
| 175 | return &ContainerBreakLeaseResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerBreakLeaseResponse#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerBreakLeaseResponse#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()}, err |
| 176 | } |
| 177 | |
| 178 | // ChangeLease [Update] establishes and manages a lock on a container for delete operations. The lock duration can be |
| 179 | // 15 to 60 seconds, or can be infinite |
| 180 | // |
| 181 | // leaseID is specifies the current lease ID on the resource. proposedLeaseID is proposed lease ID, in a GUID string |
| 182 | // format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See |
| 183 | // Guid Constructor (String) for a list of valid GUID string formats. timeout is the timeout parameter is expressed in |
| 184 | // seconds. For more information, see <a |
| 185 | // href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting |
| 186 | // Timeouts for Blob Service Operations.</a> ifModifiedSince is specify this header value to operate only on a blob if |
| 187 | // it has been modified since the specified date/time. ifUnmodifiedSince is specify this header value to operate only |
| 188 | // on a blob if it has not been modified since the specified date/time. requestID is provides a client-generated, |
| 189 | // opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is |
| 190 | // enabled. |
| 191 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) ChangeLeasescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#ChangeLease().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, leaseID string, proposedLeaseID string, timeout *int32, ifModifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, ifUnmodifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, requestID *string) (*ContainerChangeLeaseResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerChangeLeaseResponse#, error) { |
| 192 | if err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 193 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: timeout, |
| 194 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 195 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 0, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}}); err != nil { |
| 196 | return nil, err |
| 197 | } |
| 198 | req, err := client.changeLeasePreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#changeLeasePreparer().(leaseID, proposedLeaseID, timeout, ifModifiedSince, ifUnmodifiedSince, requestID) |
| 199 | if err != nil { |
| 200 | return nil, err |
| 201 | } |
| 202 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.changeLeaseResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#changeLeaseResponder().}, req) |
| 203 | if err != nil { |
| 204 | return nil, err |
| 205 | } |
| 206 | return resp.(*ContainerChangeLeaseResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerChangeLeaseResponse#), err |
| 207 | } |
| 208 | |
| 209 | // changeLeasePreparer prepares the ChangeLease request. |
| 210 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) changeLeasePreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#changeLeasePreparer().(leaseID string, proposedLeaseID string, timeout *int32, ifModifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, ifUnmodifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, requestID *string) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 211 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("PUT", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., nil) |
| 212 | if err != nil { |
| 213 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 214 | } |
| 215 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 216 | if timeout != nil { |
| 217 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("timeout", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*timeout), 10)) |
| 218 | } |
| 219 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("comp", "lease") |
| 220 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "container") |
| 221 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 222 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-lease-id", leaseID) |
| 223 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-proposed-lease-id", proposedLeaseID) |
| 224 | if ifModifiedSince != nil { |
| 225 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("If-Modified-Since", (*ifModifiedSince).Inscip-go gomod github.com/golang/go/src go1.15 time/Time#In().(gmtscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/gmt.).Formatscip-go gomod github.com/golang/go/src go1.15 time/Time#Format().(timescip-go gomod github.com/golang/go/src go1.15 time/.RFC1123scip-go gomod github.com/golang/go/src go1.15 time/RFC1123.)) |
| 226 | } |
| 227 | if ifUnmodifiedSince != nil { |
| 228 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("If-Unmodified-Since", (*ifUnmodifiedSince).Inscip-go gomod github.com/golang/go/src go1.15 time/Time#In().(gmtscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/gmt.).Formatscip-go gomod github.com/golang/go/src go1.15 time/Time#Format().(timescip-go gomod github.com/golang/go/src go1.15 time/.RFC1123scip-go gomod github.com/golang/go/src go1.15 time/RFC1123.)) |
| 229 | } |
| 230 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 231 | if requestID != nil { |
| 232 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-client-request-id", *requestID) |
| 233 | } |
| 234 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-lease-action", "change") |
| 235 | return req, nil |
| 236 | } |
| 237 | |
| 238 | // changeLeaseResponder handles the response to the ChangeLease request. |
| 239 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) changeLeaseResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#changeLeaseResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 240 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK.) |
| 241 | if resp == nil { |
| 242 | return nil, err |
| 243 | } |
| 244 | ioscip-go gomod github.com/golang/go/src go1.15 io/.Copyscip-go gomod github.com/golang/go/src go1.15 io/Copy().(ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/.Discardscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/Discard., resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body.) |
| 245 | resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body..Closescip-go gomod github.com/golang/go/src go1.15 io/Closer#Close().() |
| 246 | return &ContainerChangeLeaseResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerChangeLeaseResponse#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerChangeLeaseResponse#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()}, err |
| 247 | } |
| 248 | |
| 249 | // Create creates a new container under the specified account. If the container with the same name already exists, the |
| 250 | // operation fails |
| 251 | // |
| 252 | // timeout is the timeout parameter is expressed in seconds. For more information, see <a |
| 253 | // href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting |
| 254 | // Timeouts for Blob Service Operations.</a> metadata is optional. Specifies a user-defined name-value pair associated |
| 255 | // with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or |
| 256 | // file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with |
| 257 | // the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version |
| 258 | // 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing |
| 259 | // Containers, Blobs, and Metadata for more information. access is specifies whether data in the container may be |
| 260 | // accessed publicly and the level of access requestID is provides a client-generated, opaque value with a 1 KB |
| 261 | // character limit that is recorded in the analytics logs when storage analytics logging is enabled. |
| 262 | // defaultEncryptionScope is optional. Version 2019-07-07 and later. Specifies the default encryption scope to set on |
| 263 | // the container and use for all future writes. preventEncryptionScopeOverride is optional. Version 2019-07-07 and |
| 264 | // newer. If true, prevents any request from specifying a different encryption scope than the scope set on the |
| 265 | // container. |
| 266 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) Createscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#Create().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, timeout *int32, metadata map[string]string, access PublicAccessTypescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/PublicAccessType#, requestID *string, defaultEncryptionScope *string, preventEncryptionScopeOverride *bool) (*ContainerCreateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerCreateResponse#, error) { |
| 267 | if err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 268 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: timeout, |
| 269 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 270 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 0, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}}); err != nil { |
| 271 | return nil, err |
| 272 | } |
| 273 | req, err := client.createPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#createPreparer().(timeout, metadata, access, requestID, defaultEncryptionScope, preventEncryptionScopeOverride) |
| 274 | if err != nil { |
| 275 | return nil, err |
| 276 | } |
| 277 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.createResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#createResponder().}, req) |
| 278 | if err != nil { |
| 279 | return nil, err |
| 280 | } |
| 281 | return resp.(*ContainerCreateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerCreateResponse#), err |
| 282 | } |
| 283 | |
| 284 | // createPreparer prepares the Create request. |
| 285 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) createPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#createPreparer().(timeout *int32, metadata map[string]string, access PublicAccessTypescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/PublicAccessType#, requestID *string, defaultEncryptionScope *string, preventEncryptionScopeOverride *bool) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 286 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("PUT", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., nil) |
| 287 | if err != nil { |
| 288 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 289 | } |
| 290 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 291 | if timeout != nil { |
| 292 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("timeout", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*timeout), 10)) |
| 293 | } |
| 294 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "container") |
| 295 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 296 | if metadata != nil { |
| 297 | for k, v := range metadata { |
| 298 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-meta-"+k, v) |
| 299 | } |
| 300 | } |
| 301 | if access != PublicAccessNonescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/PublicAccessNone. { |
| 302 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-blob-public-access", string(access)) |
| 303 | } |
| 304 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 305 | if requestID != nil { |
| 306 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-client-request-id", *requestID) |
| 307 | } |
| 308 | if defaultEncryptionScope != nil { |
| 309 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-default-encryption-scope", *defaultEncryptionScope) |
| 310 | } |
| 311 | if preventEncryptionScopeOverride != nil { |
| 312 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-deny-encryption-scope-override", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatBoolscip-go gomod github.com/golang/go/src go1.15 strconv/FormatBool().(*preventEncryptionScopeOverride)) |
| 313 | } |
| 314 | return req, nil |
| 315 | } |
| 316 | |
| 317 | // createResponder handles the response to the Create request. |
| 318 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) createResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#createResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 319 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK., httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusCreatedscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusCreated.) |
| 320 | if resp == nil { |
| 321 | return nil, err |
| 322 | } |
| 323 | ioscip-go gomod github.com/golang/go/src go1.15 io/.Copyscip-go gomod github.com/golang/go/src go1.15 io/Copy().(ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/.Discardscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/Discard., resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body.) |
| 324 | resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body..Closescip-go gomod github.com/golang/go/src go1.15 io/Closer#Close().() |
| 325 | return &ContainerCreateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerCreateResponse#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerCreateResponse#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()}, err |
| 326 | } |
| 327 | |
| 328 | // Delete operation marks the specified container for deletion. The container and any blobs contained within it are |
| 329 | // later deleted during garbage collection |
| 330 | // |
| 331 | // timeout is the timeout parameter is expressed in seconds. For more information, see <a |
| 332 | // href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting |
| 333 | // Timeouts for Blob Service Operations.</a> leaseID is if specified, the operation only succeeds if the resource's |
| 334 | // lease is active and matches this ID. ifModifiedSince is specify this header value to operate only on a blob if it |
| 335 | // has been modified since the specified date/time. ifUnmodifiedSince is specify this header value to operate only on a |
| 336 | // blob if it has not been modified since the specified date/time. requestID is provides a client-generated, opaque |
| 337 | // value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. |
| 338 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) Deletescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#Delete().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, timeout *int32, leaseID *string, ifModifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, ifUnmodifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, requestID *string) (*ContainerDeleteResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerDeleteResponse#, error) { |
| 339 | if err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 340 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: timeout, |
| 341 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 342 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 0, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}}); err != nil { |
| 343 | return nil, err |
| 344 | } |
| 345 | req, err := client.deletePreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#deletePreparer().(timeout, leaseID, ifModifiedSince, ifUnmodifiedSince, requestID) |
| 346 | if err != nil { |
| 347 | return nil, err |
| 348 | } |
| 349 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.deleteResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#deleteResponder().}, req) |
| 350 | if err != nil { |
| 351 | return nil, err |
| 352 | } |
| 353 | return resp.(*ContainerDeleteResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerDeleteResponse#), err |
| 354 | } |
| 355 | |
| 356 | // deletePreparer prepares the Delete request. |
| 357 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) deletePreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#deletePreparer().(timeout *int32, leaseID *string, ifModifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, ifUnmodifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, requestID *string) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 358 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("DELETE", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., nil) |
| 359 | if err != nil { |
| 360 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 361 | } |
| 362 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 363 | if timeout != nil { |
| 364 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("timeout", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*timeout), 10)) |
| 365 | } |
| 366 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "container") |
| 367 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 368 | if leaseID != nil { |
| 369 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-lease-id", *leaseID) |
| 370 | } |
| 371 | if ifModifiedSince != nil { |
| 372 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("If-Modified-Since", (*ifModifiedSince).Inscip-go gomod github.com/golang/go/src go1.15 time/Time#In().(gmtscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/gmt.).Formatscip-go gomod github.com/golang/go/src go1.15 time/Time#Format().(timescip-go gomod github.com/golang/go/src go1.15 time/.RFC1123scip-go gomod github.com/golang/go/src go1.15 time/RFC1123.)) |
| 373 | } |
| 374 | if ifUnmodifiedSince != nil { |
| 375 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("If-Unmodified-Since", (*ifUnmodifiedSince).Inscip-go gomod github.com/golang/go/src go1.15 time/Time#In().(gmtscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/gmt.).Formatscip-go gomod github.com/golang/go/src go1.15 time/Time#Format().(timescip-go gomod github.com/golang/go/src go1.15 time/.RFC1123scip-go gomod github.com/golang/go/src go1.15 time/RFC1123.)) |
| 376 | } |
| 377 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 378 | if requestID != nil { |
| 379 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-client-request-id", *requestID) |
| 380 | } |
| 381 | return req, nil |
| 382 | } |
| 383 | |
| 384 | // deleteResponder handles the response to the Delete request. |
| 385 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) deleteResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#deleteResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 386 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK., httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusAcceptedscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusAccepted.) |
| 387 | if resp == nil { |
| 388 | return nil, err |
| 389 | } |
| 390 | ioscip-go gomod github.com/golang/go/src go1.15 io/.Copyscip-go gomod github.com/golang/go/src go1.15 io/Copy().(ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/.Discardscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/Discard., resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body.) |
| 391 | resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body..Closescip-go gomod github.com/golang/go/src go1.15 io/Closer#Close().() |
| 392 | return &ContainerDeleteResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerDeleteResponse#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerDeleteResponse#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()}, err |
| 393 | } |
| 394 | |
| 395 | // GetAccessPolicy gets the permissions for the specified container. The permissions indicate whether container data |
| 396 | // may be accessed publicly. |
| 397 | // |
| 398 | // timeout is the timeout parameter is expressed in seconds. For more information, see <a |
| 399 | // href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting |
| 400 | // Timeouts for Blob Service Operations.</a> leaseID is if specified, the operation only succeeds if the resource's |
| 401 | // lease is active and matches this ID. requestID is provides a client-generated, opaque value with a 1 KB character |
| 402 | // limit that is recorded in the analytics logs when storage analytics logging is enabled. |
| 403 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) GetAccessPolicyscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#GetAccessPolicy().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, timeout *int32, leaseID *string, requestID *string) (*SignedIdentifiersscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/SignedIdentifiers#, error) { |
| 404 | if err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 405 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: timeout, |
| 406 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 407 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 0, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}}); err != nil { |
| 408 | return nil, err |
| 409 | } |
| 410 | req, err := client.getAccessPolicyPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#getAccessPolicyPreparer().(timeout, leaseID, requestID) |
| 411 | if err != nil { |
| 412 | return nil, err |
| 413 | } |
| 414 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.getAccessPolicyResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#getAccessPolicyResponder().}, req) |
| 415 | if err != nil { |
| 416 | return nil, err |
| 417 | } |
| 418 | return resp.(*SignedIdentifiersscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/SignedIdentifiers#), err |
| 419 | } |
| 420 | |
| 421 | // getAccessPolicyPreparer prepares the GetAccessPolicy request. |
| 422 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) getAccessPolicyPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#getAccessPolicyPreparer().(timeout *int32, leaseID *string, requestID *string) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 423 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("GET", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., nil) |
| 424 | if err != nil { |
| 425 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 426 | } |
| 427 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 428 | if timeout != nil { |
| 429 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("timeout", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*timeout), 10)) |
| 430 | } |
| 431 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "container") |
| 432 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("comp", "acl") |
| 433 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 434 | if leaseID != nil { |
| 435 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-lease-id", *leaseID) |
| 436 | } |
| 437 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 438 | if requestID != nil { |
| 439 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-client-request-id", *requestID) |
| 440 | } |
| 441 | return req, nil |
| 442 | } |
| 443 | |
| 444 | // getAccessPolicyResponder handles the response to the GetAccessPolicy request. |
| 445 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) getAccessPolicyResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#getAccessPolicyResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 446 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK.) |
| 447 | if resp == nil { |
| 448 | return nil, err |
| 449 | } |
| 450 | result := &SignedIdentifiersscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/SignedIdentifiers#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/SignedIdentifiers#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()} |
| 451 | if err != nil { |
| 452 | return result, err |
| 453 | } |
| 454 | defer resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body..Closescip-go gomod github.com/golang/go/src go1.15 io/Closer#Close().() |
| 455 | b, err := ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/.ReadAllscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/ReadAll().(resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body.) |
| 456 | if err != nil { |
| 457 | return result, err |
| 458 | } |
| 459 | if len(b) > 0 { |
| 460 | b = removeBOMscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/removeBOM().(b) |
| 461 | err = xmlscip-go gomod github.com/golang/go/src go1.15 `encoding/xml`/.Unmarshalscip-go gomod github.com/golang/go/src go1.15 `encoding/xml`/Unmarshal().(b, result) |
| 462 | if err != nil { |
| 463 | return result, NewResponseErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/NewResponseError().(err, resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().(), "failed to unmarshal response body") |
| 464 | } |
| 465 | } |
| 466 | return result, nil |
| 467 | } |
| 468 | |
| 469 | // GetAccountInfo returns the sku name and account kind |
| 470 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) GetAccountInfoscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#GetAccountInfo().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#) (*ContainerGetAccountInfoResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerGetAccountInfoResponse#, error) { |
| 471 | req, err := client.getAccountInfoPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#getAccountInfoPreparer().() |
| 472 | if err != nil { |
| 473 | return nil, err |
| 474 | } |
| 475 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.getAccountInfoResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#getAccountInfoResponder().}, req) |
| 476 | if err != nil { |
| 477 | return nil, err |
| 478 | } |
| 479 | return resp.(*ContainerGetAccountInfoResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerGetAccountInfoResponse#), err |
| 480 | } |
| 481 | |
| 482 | // getAccountInfoPreparer prepares the GetAccountInfo request. |
| 483 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) getAccountInfoPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#getAccountInfoPreparer().() (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 484 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("GET", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., nil) |
| 485 | if err != nil { |
| 486 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 487 | } |
| 488 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 489 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "account") |
| 490 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("comp", "properties") |
| 491 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 492 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 493 | return req, nil |
| 494 | } |
| 495 | |
| 496 | // getAccountInfoResponder handles the response to the GetAccountInfo request. |
| 497 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) getAccountInfoResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#getAccountInfoResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 498 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK.) |
| 499 | if resp == nil { |
| 500 | return nil, err |
| 501 | } |
| 502 | ioscip-go gomod github.com/golang/go/src go1.15 io/.Copyscip-go gomod github.com/golang/go/src go1.15 io/Copy().(ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/.Discardscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/Discard., resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body.) |
| 503 | resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body..Closescip-go gomod github.com/golang/go/src go1.15 io/Closer#Close().() |
| 504 | return &ContainerGetAccountInfoResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerGetAccountInfoResponse#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerGetAccountInfoResponse#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()}, err |
| 505 | } |
| 506 | |
| 507 | // GetProperties returns all user-defined metadata and system properties for the specified container. The data returned |
| 508 | // does not include the container's list of blobs |
| 509 | // |
| 510 | // timeout is the timeout parameter is expressed in seconds. For more information, see <a |
| 511 | // href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting |
| 512 | // Timeouts for Blob Service Operations.</a> leaseID is if specified, the operation only succeeds if the resource's |
| 513 | // lease is active and matches this ID. requestID is provides a client-generated, opaque value with a 1 KB character |
| 514 | // limit that is recorded in the analytics logs when storage analytics logging is enabled. |
| 515 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) GetPropertiesscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#GetProperties().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, timeout *int32, leaseID *string, requestID *string) (*ContainerGetPropertiesResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerGetPropertiesResponse#, error) { |
| 516 | if err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 517 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: timeout, |
| 518 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 519 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 0, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}}); err != nil { |
| 520 | return nil, err |
| 521 | } |
| 522 | req, err := client.getPropertiesPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#getPropertiesPreparer().(timeout, leaseID, requestID) |
| 523 | if err != nil { |
| 524 | return nil, err |
| 525 | } |
| 526 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.getPropertiesResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#getPropertiesResponder().}, req) |
| 527 | if err != nil { |
| 528 | return nil, err |
| 529 | } |
| 530 | return resp.(*ContainerGetPropertiesResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerGetPropertiesResponse#), err |
| 531 | } |
| 532 | |
| 533 | // getPropertiesPreparer prepares the GetProperties request. |
| 534 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) getPropertiesPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#getPropertiesPreparer().(timeout *int32, leaseID *string, requestID *string) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 535 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("GET", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., nil) |
| 536 | if err != nil { |
| 537 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 538 | } |
| 539 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 540 | if timeout != nil { |
| 541 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("timeout", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*timeout), 10)) |
| 542 | } |
| 543 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "container") |
| 544 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 545 | if leaseID != nil { |
| 546 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-lease-id", *leaseID) |
| 547 | } |
| 548 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 549 | if requestID != nil { |
| 550 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-client-request-id", *requestID) |
| 551 | } |
| 552 | return req, nil |
| 553 | } |
| 554 | |
| 555 | // getPropertiesResponder handles the response to the GetProperties request. |
| 556 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) getPropertiesResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#getPropertiesResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 557 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK.) |
| 558 | if resp == nil { |
| 559 | return nil, err |
| 560 | } |
| 561 | ioscip-go gomod github.com/golang/go/src go1.15 io/.Copyscip-go gomod github.com/golang/go/src go1.15 io/Copy().(ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/.Discardscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/Discard., resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body.) |
| 562 | resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body..Closescip-go gomod github.com/golang/go/src go1.15 io/Closer#Close().() |
| 563 | return &ContainerGetPropertiesResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerGetPropertiesResponse#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerGetPropertiesResponse#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()}, err |
| 564 | } |
| 565 | |
| 566 | // ListBlobFlatSegment [Update] The List Blobs operation returns a list of the blobs under the specified container |
| 567 | // |
| 568 | // prefix is filters the results to return only containers whose name begins with the specified prefix. marker is a |
| 569 | // string value that identifies the portion of the list of containers to be returned with the next listing operation. |
| 570 | // The operation returns the NextMarker value within the response body if the listing operation did not return all |
| 571 | // containers remaining to be listed with the current page. The NextMarker value can be used as the value for the |
| 572 | // marker parameter in a subsequent call to request the next page of list items. The marker value is opaque to the |
| 573 | // client. maxresults is specifies the maximum number of containers to return. If the request does not specify |
| 574 | // maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. Note that if the |
| 575 | // listing operation crosses a partition boundary, then the service will return a continuation token for retrieving the |
| 576 | // remainder of the results. For this reason, it is possible that the service will return fewer results than specified |
| 577 | // by maxresults, or than the default of 5000. include is include this parameter to specify one or more datasets to |
| 578 | // include in the response. timeout is the timeout parameter is expressed in seconds. For more information, see <a |
| 579 | // href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting |
| 580 | // Timeouts for Blob Service Operations.</a> requestID is provides a client-generated, opaque value with a 1 KB |
| 581 | // character limit that is recorded in the analytics logs when storage analytics logging is enabled. |
| 582 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) ListBlobFlatSegmentscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#ListBlobFlatSegment().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, prefix *string, marker *string, maxresults *int32, include []ListBlobsIncludeItemTypescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ListBlobsIncludeItemType#, timeout *int32, requestID *string) (*ListBlobsFlatSegmentResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ListBlobsFlatSegmentResponse#, error) { |
| 583 | if err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 584 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: maxresults, |
| 585 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "maxresults", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 586 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "maxresults", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 1, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}, |
| 587 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: timeout, |
| 588 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 589 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 0, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}}); err != nil { |
| 590 | return nil, err |
| 591 | } |
| 592 | req, err := client.listBlobFlatSegmentPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#listBlobFlatSegmentPreparer().(prefix, marker, maxresults, include, timeout, requestID) |
| 593 | if err != nil { |
| 594 | return nil, err |
| 595 | } |
| 596 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.listBlobFlatSegmentResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#listBlobFlatSegmentResponder().}, req) |
| 597 | if err != nil { |
| 598 | return nil, err |
| 599 | } |
| 600 | return resp.(*ListBlobsFlatSegmentResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ListBlobsFlatSegmentResponse#), err |
| 601 | } |
| 602 | |
| 603 | // listBlobFlatSegmentPreparer prepares the ListBlobFlatSegment request. |
| 604 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) listBlobFlatSegmentPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#listBlobFlatSegmentPreparer().(prefix *string, marker *string, maxresults *int32, include []ListBlobsIncludeItemTypescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ListBlobsIncludeItemType#, timeout *int32, requestID *string) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 605 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("GET", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., nil) |
| 606 | if err != nil { |
| 607 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 608 | } |
| 609 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 610 | if prefix != nil && len(*prefix) > 0 { |
| 611 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("prefix", *prefix) |
| 612 | } |
| 613 | if marker != nil && len(*marker) > 0 { |
| 614 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("marker", *marker) |
| 615 | } |
| 616 | if maxresults != nil { |
| 617 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("maxresults", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*maxresults), 10)) |
| 618 | } |
| 619 | if include != nil && len(include) > 0 { |
| 620 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("include", joinConstscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/joinConst().(include, ",")) |
| 621 | } |
| 622 | if timeout != nil { |
| 623 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("timeout", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*timeout), 10)) |
| 624 | } |
| 625 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "container") |
| 626 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("comp", "list") |
| 627 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 628 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 629 | if requestID != nil { |
| 630 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-client-request-id", *requestID) |
| 631 | } |
| 632 | return req, nil |
| 633 | } |
| 634 | |
| 635 | // listBlobFlatSegmentResponder handles the response to the ListBlobFlatSegment request. |
| 636 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) listBlobFlatSegmentResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#listBlobFlatSegmentResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 637 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK.) |
| 638 | if resp == nil { |
| 639 | return nil, err |
| 640 | } |
| 641 | result := &ListBlobsFlatSegmentResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ListBlobsFlatSegmentResponse#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ListBlobsFlatSegmentResponse#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()} |
| 642 | if err != nil { |
| 643 | return result, err |
| 644 | } |
| 645 | defer resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body..Closescip-go gomod github.com/golang/go/src go1.15 io/Closer#Close().() |
| 646 | b, err := ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/.ReadAllscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/ReadAll().(resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body.) |
| 647 | if err != nil { |
| 648 | return result, err |
| 649 | } |
| 650 | if len(b) > 0 { |
| 651 | b = removeBOMscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/removeBOM().(b) |
| 652 | err = xmlscip-go gomod github.com/golang/go/src go1.15 `encoding/xml`/.Unmarshalscip-go gomod github.com/golang/go/src go1.15 `encoding/xml`/Unmarshal().(b, result) |
| 653 | if err != nil { |
| 654 | return result, NewResponseErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/NewResponseError().(err, resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().(), "failed to unmarshal response body") |
| 655 | } |
| 656 | } |
| 657 | return result, nil |
| 658 | } |
| 659 | |
| 660 | // ListBlobHierarchySegment [Update] The List Blobs operation returns a list of the blobs under the specified container |
| 661 | // |
| 662 | // delimiter is when the request includes this parameter, the operation returns a BlobPrefix element in the response |
| 663 | // body that acts as a placeholder for all blobs whose names begin with the same substring up to the appearance of the |
| 664 | // delimiter character. The delimiter may be a single character or a string. prefix is filters the results to return |
| 665 | // only containers whose name begins with the specified prefix. marker is a string value that identifies the portion of |
| 666 | // the list of containers to be returned with the next listing operation. The operation returns the NextMarker value |
| 667 | // within the response body if the listing operation did not return all containers remaining to be listed with the |
| 668 | // current page. The NextMarker value can be used as the value for the marker parameter in a subsequent call to request |
| 669 | // the next page of list items. The marker value is opaque to the client. maxresults is specifies the maximum number of |
| 670 | // containers to return. If the request does not specify maxresults, or specifies a value greater than 5000, the server |
| 671 | // will return up to 5000 items. Note that if the listing operation crosses a partition boundary, then the service will |
| 672 | // return a continuation token for retrieving the remainder of the results. For this reason, it is possible that the |
| 673 | // service will return fewer results than specified by maxresults, or than the default of 5000. include is include this |
| 674 | // parameter to specify one or more datasets to include in the response. timeout is the timeout parameter is expressed |
| 675 | // in seconds. For more information, see <a |
| 676 | // href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting |
| 677 | // Timeouts for Blob Service Operations.</a> requestID is provides a client-generated, opaque value with a 1 KB |
| 678 | // character limit that is recorded in the analytics logs when storage analytics logging is enabled. |
| 679 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) ListBlobHierarchySegmentscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#ListBlobHierarchySegment().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, delimiter string, prefix *string, marker *string, maxresults *int32, include []ListBlobsIncludeItemTypescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ListBlobsIncludeItemType#, timeout *int32, requestID *string) (*ListBlobsHierarchySegmentResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ListBlobsHierarchySegmentResponse#, error) { |
| 680 | if err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 681 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: maxresults, |
| 682 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "maxresults", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 683 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "maxresults", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 1, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}, |
| 684 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: timeout, |
| 685 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 686 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 0, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}}); err != nil { |
| 687 | return nil, err |
| 688 | } |
| 689 | req, err := client.listBlobHierarchySegmentPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#listBlobHierarchySegmentPreparer().(delimiter, prefix, marker, maxresults, include, timeout, requestID) |
| 690 | if err != nil { |
| 691 | return nil, err |
| 692 | } |
| 693 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.listBlobHierarchySegmentResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#listBlobHierarchySegmentResponder().}, req) |
| 694 | if err != nil { |
| 695 | return nil, err |
| 696 | } |
| 697 | return resp.(*ListBlobsHierarchySegmentResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ListBlobsHierarchySegmentResponse#), err |
| 698 | } |
| 699 | |
| 700 | // listBlobHierarchySegmentPreparer prepares the ListBlobHierarchySegment request. |
| 701 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) listBlobHierarchySegmentPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#listBlobHierarchySegmentPreparer().(delimiter string, prefix *string, marker *string, maxresults *int32, include []ListBlobsIncludeItemTypescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ListBlobsIncludeItemType#, timeout *int32, requestID *string) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 702 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("GET", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., nil) |
| 703 | if err != nil { |
| 704 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 705 | } |
| 706 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 707 | if prefix != nil && len(*prefix) > 0 { |
| 708 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("prefix", *prefix) |
| 709 | } |
| 710 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("delimiter", delimiter) |
| 711 | if marker != nil && len(*marker) > 0 { |
| 712 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("marker", *marker) |
| 713 | } |
| 714 | if maxresults != nil { |
| 715 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("maxresults", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*maxresults), 10)) |
| 716 | } |
| 717 | if include != nil && len(include) > 0 { |
| 718 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("include", joinConstscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/joinConst().(include, ",")) |
| 719 | } |
| 720 | if timeout != nil { |
| 721 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("timeout", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*timeout), 10)) |
| 722 | } |
| 723 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "container") |
| 724 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("comp", "list") |
| 725 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 726 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 727 | if requestID != nil { |
| 728 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-client-request-id", *requestID) |
| 729 | } |
| 730 | return req, nil |
| 731 | } |
| 732 | |
| 733 | // listBlobHierarchySegmentResponder handles the response to the ListBlobHierarchySegment request. |
| 734 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) listBlobHierarchySegmentResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#listBlobHierarchySegmentResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 735 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK.) |
| 736 | if resp == nil { |
| 737 | return nil, err |
| 738 | } |
| 739 | result := &ListBlobsHierarchySegmentResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ListBlobsHierarchySegmentResponse#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ListBlobsHierarchySegmentResponse#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()} |
| 740 | if err != nil { |
| 741 | return result, err |
| 742 | } |
| 743 | defer resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body..Closescip-go gomod github.com/golang/go/src go1.15 io/Closer#Close().() |
| 744 | b, err := ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/.ReadAllscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/ReadAll().(resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body.) |
| 745 | if err != nil { |
| 746 | return result, err |
| 747 | } |
| 748 | if len(b) > 0 { |
| 749 | b = removeBOMscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/removeBOM().(b) |
| 750 | err = xmlscip-go gomod github.com/golang/go/src go1.15 `encoding/xml`/.Unmarshalscip-go gomod github.com/golang/go/src go1.15 `encoding/xml`/Unmarshal().(b, result) |
| 751 | if err != nil { |
| 752 | return result, NewResponseErrorscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/NewResponseError().(err, resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().(), "failed to unmarshal response body") |
| 753 | } |
| 754 | } |
| 755 | return result, nil |
| 756 | } |
| 757 | |
| 758 | // ReleaseLease [Update] establishes and manages a lock on a container for delete operations. The lock duration can be |
| 759 | // 15 to 60 seconds, or can be infinite |
| 760 | // |
| 761 | // leaseID is specifies the current lease ID on the resource. timeout is the timeout parameter is expressed in seconds. |
| 762 | // For more information, see <a |
| 763 | // href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting |
| 764 | // Timeouts for Blob Service Operations.</a> ifModifiedSince is specify this header value to operate only on a blob if |
| 765 | // it has been modified since the specified date/time. ifUnmodifiedSince is specify this header value to operate only |
| 766 | // on a blob if it has not been modified since the specified date/time. requestID is provides a client-generated, |
| 767 | // opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is |
| 768 | // enabled. |
| 769 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) ReleaseLeasescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#ReleaseLease().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, leaseID string, timeout *int32, ifModifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, ifUnmodifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, requestID *string) (*ContainerReleaseLeaseResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerReleaseLeaseResponse#, error) { |
| 770 | if err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 771 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: timeout, |
| 772 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 773 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 0, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}}); err != nil { |
| 774 | return nil, err |
| 775 | } |
| 776 | req, err := client.releaseLeasePreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#releaseLeasePreparer().(leaseID, timeout, ifModifiedSince, ifUnmodifiedSince, requestID) |
| 777 | if err != nil { |
| 778 | return nil, err |
| 779 | } |
| 780 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.releaseLeaseResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#releaseLeaseResponder().}, req) |
| 781 | if err != nil { |
| 782 | return nil, err |
| 783 | } |
| 784 | return resp.(*ContainerReleaseLeaseResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerReleaseLeaseResponse#), err |
| 785 | } |
| 786 | |
| 787 | // releaseLeasePreparer prepares the ReleaseLease request. |
| 788 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) releaseLeasePreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#releaseLeasePreparer().(leaseID string, timeout *int32, ifModifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, ifUnmodifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, requestID *string) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 789 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("PUT", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., nil) |
| 790 | if err != nil { |
| 791 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 792 | } |
| 793 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 794 | if timeout != nil { |
| 795 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("timeout", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*timeout), 10)) |
| 796 | } |
| 797 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("comp", "lease") |
| 798 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "container") |
| 799 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 800 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-lease-id", leaseID) |
| 801 | if ifModifiedSince != nil { |
| 802 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("If-Modified-Since", (*ifModifiedSince).Inscip-go gomod github.com/golang/go/src go1.15 time/Time#In().(gmtscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/gmt.).Formatscip-go gomod github.com/golang/go/src go1.15 time/Time#Format().(timescip-go gomod github.com/golang/go/src go1.15 time/.RFC1123scip-go gomod github.com/golang/go/src go1.15 time/RFC1123.)) |
| 803 | } |
| 804 | if ifUnmodifiedSince != nil { |
| 805 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("If-Unmodified-Since", (*ifUnmodifiedSince).Inscip-go gomod github.com/golang/go/src go1.15 time/Time#In().(gmtscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/gmt.).Formatscip-go gomod github.com/golang/go/src go1.15 time/Time#Format().(timescip-go gomod github.com/golang/go/src go1.15 time/.RFC1123scip-go gomod github.com/golang/go/src go1.15 time/RFC1123.)) |
| 806 | } |
| 807 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 808 | if requestID != nil { |
| 809 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-client-request-id", *requestID) |
| 810 | } |
| 811 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-lease-action", "release") |
| 812 | return req, nil |
| 813 | } |
| 814 | |
| 815 | // releaseLeaseResponder handles the response to the ReleaseLease request. |
| 816 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) releaseLeaseResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#releaseLeaseResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 817 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK.) |
| 818 | if resp == nil { |
| 819 | return nil, err |
| 820 | } |
| 821 | ioscip-go gomod github.com/golang/go/src go1.15 io/.Copyscip-go gomod github.com/golang/go/src go1.15 io/Copy().(ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/.Discardscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/Discard., resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body.) |
| 822 | resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body..Closescip-go gomod github.com/golang/go/src go1.15 io/Closer#Close().() |
| 823 | return &ContainerReleaseLeaseResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerReleaseLeaseResponse#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerReleaseLeaseResponse#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()}, err |
| 824 | } |
| 825 | |
| 826 | // Rename renames an existing container. |
| 827 | // |
| 828 | // sourceContainerName is required. Specifies the name of the container to rename. timeout is the timeout parameter is |
| 829 | // expressed in seconds. For more information, see <a |
| 830 | // href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting |
| 831 | // Timeouts for Blob Service Operations.</a> requestID is provides a client-generated, opaque value with a 1 KB |
| 832 | // character limit that is recorded in the analytics logs when storage analytics logging is enabled. sourceLeaseID is a |
| 833 | // lease ID for the source path. If specified, the source path must have an active lease and the lease ID must match. |
| 834 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) Renamescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#Rename().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, sourceContainerName string, timeout *int32, requestID *string, sourceLeaseID *string) (*ContainerRenameResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerRenameResponse#, error) { |
| 835 | if err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 836 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: timeout, |
| 837 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 838 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 0, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}}); err != nil { |
| 839 | return nil, err |
| 840 | } |
| 841 | req, err := client.renamePreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#renamePreparer().(sourceContainerName, timeout, requestID, sourceLeaseID) |
| 842 | if err != nil { |
| 843 | return nil, err |
| 844 | } |
| 845 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.renameResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#renameResponder().}, req) |
| 846 | if err != nil { |
| 847 | return nil, err |
| 848 | } |
| 849 | return resp.(*ContainerRenameResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerRenameResponse#), err |
| 850 | } |
| 851 | |
| 852 | // renamePreparer prepares the Rename request. |
| 853 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) renamePreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#renamePreparer().(sourceContainerName string, timeout *int32, requestID *string, sourceLeaseID *string) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 854 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("PUT", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., nil) |
| 855 | if err != nil { |
| 856 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 857 | } |
| 858 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 859 | if timeout != nil { |
| 860 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("timeout", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*timeout), 10)) |
| 861 | } |
| 862 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "container") |
| 863 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("comp", "rename") |
| 864 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 865 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 866 | if requestID != nil { |
| 867 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-client-request-id", *requestID) |
| 868 | } |
| 869 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-source-container-name", sourceContainerName) |
| 870 | if sourceLeaseID != nil { |
| 871 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-source-lease-id", *sourceLeaseID) |
| 872 | } |
| 873 | return req, nil |
| 874 | } |
| 875 | |
| 876 | // renameResponder handles the response to the Rename request. |
| 877 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) renameResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#renameResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 878 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK.) |
| 879 | if resp == nil { |
| 880 | return nil, err |
| 881 | } |
| 882 | ioscip-go gomod github.com/golang/go/src go1.15 io/.Copyscip-go gomod github.com/golang/go/src go1.15 io/Copy().(ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/.Discardscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/Discard., resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body.) |
| 883 | resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body..Closescip-go gomod github.com/golang/go/src go1.15 io/Closer#Close().() |
| 884 | return &ContainerRenameResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerRenameResponse#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerRenameResponse#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()}, err |
| 885 | } |
| 886 | |
| 887 | // RenewLease [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 |
| 888 | // to 60 seconds, or can be infinite |
| 889 | // |
| 890 | // leaseID is specifies the current lease ID on the resource. timeout is the timeout parameter is expressed in seconds. |
| 891 | // For more information, see <a |
| 892 | // href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting |
| 893 | // Timeouts for Blob Service Operations.</a> ifModifiedSince is specify this header value to operate only on a blob if |
| 894 | // it has been modified since the specified date/time. ifUnmodifiedSince is specify this header value to operate only |
| 895 | // on a blob if it has not been modified since the specified date/time. requestID is provides a client-generated, |
| 896 | // opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is |
| 897 | // enabled. |
| 898 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) RenewLeasescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#RenewLease().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, leaseID string, timeout *int32, ifModifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, ifUnmodifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, requestID *string) (*ContainerRenewLeaseResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerRenewLeaseResponse#, error) { |
| 899 | if err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 900 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: timeout, |
| 901 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 902 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 0, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}}); err != nil { |
| 903 | return nil, err |
| 904 | } |
| 905 | req, err := client.renewLeasePreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#renewLeasePreparer().(leaseID, timeout, ifModifiedSince, ifUnmodifiedSince, requestID) |
| 906 | if err != nil { |
| 907 | return nil, err |
| 908 | } |
| 909 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.renewLeaseResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#renewLeaseResponder().}, req) |
| 910 | if err != nil { |
| 911 | return nil, err |
| 912 | } |
| 913 | return resp.(*ContainerRenewLeaseResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerRenewLeaseResponse#), err |
| 914 | } |
| 915 | |
| 916 | // renewLeasePreparer prepares the RenewLease request. |
| 917 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) renewLeasePreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#renewLeasePreparer().(leaseID string, timeout *int32, ifModifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, ifUnmodifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, requestID *string) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 918 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("PUT", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., nil) |
| 919 | if err != nil { |
| 920 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 921 | } |
| 922 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 923 | if timeout != nil { |
| 924 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("timeout", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*timeout), 10)) |
| 925 | } |
| 926 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("comp", "lease") |
| 927 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "container") |
| 928 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 929 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-lease-id", leaseID) |
| 930 | if ifModifiedSince != nil { |
| 931 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("If-Modified-Since", (*ifModifiedSince).Inscip-go gomod github.com/golang/go/src go1.15 time/Time#In().(gmtscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/gmt.).Formatscip-go gomod github.com/golang/go/src go1.15 time/Time#Format().(timescip-go gomod github.com/golang/go/src go1.15 time/.RFC1123scip-go gomod github.com/golang/go/src go1.15 time/RFC1123.)) |
| 932 | } |
| 933 | if ifUnmodifiedSince != nil { |
| 934 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("If-Unmodified-Since", (*ifUnmodifiedSince).Inscip-go gomod github.com/golang/go/src go1.15 time/Time#In().(gmtscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/gmt.).Formatscip-go gomod github.com/golang/go/src go1.15 time/Time#Format().(timescip-go gomod github.com/golang/go/src go1.15 time/.RFC1123scip-go gomod github.com/golang/go/src go1.15 time/RFC1123.)) |
| 935 | } |
| 936 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 937 | if requestID != nil { |
| 938 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-client-request-id", *requestID) |
| 939 | } |
| 940 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-lease-action", "renew") |
| 941 | return req, nil |
| 942 | } |
| 943 | |
| 944 | // renewLeaseResponder handles the response to the RenewLease request. |
| 945 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) renewLeaseResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#renewLeaseResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 946 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK.) |
| 947 | if resp == nil { |
| 948 | return nil, err |
| 949 | } |
| 950 | ioscip-go gomod github.com/golang/go/src go1.15 io/.Copyscip-go gomod github.com/golang/go/src go1.15 io/Copy().(ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/.Discardscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/Discard., resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body.) |
| 951 | resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body..Closescip-go gomod github.com/golang/go/src go1.15 io/Closer#Close().() |
| 952 | return &ContainerRenewLeaseResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerRenewLeaseResponse#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerRenewLeaseResponse#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()}, err |
| 953 | } |
| 954 | |
| 955 | // Restore restores a previously-deleted container. |
| 956 | // |
| 957 | // timeout is the timeout parameter is expressed in seconds. For more information, see <a |
| 958 | // href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting |
| 959 | // Timeouts for Blob Service Operations.</a> requestID is provides a client-generated, opaque value with a 1 KB |
| 960 | // character limit that is recorded in the analytics logs when storage analytics logging is enabled. |
| 961 | // deletedContainerName is optional. Version 2019-12-12 and later. Specifies the name of the deleted container to |
| 962 | // restore. deletedContainerVersion is optional. Version 2019-12-12 and later. Specifies the version of the deleted |
| 963 | // container to restore. |
| 964 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) Restorescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#Restore().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, timeout *int32, requestID *string, deletedContainerName *string, deletedContainerVersion *string) (*ContainerRestoreResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerRestoreResponse#, error) { |
| 965 | if err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 966 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: timeout, |
| 967 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 968 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 0, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}}); err != nil { |
| 969 | return nil, err |
| 970 | } |
| 971 | req, err := client.restorePreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#restorePreparer().(timeout, requestID, deletedContainerName, deletedContainerVersion) |
| 972 | if err != nil { |
| 973 | return nil, err |
| 974 | } |
| 975 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.restoreResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#restoreResponder().}, req) |
| 976 | if err != nil { |
| 977 | return nil, err |
| 978 | } |
| 979 | return resp.(*ContainerRestoreResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerRestoreResponse#), err |
| 980 | } |
| 981 | |
| 982 | // restorePreparer prepares the Restore request. |
| 983 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) restorePreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#restorePreparer().(timeout *int32, requestID *string, deletedContainerName *string, deletedContainerVersion *string) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 984 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("PUT", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., nil) |
| 985 | if err != nil { |
| 986 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 987 | } |
| 988 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 989 | if timeout != nil { |
| 990 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("timeout", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*timeout), 10)) |
| 991 | } |
| 992 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "container") |
| 993 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("comp", "undelete") |
| 994 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 995 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 996 | if requestID != nil { |
| 997 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-client-request-id", *requestID) |
| 998 | } |
| 999 | if deletedContainerName != nil { |
| 1000 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-deleted-container-name", *deletedContainerName) |
| 1001 | } |
| 1002 | if deletedContainerVersion != nil { |
| 1003 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-deleted-container-version", *deletedContainerVersion) |
| 1004 | } |
| 1005 | return req, nil |
| 1006 | } |
| 1007 | |
| 1008 | // restoreResponder handles the response to the Restore request. |
| 1009 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) restoreResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#restoreResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 1010 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK., httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusCreatedscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusCreated.) |
| 1011 | if resp == nil { |
| 1012 | return nil, err |
| 1013 | } |
| 1014 | ioscip-go gomod github.com/golang/go/src go1.15 io/.Copyscip-go gomod github.com/golang/go/src go1.15 io/Copy().(ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/.Discardscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/Discard., resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body.) |
| 1015 | resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body..Closescip-go gomod github.com/golang/go/src go1.15 io/Closer#Close().() |
| 1016 | return &ContainerRestoreResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerRestoreResponse#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerRestoreResponse#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()}, err |
| 1017 | } |
| 1018 | |
| 1019 | // SetAccessPolicy sets the permissions for the specified container. The permissions indicate whether blobs in a |
| 1020 | // container may be accessed publicly. |
| 1021 | // |
| 1022 | // containerACL is the acls for the container timeout is the timeout parameter is expressed in seconds. For more |
| 1023 | // information, see <a |
| 1024 | // href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting |
| 1025 | // Timeouts for Blob Service Operations.</a> leaseID is if specified, the operation only succeeds if the resource's |
| 1026 | // lease is active and matches this ID. access is specifies whether data in the container may be accessed publicly and |
| 1027 | // the level of access ifModifiedSince is specify this header value to operate only on a blob if it has been modified |
| 1028 | // since the specified date/time. ifUnmodifiedSince is specify this header value to operate only on a blob if it has |
| 1029 | // not been modified since the specified date/time. requestID is provides a client-generated, opaque value with a 1 KB |
| 1030 | // character limit that is recorded in the analytics logs when storage analytics logging is enabled. |
| 1031 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) SetAccessPolicyscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#SetAccessPolicy().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, containerACL []SignedIdentifierscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/SignedIdentifier#, timeout *int32, leaseID *string, access PublicAccessTypescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/PublicAccessType#, ifModifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, ifUnmodifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, requestID *string) (*ContainerSetAccessPolicyResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerSetAccessPolicyResponse#, error) { |
| 1032 | if err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 1033 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: timeout, |
| 1034 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 1035 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 0, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}}); err != nil { |
| 1036 | return nil, err |
| 1037 | } |
| 1038 | req, err := client.setAccessPolicyPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#setAccessPolicyPreparer().(containerACL, timeout, leaseID, access, ifModifiedSince, ifUnmodifiedSince, requestID) |
| 1039 | if err != nil { |
| 1040 | return nil, err |
| 1041 | } |
| 1042 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.setAccessPolicyResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#setAccessPolicyResponder().}, req) |
| 1043 | if err != nil { |
| 1044 | return nil, err |
| 1045 | } |
| 1046 | return resp.(*ContainerSetAccessPolicyResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerSetAccessPolicyResponse#), err |
| 1047 | } |
| 1048 | |
| 1049 | // setAccessPolicyPreparer prepares the SetAccessPolicy request. |
| 1050 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) setAccessPolicyPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#setAccessPolicyPreparer().(containerACL []SignedIdentifierscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/SignedIdentifier#, timeout *int32, leaseID *string, access PublicAccessTypescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/PublicAccessType#, ifModifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, ifUnmodifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, requestID *string) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 1051 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("PUT", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., nil) |
| 1052 | if err != nil { |
| 1053 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 1054 | } |
| 1055 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 1056 | if timeout != nil { |
| 1057 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("timeout", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*timeout), 10)) |
| 1058 | } |
| 1059 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "container") |
| 1060 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("comp", "acl") |
| 1061 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 1062 | if leaseID != nil { |
| 1063 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-lease-id", *leaseID) |
| 1064 | } |
| 1065 | if access != PublicAccessNonescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/PublicAccessNone. { |
| 1066 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-blob-public-access", string(access)) |
| 1067 | } |
| 1068 | if ifModifiedSince != nil { |
| 1069 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("If-Modified-Since", (*ifModifiedSince).Inscip-go gomod github.com/golang/go/src go1.15 time/Time#In().(gmtscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/gmt.).Formatscip-go gomod github.com/golang/go/src go1.15 time/Time#Format().(timescip-go gomod github.com/golang/go/src go1.15 time/.RFC1123scip-go gomod github.com/golang/go/src go1.15 time/RFC1123.)) |
| 1070 | } |
| 1071 | if ifUnmodifiedSince != nil { |
| 1072 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("If-Unmodified-Since", (*ifUnmodifiedSince).Inscip-go gomod github.com/golang/go/src go1.15 time/Time#In().(gmtscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/gmt.).Formatscip-go gomod github.com/golang/go/src go1.15 time/Time#Format().(timescip-go gomod github.com/golang/go/src go1.15 time/.RFC1123scip-go gomod github.com/golang/go/src go1.15 time/RFC1123.)) |
| 1073 | } |
| 1074 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 1075 | if requestID != nil { |
| 1076 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-client-request-id", *requestID) |
| 1077 | } |
| 1078 | b, err := xmlscip-go gomod github.com/golang/go/src go1.15 `encoding/xml`/.Marshalscip-go gomod github.com/golang/go/src go1.15 `encoding/xml`/Marshal().(SignedIdentifiersscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/SignedIdentifiers#{Itemsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/SignedIdentifiers#Items.: containerACL}) |
| 1079 | if err != nil { |
| 1080 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to marshal request body") |
| 1081 | } |
| 1082 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("Content-Type", "application/xml") |
| 1083 | err = req.SetBodyscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#SetBody().(bytesscip-go gomod github.com/golang/go/src go1.15 bytes/.NewReaderscip-go gomod github.com/golang/go/src go1.15 bytes/NewReader().(b)) |
| 1084 | if err != nil { |
| 1085 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to set request body") |
| 1086 | } |
| 1087 | return req, nil |
| 1088 | } |
| 1089 | |
| 1090 | // setAccessPolicyResponder handles the response to the SetAccessPolicy request. |
| 1091 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) setAccessPolicyResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#setAccessPolicyResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 1092 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK.) |
| 1093 | if resp == nil { |
| 1094 | return nil, err |
| 1095 | } |
| 1096 | ioscip-go gomod github.com/golang/go/src go1.15 io/.Copyscip-go gomod github.com/golang/go/src go1.15 io/Copy().(ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/.Discardscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/Discard., resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body.) |
| 1097 | resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body..Closescip-go gomod github.com/golang/go/src go1.15 io/Closer#Close().() |
| 1098 | return &ContainerSetAccessPolicyResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerSetAccessPolicyResponse#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerSetAccessPolicyResponse#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()}, err |
| 1099 | } |
| 1100 | |
| 1101 | // SetMetadata operation sets one or more user-defined name-value pairs for the specified container. |
| 1102 | // |
| 1103 | // timeout is the timeout parameter is expressed in seconds. For more information, see <a |
| 1104 | // href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting |
| 1105 | // Timeouts for Blob Service Operations.</a> leaseID is if specified, the operation only succeeds if the resource's |
| 1106 | // lease is active and matches this ID. metadata is optional. Specifies a user-defined name-value pair associated with |
| 1107 | // the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to |
| 1108 | // the destination blob. If one or more name-value pairs are specified, the destination blob is created with the |
| 1109 | // specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version |
| 1110 | // 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing |
| 1111 | // Containers, Blobs, and Metadata for more information. ifModifiedSince is specify this header value to operate only |
| 1112 | // on a blob if it has been modified since the specified date/time. requestID is provides a client-generated, opaque |
| 1113 | // value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. |
| 1114 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) SetMetadatascip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#SetMetadata().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, timeout *int32, leaseID *string, metadata map[string]string, ifModifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, requestID *string) (*ContainerSetMetadataResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerSetMetadataResponse#, error) { |
| 1115 | if err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 1116 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: timeout, |
| 1117 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 1118 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 0, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}}); err != nil { |
| 1119 | return nil, err |
| 1120 | } |
| 1121 | req, err := client.setMetadataPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#setMetadataPreparer().(timeout, leaseID, metadata, ifModifiedSince, requestID) |
| 1122 | if err != nil { |
| 1123 | return nil, err |
| 1124 | } |
| 1125 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.setMetadataResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#setMetadataResponder().}, req) |
| 1126 | if err != nil { |
| 1127 | return nil, err |
| 1128 | } |
| 1129 | return resp.(*ContainerSetMetadataResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerSetMetadataResponse#), err |
| 1130 | } |
| 1131 | |
| 1132 | // setMetadataPreparer prepares the SetMetadata request. |
| 1133 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) setMetadataPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#setMetadataPreparer().(timeout *int32, leaseID *string, metadata map[string]string, ifModifiedSince *timescip-go gomod github.com/golang/go/src go1.15 time/.Timescip-go gomod github.com/golang/go/src go1.15 time/Time#, requestID *string) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 1134 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("PUT", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., nil) |
| 1135 | if err != nil { |
| 1136 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 1137 | } |
| 1138 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 1139 | if timeout != nil { |
| 1140 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("timeout", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*timeout), 10)) |
| 1141 | } |
| 1142 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "container") |
| 1143 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("comp", "metadata") |
| 1144 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 1145 | if leaseID != nil { |
| 1146 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-lease-id", *leaseID) |
| 1147 | } |
| 1148 | if metadata != nil { |
| 1149 | for k, v := range metadata { |
| 1150 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-meta-"+k, v) |
| 1151 | } |
| 1152 | } |
| 1153 | if ifModifiedSince != nil { |
| 1154 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("If-Modified-Since", (*ifModifiedSince).Inscip-go gomod github.com/golang/go/src go1.15 time/Time#In().(gmtscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/gmt.).Formatscip-go gomod github.com/golang/go/src go1.15 time/Time#Format().(timescip-go gomod github.com/golang/go/src go1.15 time/.RFC1123scip-go gomod github.com/golang/go/src go1.15 time/RFC1123.)) |
| 1155 | } |
| 1156 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 1157 | if requestID != nil { |
| 1158 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-client-request-id", *requestID) |
| 1159 | } |
| 1160 | return req, nil |
| 1161 | } |
| 1162 | |
| 1163 | // setMetadataResponder handles the response to the SetMetadata request. |
| 1164 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) setMetadataResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#setMetadataResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 1165 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK.) |
| 1166 | if resp == nil { |
| 1167 | return nil, err |
| 1168 | } |
| 1169 | ioscip-go gomod github.com/golang/go/src go1.15 io/.Copyscip-go gomod github.com/golang/go/src go1.15 io/Copy().(ioutilscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/.Discardscip-go gomod github.com/golang/go/src go1.15 `io/ioutil`/Discard., resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body.) |
| 1170 | resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().().Bodyscip-go gomod github.com/golang/go/src go1.15 `net/http`/Response#Body..Closescip-go gomod github.com/golang/go/src go1.15 io/Closer#Close().() |
| 1171 | return &ContainerSetMetadataResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerSetMetadataResponse#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ContainerSetMetadataResponse#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()}, err |
| 1172 | } |
| 1173 | |
| 1174 | // SubmitBatch the Batch operation allows multiple API calls to be embedded into a single HTTP request. |
| 1175 | // |
| 1176 | // body is initial data body will be closed upon successful return. Callers should ensure closure when receiving an |
| 1177 | // error.contentLength is the length of the request. multipartContentType is required. The value of this header must be |
| 1178 | // multipart/mixed with a batch boundary. Example header value: multipart/mixed; boundary=batch_<GUID> timeout is the |
| 1179 | // timeout parameter is expressed in seconds. For more information, see <a |
| 1180 | // href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting |
| 1181 | // Timeouts for Blob Service Operations.</a> requestID is provides a client-generated, opaque value with a 1 KB |
| 1182 | // character limit that is recorded in the analytics logs when storage analytics logging is enabled. |
| 1183 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) SubmitBatchscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#SubmitBatch().(ctx contextscip-go gomod github.com/golang/go/src go1.15 context/.Contextscip-go gomod github.com/golang/go/src go1.15 context/Context#, body ioscip-go gomod github.com/golang/go/src go1.15 io/.ReadSeekerscip-go gomod github.com/golang/go/src go1.15 io/ReadSeeker#, contentLength int64, multipartContentType string, timeout *int32, requestID *string) (*SubmitBatchResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/SubmitBatchResponse#, error) { |
| 1184 | if err := validatescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validate().([]validationscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#{ |
| 1185 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: body, |
| 1186 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "body", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: true, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}, |
| 1187 | {targetValuescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#targetValue.: timeout, |
| 1188 | constraintsscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validation#constraints.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: nullscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/null., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: false, |
| 1189 | chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: []constraintscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#{{targetscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#target.: "timeout", namescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#name.: inclusiveMinimumscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/inclusiveMinimum., rulescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#rule.: 0, chainscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/constraint#chain.: nil}}}}}}); err != nil { |
| 1190 | return nil, err |
| 1191 | } |
| 1192 | req, err := client.submitBatchPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#submitBatchPreparer().(body, contentLength, multipartContentType, timeout, requestID) |
| 1193 | if err != nil { |
| 1194 | return nil, err |
| 1195 | } |
| 1196 | resp, err := client.Pipelinescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#Pipeline().().Doscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Pipeline#Do().(ctx, responderPolicyFactoryscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#{responderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/responderPolicyFactory#responder.: client.submitBatchResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#submitBatchResponder().}, req) |
| 1197 | if err != nil { |
| 1198 | return nil, err |
| 1199 | } |
| 1200 | return resp.(*SubmitBatchResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/SubmitBatchResponse#), err |
| 1201 | } |
| 1202 | |
| 1203 | // submitBatchPreparer prepares the SubmitBatch request. |
| 1204 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) submitBatchPreparerscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#submitBatchPreparer().(body ioscip-go gomod github.com/golang/go/src go1.15 io/.ReadSeekerscip-go gomod github.com/golang/go/src go1.15 io/ReadSeeker#, contentLength int64, multipartContentType string, timeout *int32, requestID *string) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Requestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Request#, error) { |
| 1205 | req, err := pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewRequestscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewRequest().("POST", client.urlscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/managementClient#url., body) |
| 1206 | if err != nil { |
| 1207 | return req, pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.NewErrorscip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/NewError().(err, "failed to create request") |
| 1208 | } |
| 1209 | params := req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..Queryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#Query().() |
| 1210 | if timeout != nil { |
| 1211 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("timeout", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(int64(*timeout), 10)) |
| 1212 | } |
| 1213 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("restype", "container") |
| 1214 | params.Setscip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Set().("comp", "batch") |
| 1215 | req.URLscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#URL..RawQueryscip-go gomod github.com/golang/go/src go1.15 `net/url`/URL#RawQuery. = params.Encodescip-go gomod github.com/golang/go/src go1.15 `net/url`/Values#Encode().() |
| 1216 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("Content-Length", strconvscip-go gomod github.com/golang/go/src go1.15 strconv/.FormatIntscip-go gomod github.com/golang/go/src go1.15 strconv/FormatInt().(contentLength, 10)) |
| 1217 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("Content-Type", multipartContentType) |
| 1218 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-version", ServiceVersionscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/ServiceVersion.) |
| 1219 | if requestID != nil { |
| 1220 | req.Headerscip-go gomod github.com/golang/go/src go1.15 `net/http`/Request#Header..Setscip-go gomod github.com/golang/go/src go1.15 `net/http`/Header#Set().("x-ms-client-request-id", *requestID) |
| 1221 | } |
| 1222 | return req, nil |
| 1223 | } |
| 1224 | |
| 1225 | // submitBatchResponder handles the response to the SubmitBatch request. |
| 1226 | func (client containerClientscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#) submitBatchResponderscip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/containerClient#submitBatchResponder().(resp pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#) (pipelinescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#, error) { |
| 1227 | err := validateResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/validateResponse().(resp, httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusOKscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusOK., httpscip-go gomod github.com/golang/go/src go1.15 `net/http`/.StatusAcceptedscip-go gomod github.com/golang/go/src go1.15 `net/http`/StatusAccepted.) |
| 1228 | if resp == nil { |
| 1229 | return nil, err |
| 1230 | } |
| 1231 | return &SubmitBatchResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/SubmitBatchResponse#{rawResponsescip-go gomod github.com/Azure/azure-storage-blob-go . `github.com/Azure/azure-storage-blob-go/azblob`/SubmitBatchResponse#rawResponse.: resp.Responsescip-go gomod github.com/Azure/azure-pipeline-go v0.2.3 `github.com/Azure/azure-pipeline-go/pipeline`/Response#Response().()}, err |
| 1232 | } |