Debian Codegraph @

storage/2017-07-29/blob/blobs/snapshot_get_properties.go

raw symbols SCIP
1 package blobsscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/
2
3 import (
4 "contextscip-go gomod github.com/golang/go/src go1.13 context/"
5 "net/httpscip-go gomod github.com/golang/go/src go1.13 `net/http`/"
6 "stringsscip-go gomod github.com/golang/go/src go1.13 strings/"
7
8 "github.com/Azure/go-autorest/autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/"
9 "github.com/Azure/go-autorest/autorest/validationscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/"
10 "github.com/tombuildsstuff/giovanni/storage/internal/endpointsscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/internal/endpoints`/"
11 )
12
13 type GetSnapshotPropertiesInputscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/GetSnapshotPropertiesInput# struct {
14 // The ID of the Lease
15 // This must be specified if a Lease is present on the Blob, else a 403 is returned
16 LeaseIDscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/GetSnapshotPropertiesInput#LeaseID. *string
17
18 // The ID of the Snapshot which should be retrieved
19 SnapshotIDscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/GetSnapshotPropertiesInput#SnapshotID. string
20 }
21
22 // GetSnapshotProperties returns all user-defined metadata, standard HTTP properties, and system properties for
23 // the specified snapshot of a blob
24 func (client Clientscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#) GetSnapshotPropertiesscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#GetSnapshotProperties().(ctx contextscip-go gomod github.com/golang/go/src go1.13 context/.Contextscip-go gomod github.com/golang/go/src go1.13 context/Context#, accountName, containerName, blobName string, input GetSnapshotPropertiesInputscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/GetSnapshotPropertiesInput#) (result GetPropertiesResultscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/GetPropertiesResult#, err error) {
25 if accountName == "" {
26 return result, validationscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/.NewErrorscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/NewError().("blobs.Client", "GetSnapshotProperties", "`accountName` cannot be an empty string.")
27 }
28 if containerName == "" {
29 return result, validationscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/.NewErrorscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/NewError().("blobs.Client", "GetSnapshotProperties", "`containerName` cannot be an empty string.")
30 }
31 if stringsscip-go gomod github.com/golang/go/src go1.13 strings/.ToLowerscip-go gomod github.com/golang/go/src go1.13 strings/ToLower().(containerName) != containerName {
32 return result, validationscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/.NewErrorscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/NewError().("blobs.Client", "GetSnapshotProperties", "`containerName` must be a lower-cased string.")
33 }
34 if blobName == "" {
35 return result, validationscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/.NewErrorscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/NewError().("blobs.Client", "GetSnapshotProperties", "`blobName` cannot be an empty string.")
36 }
37 if input.SnapshotIDscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/GetSnapshotPropertiesInput#SnapshotID. == "" {
38 return result, validationscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/.NewErrorscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/NewError().("blobs.Client", "GetSnapshotProperties", "`input.SnapshotID` cannot be an empty string.")
39 }
40
41 req, err := client.GetSnapshotPropertiesPreparerscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#GetSnapshotPropertiesPreparer().(ctx, accountName, containerName, blobName, input)
42 if err != nil {
43 err = autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.NewErrorWithErrorscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/NewErrorWithError().(err, "blobs.Client", "GetSnapshotProperties", nil, "Failure preparing request")
44 return
45 }
46
47 // we re-use the GetProperties methods since this is otherwise the same
48 resp, err := client.GetPropertiesSenderscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#GetPropertiesSender().(req)
49 if err != nil {
50 result.Responsescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/GetPropertiesResult#Response. = autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.Responsescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/Response#{Responsescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/Response#Response.: resp}
51 err = autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.NewErrorWithErrorscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/NewErrorWithError().(err, "blobs.Client", "GetSnapshotProperties", resp, "Failure sending request")
52 return
53 }
54
55 result, err = client.GetPropertiesResponderscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#GetPropertiesResponder().(resp)
56 if err != nil {
57 err = autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.NewErrorWithErrorscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/NewErrorWithError().(err, "blobs.Client", "GetSnapshotProperties", resp, "Failure responding to request")
58 return
59 }
60
61 return
62 }
63
64 // GetSnapshotPreparer prepares the GetSnapshot request.
65 func (client Clientscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#) GetSnapshotPropertiesPreparerscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#GetSnapshotPropertiesPreparer().(ctx contextscip-go gomod github.com/golang/go/src go1.13 context/.Contextscip-go gomod github.com/golang/go/src go1.13 context/Context#, accountName, containerName, blobName string, input GetSnapshotPropertiesInputscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/GetSnapshotPropertiesInput#) (*httpscip-go gomod github.com/golang/go/src go1.13 `net/http`/.Requestscip-go gomod github.com/golang/go/src go1.13 `net/http`/Request#, error) {
66 pathParameters := map[string]interface{}{
67 "containerName": autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.Encodescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/Encode().("path", containerName),
68 "blobName": autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.Encodescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/Encode().("path", blobName),
69 }
70
71 queryParameters := map[string]interface{}{
72 "snapshot": autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.Encodescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/Encode().("query", input.SnapshotIDscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/GetSnapshotPropertiesInput#SnapshotID.),
73 }
74
75 headers := map[string]interface{}{
76 "x-ms-version": APIVersionscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/APIVersion.,
77 }
78
79 if input.LeaseIDscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/GetSnapshotPropertiesInput#LeaseID. != nil {
80 headers["x-ms-lease-id"] = *input.LeaseIDscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/GetSnapshotPropertiesInput#LeaseID.
81 }
82
83 preparer := autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.CreatePreparerscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/CreatePreparer().(
84 autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.AsHeadscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/AsHead().(),
85 autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.WithBaseURLscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/WithBaseURL().(endpointsscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/internal/endpoints`/.GetBlobEndpointscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/internal/endpoints`/GetBlobEndpoint().(client.BaseURIscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#BaseURI., accountName)),
86 autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.WithPathParametersscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/WithPathParameters().("/{containerName}/{blobName}", pathParameters),
87 autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.WithHeadersscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/WithHeaders().(headers),
88 autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.WithQueryParametersscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/WithQueryParameters().(queryParameters))
89 return preparer.Preparescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/Preparer#Prepare().((&httpscip-go gomod github.com/golang/go/src go1.13 `net/http`/.Requestscip-go gomod github.com/golang/go/src go1.13 `net/http`/Request#{}).WithContextscip-go gomod github.com/golang/go/src go1.13 `net/http`/Request#WithContext().(ctx))
90 }