diff --git a/azuread/config.go b/azuread/config.go
index 6a7a30d01c..4172000aa7 100644
--- a/azuread/config.go
+++ b/azuread/config.go
@@ -10,14 +10,11 @@ import (
"github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac"
"github.com/Azure/go-autorest/autorest"
- "github.com/Azure/go-autorest/autorest/adal"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/hashicorp/go-azure-helpers/authentication"
"github.com/hashicorp/go-azure-helpers/sender"
"github.com/hashicorp/terraform/httpclient"
"github.com/terraform-providers/terraform-provider-azuread/version"
-
- "github.com/terraform-providers/terraform-provider-azuread/azuread/helpers/ar"
)
// ArmClient contains the handles to all the specific Azure ADger resource classes' respective clients.
@@ -52,21 +49,16 @@ func getArmClient(authCfg *authentication.Config) (*ArmClient, error) {
environment: *env,
}
- sender := ar.BuildSender()
+ sender := sender.BuildSender("AzureAD")
- oauthConfig, err := adal.NewOAuthConfig(env.ActiveDirectoryEndpoint, client.tenantID)
+ oauth, err := authCfg.BuildOAuthConfig(env.ActiveDirectoryEndpoint)
if err != nil {
return nil, err
}
- // OAuthConfigForTenant returns a pointer, which can be nil.
- if oauthConfig == nil {
- return nil, fmt.Errorf("Unable to configure OAuthConfig for tenant %s", client.tenantID)
- }
-
// Graph Endpoints
graphEndpoint := env.GraphEndpoint
- graphAuthorizer, err := authCfg.GetAuthorizationToken(sender, oauthConfig, graphEndpoint)
+ graphAuthorizer, err := authCfg.GetAuthorizationToken(sender, oauth, graphEndpoint)
if err != nil {
return nil, err
}
diff --git a/azuread/helpers/ar/sender.go b/azuread/helpers/ar/sender.go
deleted file mode 100644
index 55be052378..0000000000
--- a/azuread/helpers/ar/sender.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package ar
-
-import (
- "log"
- "net/http"
- "net/http/httputil"
-
- "github.com/Azure/go-autorest/autorest"
-)
-
-func BuildSender() autorest.Sender {
- return autorest.DecorateSender(&http.Client{
- Transport: &http.Transport{
- Proxy: http.ProxyFromEnvironment,
- },
- }, withRequestLogging())
-}
-
-func withRequestLogging() autorest.SendDecorator {
- return func(s autorest.Sender) autorest.Sender {
- return autorest.SenderFunc(func(r *http.Request) (*http.Response, error) {
- // strip the authorization header prior to printing
- authHeaderName := "Authorization"
- auth := r.Header.Get(authHeaderName)
- if auth != "" {
- r.Header.Del(authHeaderName)
- }
-
- // dump request to wire format
- if dump, err := httputil.DumpRequestOut(r, true); err == nil {
- log.Printf("[DEBUG] AzureAD Request: \n%s\n", dump)
- } else {
- // fallback to basic message
- log.Printf("[DEBUG] AzureAD Request: %s to %s\n", r.Method, r.URL)
- }
-
- // add the auth header back
- if auth != "" {
- r.Header.Add(authHeaderName, auth)
- }
-
- resp, err := s.Do(r)
- if resp != nil {
- // dump response to wire format
- if dump, err2 := httputil.DumpResponse(resp, true); err2 == nil {
- log.Printf("[DEBUG] AzureAD Response for %s: \n%s\n", r.URL, dump)
- } else {
- // fallback to basic message
- log.Printf("[DEBUG] AzureAD Response: %s for %s\n", resp.Status, r.URL)
- }
- } else {
- log.Printf("[DEBUG] Request to %s completed with no response", r.URL)
- }
- return resp, err
- })
- }
-}
diff --git a/go.mod b/go.mod
index de33b0601f..7a66f9ff66 100644
--- a/go.mod
+++ b/go.mod
@@ -1,11 +1,14 @@
module github.com/terraform-providers/terraform-provider-azuread
require (
- contrib.go.opencensus.io/exporter/ocagent v0.4.2 // indirect
- github.com/Azure/azure-sdk-for-go v29.0.0+incompatible
- github.com/Azure/go-autorest v11.7.0+incompatible
+ github.com/Azure/azure-sdk-for-go v32.5.0+incompatible
+ github.com/Azure/go-autorest v13.0.0+incompatible // indirect
+ github.com/Azure/go-autorest/autorest v0.9.0
+ github.com/Azure/go-autorest/autorest/adal v0.6.0
+ github.com/Azure/go-autorest/autorest/date v0.2.0
github.com/google/uuid v1.1.1
- github.com/hashicorp/go-azure-helpers v0.4.1
+ github.com/hashicorp/go-azure-helpers v0.7.0
github.com/hashicorp/go-uuid v1.0.1
github.com/hashicorp/terraform v0.12.6
+ go.opencensus.io v0.18.1-0.20181204023538-aab39bd6a98b // indirect
)
diff --git a/go.sum b/go.sum
index a9dc8bda80..6756fb62b7 100644
--- a/go.sum
+++ b/go.sum
@@ -3,19 +3,39 @@ cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.36.0 h1:+aCSj7tOo2LODWVEuZDZeGCckdt6MlSF+X/rB3wUiS8=
cloud.google.com/go v0.36.0/go.mod h1:RUoy9p/M4ge0HzT8L+SDZ8jg+Q6fth0CiBuhFJpSV40=
-contrib.go.opencensus.io/exporter/ocagent v0.4.2 h1:EjvhWhqxJpIUEBcTJoUDUyScfZ/30ehPEvDmvj9v4DA=
-contrib.go.opencensus.io/exporter/ocagent v0.4.2/go.mod h1:YuG83h+XWwqWjvCqn7vK4KSyLKhThY3+gNGQ37iS2V0=
dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU=
dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU=
dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=
dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
github.com/Azure/azure-sdk-for-go v21.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
-github.com/Azure/azure-sdk-for-go v29.0.0+incompatible h1:CYPU39ULbGjQBo3gXIqiWouK0C4F+Pt2Zx5CqGvqknE=
-github.com/Azure/azure-sdk-for-go v29.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
+github.com/Azure/azure-sdk-for-go v32.5.0+incompatible h1:Hn/DsObfmw0M7dMGS/c0MlVrJuGFzHzOpBWL89acR68=
+github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
+github.com/Azure/go-autorest v10.15.4+incompatible h1:q+DRrRdbCnkY7f2WxQBx58TwCGkEdMAK/hkZ10g0Pzk=
github.com/Azure/go-autorest v10.15.4+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
-github.com/Azure/go-autorest v11.7.0+incompatible h1:gzma19dc9ejB75D90E5S+/wXouzpZyA+CV+/MJPSD/k=
-github.com/Azure/go-autorest v11.7.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
+github.com/Azure/go-autorest v13.0.0+incompatible h1:56c11ykhsFSPNNQuS73Ri8h/ezqVhr2h6t9LJIEKVO0=
+github.com/Azure/go-autorest v13.0.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
+github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs=
+github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
+github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
+github.com/Azure/go-autorest/autorest/adal v0.6.0 h1:UCTq22yE3RPgbU/8u4scfnnzuCW6pwQ9n+uBtV78ouo=
+github.com/Azure/go-autorest/autorest/adal v0.6.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
+github.com/Azure/go-autorest/autorest/azure/cli v0.2.0 h1:pSwNMF0qotgehbQNllUWwJ4V3vnrLKOzHrwDLEZK904=
+github.com/Azure/go-autorest/autorest/azure/cli v0.2.0/go.mod h1:WWTbGPvkAg3I4ms2j2s+Zr5xCGwGqTQh+6M2ZqOczkE=
+github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
+github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM=
+github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
+github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
+github.com/Azure/go-autorest/autorest/to v0.3.0 h1:zebkZaadz7+wIQYgC7GXaz3Wb28yKYfVkkBKwc38VF8=
+github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA=
+github.com/Azure/go-autorest/autorest/validation v0.2.0 h1:15vMO4y76dehZSq7pAaOLQxC6dZYsSrj2GQpflyM/L4=
+github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI=
+github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY=
+github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
+github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k=
+github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4 h1:pSm8mp0T2OH2CPmPDPtwHPr3VAQaOwVF/JbllOPP4xA=
github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
@@ -68,8 +88,6 @@ github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnweb
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=
github.com/bsm/go-vlq v0.0.0-20150828105119-ec6e8d4f5f4e/go.mod h1:N+BjUcTjSxc2mtRGSCPsat1kze3CUtvJN3/jTXlp29k=
-github.com/census-instrumentation/opencensus-proto v0.1.0-0.20181214143942-ba49f56771b8 h1:gUqsFVdUKoRHNg8fkFd8gB5OOEa/g5EwlAHznb4zjbI=
-github.com/census-instrumentation/opencensus-proto v0.1.0-0.20181214143942-ba49f56771b8/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20161106042343-c914be64f07d h1:aG5FcWiZTOhPQzYIxwxSR1zEOxzL32fwr1CsaCfhO6w=
@@ -91,6 +109,8 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumC
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dimchansky/utfbom v1.0.0 h1:fGC2kkf4qOoKqZ4q7iIh+Vef4ubC1c38UDsEyZynZPc=
github.com/dimchansky/utfbom v1.0.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8=
+github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4=
+github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8=
github.com/dnaeon/go-vcr v0.0.0-20180920040454-5637cf3d8a31/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dylanmei/iso8601 v0.1.0 h1:812NGQDBcqquTfH5Yeo7lwR0nzx/cKdsmf3qMjPURUI=
@@ -161,8 +181,8 @@ github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/U
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-azure-helpers v0.0.0-20190129193224-166dfd221bb2 h1:VBRx+yPYUZaobnn5ANBcOUf4hhWpTHSQgftG4TcDkhI=
github.com/hashicorp/go-azure-helpers v0.0.0-20190129193224-166dfd221bb2/go.mod h1:lu62V//auUow6k0IykxLK2DCNW8qTmpm8KqhYVWattA=
-github.com/hashicorp/go-azure-helpers v0.4.1 h1:aEWYW4hxAVVmxmq7nPXGK8F44A6HBXQ4m0vB1M3/20g=
-github.com/hashicorp/go-azure-helpers v0.4.1/go.mod h1:lu62V//auUow6k0IykxLK2DCNW8qTmpm8KqhYVWattA=
+github.com/hashicorp/go-azure-helpers v0.7.0 h1:wxGpOyWYp15bjBMeL3pXKP5X3oFLZbThAMcJcU6x4FA=
+github.com/hashicorp/go-azure-helpers v0.7.0/go.mod h1:3xdjhbL7qs69rnwxA0UENOzkPJjtTFIRb5aRyrEpbCU=
github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU=
github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg=
github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6KdvN3Gig=
@@ -275,6 +295,8 @@ github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMK
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
+github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
+github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-linereader v0.0.0-20190213213312-1b945b3263eb h1:GRiLv4rgyqjqzxbhJke65IYUf4NCOOvrPOJbV/sPxkM=
github.com/mitchellh/go-linereader v0.0.0-20190213213312-1b945b3263eb/go.mod h1:OaY7UOoTkkrX3wRwjpYRKafIkkyeD0UtweSHAWWiqQM=
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
@@ -488,7 +510,6 @@ google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk
google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922 h1:mBVYJnbrXLA/ZCBTCe7PtEgAUP+1bg92qTaFoPHdz+8=
google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4=
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
-google.golang.org/grpc v1.15.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
google.golang.org/grpc v1.17.0 h1:TRJYBgMclJvGYn2rIMjj+h9KtMt5r1Ij7ODVRIZkwhk=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/.travis.yml b/vendor/contrib.go.opencensus.io/exporter/ocagent/.travis.yml
deleted file mode 100644
index a7afbcc9b0..0000000000
--- a/vendor/contrib.go.opencensus.io/exporter/ocagent/.travis.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-language: go
-
-go:
- - 1.11.x
-
-go_import_path: contrib.go.opencensus.io/exporter/ocagent
-
-before_script:
- - GO_FILES=$(find . -iname '*.go' | grep -v /vendor/) # All the .go files, excluding vendor/ if any
- - PKGS=$(go list ./... | grep -v /vendor/) # All the import paths, excluding vendor/ if any
-
-script:
- - go build ./... # Ensure dependency updates don't break build
- - if [ -n "$(gofmt -s -l $GO_FILES)" ]; then echo "gofmt the following files:"; gofmt -s -l $GO_FILES; exit 1; fi
- - go vet ./...
- - go test -v -race $PKGS # Run all the tests with the race detector enabled
- - 'if [[ $TRAVIS_GO_VERSION = 1.8* ]]; then ! golint ./... | grep -vE "(_mock|_string|\.pb)\.go:"; fi'
diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/CONTRIBUTING.md b/vendor/contrib.go.opencensus.io/exporter/ocagent/CONTRIBUTING.md
deleted file mode 100644
index 0786fdf434..0000000000
--- a/vendor/contrib.go.opencensus.io/exporter/ocagent/CONTRIBUTING.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# How to contribute
-
-We'd love to accept your patches and contributions to this project. There are
-just a few small guidelines you need to follow.
-
-## Contributor License Agreement
-
-Contributions to this project must be accompanied by a Contributor License
-Agreement. You (or your employer) retain the copyright to your contribution,
-this simply gives us permission to use and redistribute your contributions as
-part of the project. Head over to to see
-your current agreements on file or to sign a new one.
-
-You generally only need to submit a CLA once, so if you've already submitted one
-(even if it was for a different project), you probably don't need to do it
-again.
-
-## Code reviews
-
-All submissions, including submissions by project members, require review. We
-use GitHub pull requests for this purpose. Consult [GitHub Help] for more
-information on using pull requests.
-
-[GitHub Help]: https://help.github.com/articles/about-pull-requests/
diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/README.md b/vendor/contrib.go.opencensus.io/exporter/ocagent/README.md
deleted file mode 100644
index 3b9e908f59..0000000000
--- a/vendor/contrib.go.opencensus.io/exporter/ocagent/README.md
+++ /dev/null
@@ -1,61 +0,0 @@
-# OpenCensus Agent Go Exporter
-
-[![Build Status][travis-image]][travis-url] [![GoDoc][godoc-image]][godoc-url]
-
-
-This repository contains the Go implementation of the OpenCensus Agent (OC-Agent) Exporter.
-OC-Agent is a deamon process running in a VM that can retrieve spans/stats/metrics from
-OpenCensus Library, export them to other backends and possibly push configurations back to
-Library. See more details on [OC-Agent Readme][OCAgentReadme].
-
-Note: This is an experimental repository and is likely to get backwards-incompatible changes.
-Ultimately we may want to move the OC-Agent Go Exporter to [OpenCensus Go core library][OpenCensusGo].
-
-## Installation
-
-```bash
-$ go get -u contrib.go.opencensus.io/exporter/ocagent
-```
-
-## Usage
-
-```go
-import (
- "context"
- "fmt"
- "log"
- "time"
-
- "contrib.go.opencensus.io/exporter/ocagent"
- "go.opencensus.io/trace"
-)
-
-func Example() {
- exp, err := ocagent.NewExporter(ocagent.WithInsecure(), ocagent.WithServiceName("your-service-name"))
- if err != nil {
- log.Fatalf("Failed to create the agent exporter: %v", err)
- }
- defer exp.Stop()
-
- // Now register it as a trace exporter.
- trace.RegisterExporter(exp)
-
- // Then use the OpenCensus tracing library, like we normally would.
- ctx, span := trace.StartSpan(context.Background(), "AgentExporter-Example")
- defer span.End()
-
- for i := 0; i < 10; i++ {
- _, iSpan := trace.StartSpan(ctx, fmt.Sprintf("Sample-%d", i))
- <-time.After(6 * time.Millisecond)
- iSpan.End()
- }
-}
-```
-
-[OCAgentReadme]: https://github.com/census-instrumentation/opencensus-proto/tree/master/opencensus/proto/agent#opencensus-agent-proto
-[OpenCensusGo]: https://github.com/census-instrumentation/opencensus-go
-[godoc-image]: https://godoc.org/contrib.go.opencensus.io/exporter/ocagent?status.svg
-[godoc-url]: https://godoc.org/contrib.go.opencensus.io/exporter/ocagent
-[travis-image]: https://travis-ci.org/census-ecosystem/opencensus-go-exporter-ocagent.svg?branch=master
-[travis-url]: https://travis-ci.org/census-ecosystem/opencensus-go-exporter-ocagent
-
diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/common.go b/vendor/contrib.go.opencensus.io/exporter/ocagent/common.go
deleted file mode 100644
index 297e44b6e7..0000000000
--- a/vendor/contrib.go.opencensus.io/exporter/ocagent/common.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2018, OpenCensus Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package ocagent
-
-import (
- "math/rand"
- "time"
-)
-
-var randSrc = rand.New(rand.NewSource(time.Now().UnixNano()))
-
-// retries function fn upto n times, if fn returns an error lest it returns nil early.
-// It applies exponential backoff in units of (1<= maxAnnotationEventsPerSpan {
- droppedAnnotationsCount = len(as) - i
- break
- }
- annotations++
- timeEvents.TimeEvent = append(timeEvents.TimeEvent,
- &tracepb.Span_TimeEvent{
- Time: timeToTimestamp(a.Time),
- Value: transformAnnotationToTimeEvent(&a),
- },
- )
- }
-
- // Transform message events
- for i, e := range es {
- if messageEvents >= maxMessageEventsPerSpan {
- droppedMessageEventsCount = len(es) - i
- break
- }
- messageEvents++
- timeEvents.TimeEvent = append(timeEvents.TimeEvent,
- &tracepb.Span_TimeEvent{
- Time: timeToTimestamp(e.Time),
- Value: transformMessageEventToTimeEvent(&e),
- },
- )
- }
-
- // Process dropped counter
- timeEvents.DroppedAnnotationsCount = clip32(droppedAnnotationsCount)
- timeEvents.DroppedMessageEventsCount = clip32(droppedMessageEventsCount)
-
- return timeEvents
-}
-
-func transformAnnotationToTimeEvent(a *trace.Annotation) *tracepb.Span_TimeEvent_Annotation_ {
- return &tracepb.Span_TimeEvent_Annotation_{
- Annotation: &tracepb.Span_TimeEvent_Annotation{
- Description: &tracepb.TruncatableString{Value: a.Message},
- Attributes: ocAttributesToProtoAttributes(a.Attributes),
- },
- }
-}
-
-func transformMessageEventToTimeEvent(e *trace.MessageEvent) *tracepb.Span_TimeEvent_MessageEvent_ {
- return &tracepb.Span_TimeEvent_MessageEvent_{
- MessageEvent: &tracepb.Span_TimeEvent_MessageEvent{
- Type: tracepb.Span_TimeEvent_MessageEvent_Type(e.EventType),
- Id: uint64(e.MessageID),
- UncompressedSize: uint64(e.UncompressedByteSize),
- CompressedSize: uint64(e.CompressedByteSize),
- },
- }
-}
-
-// clip32 clips an int to the range of an int32.
-func clip32(x int) int32 {
- if x < math.MinInt32 {
- return math.MinInt32
- }
- if x > math.MaxInt32 {
- return math.MaxInt32
- }
- return int32(x)
-}
-
-func timeToTimestamp(t time.Time) *timestamp.Timestamp {
- nanoTime := t.UnixNano()
- return ×tamp.Timestamp{
- Seconds: nanoTime / 1e9,
- Nanos: int32(nanoTime % 1e9),
- }
-}
-
-func ocSpanKindToProtoSpanKind(kind int) tracepb.Span_SpanKind {
- switch kind {
- case trace.SpanKindClient:
- return tracepb.Span_CLIENT
- case trace.SpanKindServer:
- return tracepb.Span_SERVER
- default:
- return tracepb.Span_SPAN_KIND_UNSPECIFIED
- }
-}
-
-func ocTracestateToProtoTracestate(ts *tracestate.Tracestate) *tracepb.Span_Tracestate {
- if ts == nil {
- return nil
- }
- return &tracepb.Span_Tracestate{
- Entries: ocTracestateEntriesToProtoTracestateEntries(ts.Entries()),
- }
-}
-
-func ocTracestateEntriesToProtoTracestateEntries(entries []tracestate.Entry) []*tracepb.Span_Tracestate_Entry {
- protoEntries := make([]*tracepb.Span_Tracestate_Entry, 0, len(entries))
- for _, entry := range entries {
- protoEntries = append(protoEntries, &tracepb.Span_Tracestate_Entry{
- Key: entry.Key,
- Value: entry.Value,
- })
- }
- return protoEntries
-}
diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/transform_stats_to_metrics.go b/vendor/contrib.go.opencensus.io/exporter/ocagent/transform_stats_to_metrics.go
deleted file mode 100644
index 855708ab83..0000000000
--- a/vendor/contrib.go.opencensus.io/exporter/ocagent/transform_stats_to_metrics.go
+++ /dev/null
@@ -1,294 +0,0 @@
-// Copyright 2018, OpenCensus Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package ocagent
-
-import (
- "errors"
- "time"
-
- "go.opencensus.io/exemplar"
- "go.opencensus.io/stats"
- "go.opencensus.io/stats/view"
- "go.opencensus.io/tag"
-
- "github.com/golang/protobuf/ptypes/timestamp"
-
- metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1"
-)
-
-var (
- errNilMeasure = errors.New("expecting a non-nil stats.Measure")
- errNilView = errors.New("expecting a non-nil view.View")
- errNilViewData = errors.New("expecting a non-nil view.Data")
-)
-
-func viewDataToMetric(vd *view.Data) (*metricspb.Metric, error) {
- if vd == nil {
- return nil, errNilViewData
- }
-
- descriptor, err := viewToMetricDescriptor(vd.View)
- if err != nil {
- return nil, err
- }
-
- timeseries, err := viewDataToTimeseries(vd)
- if err != nil {
- return nil, err
- }
-
- metric := &metricspb.Metric{
- Descriptor_: descriptor,
- Timeseries: timeseries,
- }
- return metric, nil
-}
-
-func viewToMetricDescriptor(v *view.View) (*metricspb.Metric_MetricDescriptor, error) {
- if v == nil {
- return nil, errNilView
- }
- if v.Measure == nil {
- return nil, errNilMeasure
- }
-
- desc := &metricspb.Metric_MetricDescriptor{
- MetricDescriptor: &metricspb.MetricDescriptor{
- Name: stringOrCall(v.Name, v.Measure.Name),
- Description: stringOrCall(v.Description, v.Measure.Description),
- Unit: v.Measure.Unit(),
- Type: aggregationToMetricDescriptorType(v),
- LabelKeys: tagKeysToLabelKeys(v.TagKeys),
- },
- }
- return desc, nil
-}
-
-func stringOrCall(first string, call func() string) string {
- if first != "" {
- return first
- }
- return call()
-}
-
-type measureType uint
-
-const (
- measureUnknown measureType = iota
- measureInt64
- measureFloat64
-)
-
-func measureTypeFromMeasure(m stats.Measure) measureType {
- switch m.(type) {
- default:
- return measureUnknown
- case *stats.Float64Measure:
- return measureFloat64
- case *stats.Int64Measure:
- return measureInt64
- }
-}
-
-func aggregationToMetricDescriptorType(v *view.View) metricspb.MetricDescriptor_Type {
- if v == nil || v.Aggregation == nil {
- return metricspb.MetricDescriptor_UNSPECIFIED
- }
- if v.Measure == nil {
- return metricspb.MetricDescriptor_UNSPECIFIED
- }
-
- switch v.Aggregation.Type {
- case view.AggTypeCount:
- // Cumulative on int64
- return metricspb.MetricDescriptor_CUMULATIVE_INT64
-
- case view.AggTypeDistribution:
- // Cumulative types
- return metricspb.MetricDescriptor_CUMULATIVE_DISTRIBUTION
-
- case view.AggTypeLastValue:
- // Gauge types
- switch measureTypeFromMeasure(v.Measure) {
- case measureFloat64:
- return metricspb.MetricDescriptor_GAUGE_DOUBLE
- case measureInt64:
- return metricspb.MetricDescriptor_GAUGE_INT64
- }
-
- case view.AggTypeSum:
- // Cumulative types
- switch measureTypeFromMeasure(v.Measure) {
- case measureFloat64:
- return metricspb.MetricDescriptor_CUMULATIVE_DOUBLE
- case measureInt64:
- return metricspb.MetricDescriptor_CUMULATIVE_INT64
- }
- }
-
- // For all other cases, return unspecified.
- return metricspb.MetricDescriptor_UNSPECIFIED
-}
-
-func tagKeysToLabelKeys(tagKeys []tag.Key) []*metricspb.LabelKey {
- labelKeys := make([]*metricspb.LabelKey, 0, len(tagKeys))
- for _, tagKey := range tagKeys {
- labelKeys = append(labelKeys, &metricspb.LabelKey{
- Key: tagKey.Name(),
- })
- }
- return labelKeys
-}
-
-func viewDataToTimeseries(vd *view.Data) ([]*metricspb.TimeSeries, error) {
- if vd == nil || len(vd.Rows) == 0 {
- return nil, nil
- }
-
- // Given that view.Data only contains Start, End
- // the timestamps for all the row data will be the exact same
- // per aggregation. However, the values will differ.
- // Each row has its own tags.
- startTimestamp := timeToProtoTimestamp(vd.Start)
- endTimestamp := timeToProtoTimestamp(vd.End)
-
- mType := measureTypeFromMeasure(vd.View.Measure)
- timeseries := make([]*metricspb.TimeSeries, 0, len(vd.Rows))
- // It is imperative that the ordering of "LabelValues" matches those
- // of the Label keys in the metric descriptor.
- for _, row := range vd.Rows {
- labelValues := labelValuesFromTags(row.Tags)
- point := rowToPoint(vd.View, row, endTimestamp, mType)
- timeseries = append(timeseries, &metricspb.TimeSeries{
- StartTimestamp: startTimestamp,
- LabelValues: labelValues,
- Points: []*metricspb.Point{point},
- })
- }
-
- if len(timeseries) == 0 {
- return nil, nil
- }
-
- return timeseries, nil
-}
-
-func timeToProtoTimestamp(t time.Time) *timestamp.Timestamp {
- unixNano := t.UnixNano()
- return ×tamp.Timestamp{
- Seconds: int64(unixNano / 1e9),
- Nanos: int32(unixNano % 1e9),
- }
-}
-
-func rowToPoint(v *view.View, row *view.Row, endTimestamp *timestamp.Timestamp, mType measureType) *metricspb.Point {
- pt := &metricspb.Point{
- Timestamp: endTimestamp,
- }
-
- switch data := row.Data.(type) {
- case *view.CountData:
- pt.Value = &metricspb.Point_Int64Value{Int64Value: data.Value}
-
- case *view.DistributionData:
- pt.Value = &metricspb.Point_DistributionValue{
- DistributionValue: &metricspb.DistributionValue{
- Count: data.Count,
- Sum: float64(data.Count) * data.Mean, // because Mean := Sum/Count
- Buckets: bucketsToProtoBuckets(data.CountPerBucket, data.ExemplarsPerBucket),
- BucketOptions: &metricspb.DistributionValue_BucketOptions{
- Type: &metricspb.DistributionValue_BucketOptions_Explicit_{
- Explicit: &metricspb.DistributionValue_BucketOptions_Explicit{
- Bounds: v.Aggregation.Buckets,
- },
- },
- },
- SumOfSquaredDeviation: data.SumOfSquaredDev,
- }}
-
- case *view.LastValueData:
- setPointValue(pt, data.Value, mType)
-
- case *view.SumData:
- setPointValue(pt, data.Value, mType)
- }
-
- return pt
-}
-
-// Not returning anything from this function because metricspb.Point.is_Value is an unexported
-// interface hence we just have to set its value by pointer.
-func setPointValue(pt *metricspb.Point, value float64, mType measureType) {
- if mType == measureInt64 {
- pt.Value = &metricspb.Point_Int64Value{Int64Value: int64(value)}
- } else {
- pt.Value = &metricspb.Point_DoubleValue{DoubleValue: value}
- }
-}
-
-// countPerBucket and exemplars are of the same length in well formed data,
-// otherwise ensure that even if exemplars are non-existent that we always
-// insert counts and create distribution value buckets.
-func bucketsToProtoBuckets(countPerBucket []int64, exemplars []*exemplar.Exemplar) []*metricspb.DistributionValue_Bucket {
- distBuckets := make([]*metricspb.DistributionValue_Bucket, len(countPerBucket))
- for i := 0; i < len(countPerBucket); i++ {
- count := countPerBucket[i]
-
- var exmplr *exemplar.Exemplar
- if i < len(exemplars) {
- exmplr = exemplars[i]
- }
-
- var protoExemplar *metricspb.DistributionValue_Exemplar
- if exmplr != nil {
- protoExemplar = &metricspb.DistributionValue_Exemplar{
- Value: exmplr.Value,
- Timestamp: timeToTimestamp(exmplr.Timestamp),
- Attachments: exmplr.Attachments,
- }
- }
-
- distBuckets[i] = &metricspb.DistributionValue_Bucket{
- Count: count,
- Exemplar: protoExemplar,
- }
- }
-
- return distBuckets
-}
-
-func labelValuesFromTags(tags []tag.Tag) []*metricspb.LabelValue {
- if len(tags) == 0 {
- return nil
- }
-
- labelValues := make([]*metricspb.LabelValue, 0, len(tags))
- for _, tag_ := range tags {
- labelValues = append(labelValues, &metricspb.LabelValue{
- Value: tag_.Value,
-
- // It is imperative that we set the "HasValue" attribute,
- // in order to distinguish missing a label from the empty string.
- // https://godoc.org/github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1#LabelValue.HasValue
- //
- // OpenCensus-Go uses non-pointers for tags as seen by this function's arguments,
- // so the best case that we can use to distinguish missing labels/tags from the
- // empty string is by checking if the Tag.Key.Name() != "" to indicate that we have
- // a value.
- HasValue: tag_.Key.Name() != "",
- })
- }
- return labelValues
-}
diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/version.go b/vendor/contrib.go.opencensus.io/exporter/ocagent/version.go
deleted file mode 100644
index 68be4c75bd..0000000000
--- a/vendor/contrib.go.opencensus.io/exporter/ocagent/version.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2018, OpenCensus Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package ocagent
-
-const Version = "0.0.1"
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go
index 36a3275fda..fab7676fa8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go
@@ -110,8 +110,8 @@ func (client ApplicationsClient) AddOwnerPreparer(ctx context.Context, applicati
// AddOwnerSender sends the AddOwner request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) AddOwnerSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// AddOwnerResponder handles the response to the AddOwner request. The method always
@@ -191,8 +191,8 @@ func (client ApplicationsClient) CreatePreparer(ctx context.Context, parameters
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) CreateSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// CreateResponder handles the response to the Create request. The method always
@@ -266,8 +266,8 @@ func (client ApplicationsClient) DeletePreparer(ctx context.Context, application
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) DeleteSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// DeleteResponder handles the response to the Delete request. The method always
@@ -340,8 +340,8 @@ func (client ApplicationsClient) GetPreparer(ctx context.Context, applicationObj
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) GetSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// GetResponder handles the response to the Get request. The method always
@@ -415,8 +415,8 @@ func (client ApplicationsClient) GetServicePrincipalsIDByAppIDPreparer(ctx conte
// GetServicePrincipalsIDByAppIDSender sends the GetServicePrincipalsIDByAppID request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) GetServicePrincipalsIDByAppIDSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// GetServicePrincipalsIDByAppIDResponder handles the response to the GetServicePrincipalsIDByAppID request. The method always
@@ -498,8 +498,8 @@ func (client ApplicationsClient) ListPreparer(ctx context.Context, filter string
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) ListSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListResponder handles the response to the List request. The method always
@@ -589,8 +589,8 @@ func (client ApplicationsClient) ListKeyCredentialsPreparer(ctx context.Context,
// ListKeyCredentialsSender sends the ListKeyCredentials request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) ListKeyCredentialsSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListKeyCredentialsResponder handles the response to the ListKeyCredentials request. The method always
@@ -664,8 +664,8 @@ func (client ApplicationsClient) ListNextPreparer(ctx context.Context, nextLink
// ListNextSender sends the ListNext request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) ListNextSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListNextResponder handles the response to the ListNext request. The method always
@@ -740,8 +740,8 @@ func (client ApplicationsClient) ListOwnersPreparer(ctx context.Context, applica
// ListOwnersSender sends the ListOwners request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) ListOwnersSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListOwnersResponder handles the response to the ListOwners request. The method always
@@ -852,8 +852,8 @@ func (client ApplicationsClient) ListPasswordCredentialsPreparer(ctx context.Con
// ListPasswordCredentialsSender sends the ListPasswordCredentials request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) ListPasswordCredentialsSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListPasswordCredentialsResponder handles the response to the ListPasswordCredentials request. The method always
@@ -930,8 +930,8 @@ func (client ApplicationsClient) PatchPreparer(ctx context.Context, applicationO
// PatchSender sends the Patch request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) PatchSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// PatchResponder handles the response to the Patch request. The method always
@@ -1006,8 +1006,8 @@ func (client ApplicationsClient) RemoveOwnerPreparer(ctx context.Context, applic
// RemoveOwnerSender sends the RemoveOwner request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) RemoveOwnerSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// RemoveOwnerResponder handles the response to the RemoveOwner request. The method always
@@ -1083,8 +1083,8 @@ func (client ApplicationsClient) UpdateKeyCredentialsPreparer(ctx context.Contex
// UpdateKeyCredentialsSender sends the UpdateKeyCredentials request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) UpdateKeyCredentialsSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// UpdateKeyCredentialsResponder handles the response to the UpdateKeyCredentials request. The method always
@@ -1160,8 +1160,8 @@ func (client ApplicationsClient) UpdatePasswordCredentialsPreparer(ctx context.C
// UpdatePasswordCredentialsSender sends the UpdatePasswordCredentials request. The method will close the
// http.Response Body if it receives an error.
func (client ApplicationsClient) UpdatePasswordCredentialsSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// UpdatePasswordCredentialsResponder handles the response to the UpdatePasswordCredentials request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/deletedapplications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/deletedapplications.go
index 1107dff959..fe3b2da5db 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/deletedapplications.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/deletedapplications.go
@@ -99,8 +99,8 @@ func (client DeletedApplicationsClient) HardDeletePreparer(ctx context.Context,
// HardDeleteSender sends the HardDelete request. The method will close the
// http.Response Body if it receives an error.
func (client DeletedApplicationsClient) HardDeleteSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// HardDeleteResponder handles the response to the HardDelete request. The method always
@@ -181,8 +181,8 @@ func (client DeletedApplicationsClient) ListPreparer(ctx context.Context, filter
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client DeletedApplicationsClient) ListSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListResponder handles the response to the List request. The method always
@@ -272,8 +272,8 @@ func (client DeletedApplicationsClient) ListNextPreparer(ctx context.Context, ne
// ListNextSender sends the ListNext request. The method will close the
// http.Response Body if it receives an error.
func (client DeletedApplicationsClient) ListNextSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListNextResponder handles the response to the ListNext request. The method always
@@ -347,8 +347,8 @@ func (client DeletedApplicationsClient) RestorePreparer(ctx context.Context, obj
// RestoreSender sends the Restore request. The method will close the
// http.Response Body if it receives an error.
func (client DeletedApplicationsClient) RestoreSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// RestoreResponder handles the response to the Restore request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/domains.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/domains.go
index e19a6fe06f..93c6cac1e0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/domains.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/domains.go
@@ -98,8 +98,8 @@ func (client DomainsClient) GetPreparer(ctx context.Context, domainName string)
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client DomainsClient) GetSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// GetResponder handles the response to the Get request. The method always
@@ -175,8 +175,8 @@ func (client DomainsClient) ListPreparer(ctx context.Context, filter string) (*h
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client DomainsClient) ListSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListResponder handles the response to the List request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/groups.go
index 3f0e2097dd..4ed37e94f0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/groups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/groups.go
@@ -110,8 +110,8 @@ func (client GroupsClient) AddMemberPreparer(ctx context.Context, groupObjectID
// AddMemberSender sends the AddMember request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) AddMemberSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// AddMemberResponder handles the response to the AddMember request. The method always
@@ -194,8 +194,8 @@ func (client GroupsClient) AddOwnerPreparer(ctx context.Context, objectID string
// AddOwnerSender sends the AddOwner request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) AddOwnerSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// AddOwnerResponder handles the response to the AddOwner request. The method always
@@ -278,8 +278,8 @@ func (client GroupsClient) CreatePreparer(ctx context.Context, parameters GroupC
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) CreateSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// CreateResponder handles the response to the Create request. The method always
@@ -353,8 +353,8 @@ func (client GroupsClient) DeletePreparer(ctx context.Context, objectID string)
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) DeleteSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// DeleteResponder handles the response to the Delete request. The method always
@@ -427,8 +427,8 @@ func (client GroupsClient) GetPreparer(ctx context.Context, objectID string) (*h
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) GetSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// GetResponder handles the response to the Get request. The method always
@@ -508,8 +508,8 @@ func (client GroupsClient) GetGroupMembersPreparer(ctx context.Context, objectID
// GetGroupMembersSender sends the GetGroupMembers request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) GetGroupMembersSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// GetGroupMembersResponder handles the response to the GetGroupMembers request. The method always
@@ -599,8 +599,8 @@ func (client GroupsClient) GetGroupMembersNextPreparer(ctx context.Context, next
// GetGroupMembersNextSender sends the GetGroupMembersNext request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) GetGroupMembersNextSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// GetGroupMembersNextResponder handles the response to the GetGroupMembersNext request. The method always
@@ -683,8 +683,8 @@ func (client GroupsClient) GetMemberGroupsPreparer(ctx context.Context, objectID
// GetMemberGroupsSender sends the GetMemberGroups request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) GetMemberGroupsSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// GetMemberGroupsResponder handles the response to the GetMemberGroups request. The method always
@@ -767,8 +767,8 @@ func (client GroupsClient) IsMemberOfPreparer(ctx context.Context, parameters Ch
// IsMemberOfSender sends the IsMemberOf request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) IsMemberOfSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// IsMemberOfResponder handles the response to the IsMemberOf request. The method always
@@ -850,8 +850,8 @@ func (client GroupsClient) ListPreparer(ctx context.Context, filter string) (*ht
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) ListSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListResponder handles the response to the List request. The method always
@@ -941,8 +941,8 @@ func (client GroupsClient) ListNextPreparer(ctx context.Context, nextLink string
// ListNextSender sends the ListNext request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) ListNextSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListNextResponder handles the response to the ListNext request. The method always
@@ -1017,8 +1017,8 @@ func (client GroupsClient) ListOwnersPreparer(ctx context.Context, objectID stri
// ListOwnersSender sends the ListOwners request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) ListOwnersSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListOwnersResponder handles the response to the ListOwners request. The method always
@@ -1131,8 +1131,8 @@ func (client GroupsClient) RemoveMemberPreparer(ctx context.Context, groupObject
// RemoveMemberSender sends the RemoveMember request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) RemoveMemberSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// RemoveMemberResponder handles the response to the RemoveMember request. The method always
@@ -1207,8 +1207,8 @@ func (client GroupsClient) RemoveOwnerPreparer(ctx context.Context, objectID str
// RemoveOwnerSender sends the RemoveOwner request. The method will close the
// http.Response Body if it receives an error.
func (client GroupsClient) RemoveOwnerSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// RemoveOwnerResponder handles the response to the RemoveOwner request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/oauth2permissiongrant.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/oauth2permissiongrant.go
index 3d1ec66eb6..04ddbb3e89 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/oauth2permissiongrant.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/oauth2permissiongrant.go
@@ -103,8 +103,8 @@ func (client OAuth2PermissionGrantClient) CreatePreparer(ctx context.Context, bo
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client OAuth2PermissionGrantClient) CreateSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// CreateResponder handles the response to the Create request. The method always
@@ -178,8 +178,8 @@ func (client OAuth2PermissionGrantClient) DeletePreparer(ctx context.Context, ob
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client OAuth2PermissionGrantClient) DeleteSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// DeleteResponder handles the response to the Delete request. The method always
@@ -260,8 +260,8 @@ func (client OAuth2PermissionGrantClient) ListPreparer(ctx context.Context, filt
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client OAuth2PermissionGrantClient) ListSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListResponder handles the response to the List request. The method always
@@ -351,8 +351,8 @@ func (client OAuth2PermissionGrantClient) ListNextPreparer(ctx context.Context,
// ListNextSender sends the ListNext request. The method will close the
// http.Response Body if it receives an error.
func (client OAuth2PermissionGrantClient) ListNextSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListNextResponder handles the response to the ListNext request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/objects.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/objects.go
index 04d3cc6395..3f6ca5c4bf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/objects.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/objects.go
@@ -107,8 +107,8 @@ func (client ObjectsClient) GetObjectsByObjectIdsPreparer(ctx context.Context, p
// GetObjectsByObjectIdsSender sends the GetObjectsByObjectIds request. The method will close the
// http.Response Body if it receives an error.
func (client ObjectsClient) GetObjectsByObjectIdsSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// GetObjectsByObjectIdsResponder handles the response to the GetObjectsByObjectIds request. The method always
@@ -198,8 +198,8 @@ func (client ObjectsClient) GetObjectsByObjectIdsNextPreparer(ctx context.Contex
// GetObjectsByObjectIdsNextSender sends the GetObjectsByObjectIdsNext request. The method will close the
// http.Response Body if it receives an error.
func (client ObjectsClient) GetObjectsByObjectIdsNextSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// GetObjectsByObjectIdsNextResponder handles the response to the GetObjectsByObjectIdsNext request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/serviceprincipals.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/serviceprincipals.go
index bca9e9ed2e..45099830b5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/serviceprincipals.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/serviceprincipals.go
@@ -107,8 +107,8 @@ func (client ServicePrincipalsClient) CreatePreparer(ctx context.Context, parame
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client ServicePrincipalsClient) CreateSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// CreateResponder handles the response to the Create request. The method always
@@ -182,8 +182,8 @@ func (client ServicePrincipalsClient) DeletePreparer(ctx context.Context, object
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ServicePrincipalsClient) DeleteSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// DeleteResponder handles the response to the Delete request. The method always
@@ -256,8 +256,8 @@ func (client ServicePrincipalsClient) GetPreparer(ctx context.Context, objectID
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client ServicePrincipalsClient) GetSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// GetResponder handles the response to the Get request. The method always
@@ -339,8 +339,8 @@ func (client ServicePrincipalsClient) ListPreparer(ctx context.Context, filter s
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ServicePrincipalsClient) ListSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListResponder handles the response to the List request. The method always
@@ -430,8 +430,8 @@ func (client ServicePrincipalsClient) ListKeyCredentialsPreparer(ctx context.Con
// ListKeyCredentialsSender sends the ListKeyCredentials request. The method will close the
// http.Response Body if it receives an error.
func (client ServicePrincipalsClient) ListKeyCredentialsSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListKeyCredentialsResponder handles the response to the ListKeyCredentials request. The method always
@@ -505,8 +505,8 @@ func (client ServicePrincipalsClient) ListNextPreparer(ctx context.Context, next
// ListNextSender sends the ListNext request. The method will close the
// http.Response Body if it receives an error.
func (client ServicePrincipalsClient) ListNextSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListNextResponder handles the response to the ListNext request. The method always
@@ -581,8 +581,8 @@ func (client ServicePrincipalsClient) ListOwnersPreparer(ctx context.Context, ob
// ListOwnersSender sends the ListOwners request. The method will close the
// http.Response Body if it receives an error.
func (client ServicePrincipalsClient) ListOwnersSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListOwnersResponder handles the response to the ListOwners request. The method always
@@ -693,8 +693,8 @@ func (client ServicePrincipalsClient) ListPasswordCredentialsPreparer(ctx contex
// ListPasswordCredentialsSender sends the ListPasswordCredentials request. The method will close the
// http.Response Body if it receives an error.
func (client ServicePrincipalsClient) ListPasswordCredentialsSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListPasswordCredentialsResponder handles the response to the ListPasswordCredentials request. The method always
@@ -771,8 +771,8 @@ func (client ServicePrincipalsClient) UpdatePreparer(ctx context.Context, object
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client ServicePrincipalsClient) UpdateSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// UpdateResponder handles the response to the Update request. The method always
@@ -848,8 +848,8 @@ func (client ServicePrincipalsClient) UpdateKeyCredentialsPreparer(ctx context.C
// UpdateKeyCredentialsSender sends the UpdateKeyCredentials request. The method will close the
// http.Response Body if it receives an error.
func (client ServicePrincipalsClient) UpdateKeyCredentialsSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// UpdateKeyCredentialsResponder handles the response to the UpdateKeyCredentials request. The method always
@@ -925,8 +925,8 @@ func (client ServicePrincipalsClient) UpdatePasswordCredentialsPreparer(ctx cont
// UpdatePasswordCredentialsSender sends the UpdatePasswordCredentials request. The method will close the
// http.Response Body if it receives an error.
func (client ServicePrincipalsClient) UpdatePasswordCredentialsSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// UpdatePasswordCredentialsResponder handles the response to the UpdatePasswordCredentials request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/signedinuser.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/signedinuser.go
index 3b89fca32d..057658eefd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/signedinuser.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/signedinuser.go
@@ -96,8 +96,8 @@ func (client SignedInUserClient) GetPreparer(ctx context.Context) (*http.Request
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client SignedInUserClient) GetSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// GetResponder handles the response to the Get request. The method always
@@ -174,8 +174,8 @@ func (client SignedInUserClient) ListOwnedObjectsPreparer(ctx context.Context) (
// ListOwnedObjectsSender sends the ListOwnedObjects request. The method will close the
// http.Response Body if it receives an error.
func (client SignedInUserClient) ListOwnedObjectsSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListOwnedObjectsResponder handles the response to the ListOwnedObjects request. The method always
@@ -265,8 +265,8 @@ func (client SignedInUserClient) ListOwnedObjectsNextPreparer(ctx context.Contex
// ListOwnedObjectsNextSender sends the ListOwnedObjectsNext request. The method will close the
// http.Response Body if it receives an error.
func (client SignedInUserClient) ListOwnedObjectsNextSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListOwnedObjectsNextResponder handles the response to the ListOwnedObjectsNext request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/users.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/users.go
index a2ef210a27..3c688fe7ba 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/users.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/users.go
@@ -112,8 +112,8 @@ func (client UsersClient) CreatePreparer(ctx context.Context, parameters UserCre
// CreateSender sends the Create request. The method will close the
// http.Response Body if it receives an error.
func (client UsersClient) CreateSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// CreateResponder handles the response to the Create request. The method always
@@ -187,8 +187,8 @@ func (client UsersClient) DeletePreparer(ctx context.Context, upnOrObjectID stri
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client UsersClient) DeleteSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// DeleteResponder handles the response to the Delete request. The method always
@@ -261,8 +261,8 @@ func (client UsersClient) GetPreparer(ctx context.Context, upnOrObjectID string)
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client UsersClient) GetSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// GetResponder handles the response to the Get request. The method always
@@ -345,8 +345,8 @@ func (client UsersClient) GetMemberGroupsPreparer(ctx context.Context, objectID
// GetMemberGroupsSender sends the GetMemberGroups request. The method will close the
// http.Response Body if it receives an error.
func (client UsersClient) GetMemberGroupsSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// GetMemberGroupsResponder handles the response to the GetMemberGroups request. The method always
@@ -428,8 +428,8 @@ func (client UsersClient) ListPreparer(ctx context.Context, filter string) (*htt
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client UsersClient) ListSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListResponder handles the response to the List request. The method always
@@ -519,8 +519,8 @@ func (client UsersClient) ListNextPreparer(ctx context.Context, nextLink string)
// ListNextSender sends the ListNext request. The method will close the
// http.Response Body if it receives an error.
func (client UsersClient) ListNextSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// ListNextResponder handles the response to the ListNext request. The method always
@@ -597,8 +597,8 @@ func (client UsersClient) UpdatePreparer(ctx context.Context, upnOrObjectID stri
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client UsersClient) UpdateSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ return autorest.SendWithSender(client, req, sd...)
}
// UpdateResponder handles the response to the Update request. The method always
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go
index 2f58cd8cfd..16c2988c02 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go
@@ -18,4 +18,4 @@ package version
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// Number contains the semantic version of this SDK.
-const Number = "v29.0.0"
+const Number = "v32.5.0"
diff --git a/vendor/github.com/Azure/go-autorest/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/LICENSE
similarity index 100%
rename from vendor/github.com/Azure/go-autorest/LICENSE
rename to vendor/github.com/Azure/go-autorest/autorest/LICENSE
diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/adal/LICENSE
similarity index 94%
rename from vendor/contrib.go.opencensus.io/exporter/ocagent/LICENSE
rename to vendor/github.com/Azure/go-autorest/autorest/adal/LICENSE
index 261eeb9e9f..b9d6a27ea9 100644
--- a/vendor/contrib.go.opencensus.io/exporter/ocagent/LICENSE
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/LICENSE
@@ -1,3 +1,4 @@
+
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -175,18 +176,7 @@
END OF TERMS AND CONDITIONS
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
+ Copyright 2015 Microsoft Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/README.md b/vendor/github.com/Azure/go-autorest/autorest/adal/README.md
index 7b0c4bc4d2..fec416a9c4 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/README.md
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/README.md
@@ -135,7 +135,7 @@ resource := "https://management.core.windows.net/"
applicationSecret := "APPLICATION_SECRET"
spt, err := adal.NewServicePrincipalToken(
- oauthConfig,
+ *oauthConfig,
appliationID,
applicationSecret,
resource,
@@ -170,7 +170,7 @@ if err != nil {
}
spt, err := adal.NewServicePrincipalTokenFromCertificate(
- oauthConfig,
+ *oauthConfig,
applicationID,
certificate,
rsaPrivateKey,
@@ -195,7 +195,7 @@ oauthClient := &http.Client{}
// Acquire the device code
deviceCode, err := adal.InitiateDeviceAuth(
oauthClient,
- oauthConfig,
+ *oauthConfig,
applicationID,
resource)
if err != nil {
@@ -212,7 +212,7 @@ if err != nil {
}
spt, err := adal.NewServicePrincipalTokenFromManualToken(
- oauthConfig,
+ *oauthConfig,
applicationID,
resource,
*token,
@@ -227,7 +227,7 @@ if (err == nil) {
```Go
spt, err := adal.NewServicePrincipalTokenFromUsernamePassword(
- oauthConfig,
+ *oauthConfig,
applicationID,
username,
password,
@@ -243,11 +243,11 @@ if (err == nil) {
``` Go
spt, err := adal.NewServicePrincipalTokenFromAuthorizationCode(
- oauthConfig,
+ *oauthConfig,
applicationID,
clientSecret,
- authorizationCode,
- redirectURI,
+ authorizationCode,
+ redirectURI,
resource,
callbacks...)
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/config.go b/vendor/github.com/Azure/go-autorest/autorest/adal/config.go
index 8c83a917ff..fa5964742f 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/config.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/config.go
@@ -15,10 +15,15 @@ package adal
// limitations under the License.
import (
+ "errors"
"fmt"
"net/url"
)
+const (
+ activeDirectoryEndpointTemplate = "%s/oauth2/%s%s"
+)
+
// OAuthConfig represents the endpoints needed
// in OAuth operations
type OAuthConfig struct {
@@ -60,7 +65,6 @@ func NewOAuthConfigWithAPIVersion(activeDirectoryEndpoint, tenantID string, apiV
}
api = fmt.Sprintf("?api-version=%s", *apiVersion)
}
- const activeDirectoryEndpointTemplate = "%s/oauth2/%s%s"
u, err := url.Parse(activeDirectoryEndpoint)
if err != nil {
return nil, err
@@ -89,3 +93,59 @@ func NewOAuthConfigWithAPIVersion(activeDirectoryEndpoint, tenantID string, apiV
DeviceCodeEndpoint: *deviceCodeURL,
}, nil
}
+
+// MultiTenantOAuthConfig provides endpoints for primary and aulixiary tenant IDs.
+type MultiTenantOAuthConfig interface {
+ PrimaryTenant() *OAuthConfig
+ AuxiliaryTenants() []*OAuthConfig
+}
+
+// OAuthOptions contains optional OAuthConfig creation arguments.
+type OAuthOptions struct {
+ APIVersion string
+}
+
+func (c OAuthOptions) apiVersion() string {
+ if c.APIVersion != "" {
+ return fmt.Sprintf("?api-version=%s", c.APIVersion)
+ }
+ return "1.0"
+}
+
+// NewMultiTenantOAuthConfig creates an object that support multitenant OAuth configuration.
+// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/authenticate-multi-tenant for more information.
+func NewMultiTenantOAuthConfig(activeDirectoryEndpoint, primaryTenantID string, auxiliaryTenantIDs []string, options OAuthOptions) (MultiTenantOAuthConfig, error) {
+ if len(auxiliaryTenantIDs) == 0 || len(auxiliaryTenantIDs) > 3 {
+ return nil, errors.New("must specify one to three auxiliary tenants")
+ }
+ mtCfg := multiTenantOAuthConfig{
+ cfgs: make([]*OAuthConfig, len(auxiliaryTenantIDs)+1),
+ }
+ apiVer := options.apiVersion()
+ pri, err := NewOAuthConfigWithAPIVersion(activeDirectoryEndpoint, primaryTenantID, &apiVer)
+ if err != nil {
+ return nil, fmt.Errorf("failed to create OAuthConfig for primary tenant: %v", err)
+ }
+ mtCfg.cfgs[0] = pri
+ for i := range auxiliaryTenantIDs {
+ aux, err := NewOAuthConfig(activeDirectoryEndpoint, auxiliaryTenantIDs[i])
+ if err != nil {
+ return nil, fmt.Errorf("failed to create OAuthConfig for tenant '%s': %v", auxiliaryTenantIDs[i], err)
+ }
+ mtCfg.cfgs[i+1] = aux
+ }
+ return mtCfg, nil
+}
+
+type multiTenantOAuthConfig struct {
+ // first config in the slice is the primary tenant
+ cfgs []*OAuthConfig
+}
+
+func (m multiTenantOAuthConfig) PrimaryTenant() *OAuthConfig {
+ return m.cfgs[0]
+}
+
+func (m multiTenantOAuthConfig) AuxiliaryTenants() []*OAuthConfig {
+ return m.cfgs[1:]
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod b/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod
new file mode 100644
index 0000000000..fdc5b90ca5
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod
@@ -0,0 +1,12 @@
+module github.com/Azure/go-autorest/autorest/adal
+
+go 1.12
+
+require (
+ github.com/Azure/go-autorest/autorest v0.9.0
+ github.com/Azure/go-autorest/autorest/date v0.2.0
+ github.com/Azure/go-autorest/autorest/mocks v0.3.0
+ github.com/Azure/go-autorest/tracing v0.5.0
+ github.com/dgrijalva/jwt-go v3.2.0+incompatible
+ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
+)
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum b/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum
new file mode 100644
index 0000000000..f0a018563b
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum
@@ -0,0 +1,23 @@
+github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs=
+github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
+github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
+github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM=
+github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
+github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM=
+github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
+github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI=
+github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0=
+github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc=
+github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
+github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY=
+github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
+github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k=
+github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go
new file mode 100644
index 0000000000..28a4bfc4c4
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go
@@ -0,0 +1,24 @@
+// +build modhack
+
+package adal
+
+// Copyright 2017 Microsoft Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of
+// the resultant binary.
+
+// Necessary for safely adding multi-module repo.
+// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository
+import _ "github.com/Azure/go-autorest/autorest"
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go b/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go
index 834401e00d..d7e4372bbc 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go
@@ -15,7 +15,12 @@ package adal
// limitations under the License.
import (
+ "crypto/tls"
"net/http"
+ "net/http/cookiejar"
+ "sync"
+
+ "github.com/Azure/go-autorest/tracing"
)
const (
@@ -23,6 +28,9 @@ const (
mimeTypeFormPost = "application/x-www-form-urlencoded"
)
+var defaultSender Sender
+var defaultSenderInit = &sync.Once{}
+
// Sender is the interface that wraps the Do method to send HTTP requests.
//
// The standard http.Client conforms to this interface.
@@ -45,7 +53,7 @@ type SendDecorator func(Sender) Sender
// CreateSender creates, decorates, and returns, as a Sender, the default http.Client.
func CreateSender(decorators ...SendDecorator) Sender {
- return DecorateSender(&http.Client{}, decorators...)
+ return DecorateSender(sender(), decorators...)
}
// DecorateSender accepts a Sender and a, possibly empty, set of SendDecorators, which is applies to
@@ -58,3 +66,30 @@ func DecorateSender(s Sender, decorators ...SendDecorator) Sender {
}
return s
}
+
+func sender() Sender {
+ // note that we can't init defaultSender in init() since it will
+ // execute before calling code has had a chance to enable tracing
+ defaultSenderInit.Do(func() {
+ // Use behaviour compatible with DefaultTransport, but require TLS minimum version.
+ defaultTransport := http.DefaultTransport.(*http.Transport)
+ transport := &http.Transport{
+ Proxy: defaultTransport.Proxy,
+ DialContext: defaultTransport.DialContext,
+ MaxIdleConns: defaultTransport.MaxIdleConns,
+ IdleConnTimeout: defaultTransport.IdleConnTimeout,
+ TLSHandshakeTimeout: defaultTransport.TLSHandshakeTimeout,
+ ExpectContinueTimeout: defaultTransport.ExpectContinueTimeout,
+ TLSClientConfig: &tls.Config{
+ MinVersion: tls.VersionTLS12,
+ },
+ }
+ var roundTripper http.RoundTripper = transport
+ if tracing.IsEnabled() {
+ roundTripper = tracing.NewTransport(transport)
+ }
+ j, _ := cookiejar.New(nil)
+ defaultSender = &http.Client{Jar: j, Transport: roundTripper}
+ })
+ return defaultSender
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go
index effa87ab2f..b727534983 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go
@@ -34,7 +34,6 @@ import (
"time"
"github.com/Azure/go-autorest/autorest/date"
- "github.com/Azure/go-autorest/tracing"
"github.com/dgrijalva/jwt-go"
)
@@ -71,6 +70,12 @@ type OAuthTokenProvider interface {
OAuthToken() string
}
+// MultitenantOAuthTokenProvider provides tokens used for multi-tenant authorization.
+type MultitenantOAuthTokenProvider interface {
+ PrimaryOAuthToken() string
+ AuxiliaryOAuthTokens() []string
+}
+
// TokenRefreshError is an interface used by errors returned during token refresh.
type TokenRefreshError interface {
error
@@ -390,7 +395,7 @@ func (spt *ServicePrincipalToken) UnmarshalJSON(data []byte) error {
spt.refreshLock = &sync.RWMutex{}
}
if spt.sender == nil {
- spt.sender = &http.Client{Transport: tracing.Transport}
+ spt.sender = sender()
}
return nil
}
@@ -438,7 +443,7 @@ func NewServicePrincipalTokenWithSecret(oauthConfig OAuthConfig, id string, reso
RefreshWithin: defaultRefresh,
},
refreshLock: &sync.RWMutex{},
- sender: &http.Client{Transport: tracing.Transport},
+ sender: sender(),
refreshCallbacks: callbacks,
}
return spt, nil
@@ -679,7 +684,7 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI
RefreshWithin: defaultRefresh,
},
refreshLock: &sync.RWMutex{},
- sender: &http.Client{Transport: tracing.Transport},
+ sender: sender(),
refreshCallbacks: callbacks,
MaxMSIRefreshAttempts: defaultMaxMSIRefreshAttempts,
}
@@ -983,3 +988,93 @@ func (spt *ServicePrincipalToken) Token() Token {
defer spt.refreshLock.RUnlock()
return spt.inner.Token
}
+
+// MultiTenantServicePrincipalToken contains tokens for multi-tenant authorization.
+type MultiTenantServicePrincipalToken struct {
+ PrimaryToken *ServicePrincipalToken
+ AuxiliaryTokens []*ServicePrincipalToken
+}
+
+// PrimaryOAuthToken returns the primary authorization token.
+func (mt *MultiTenantServicePrincipalToken) PrimaryOAuthToken() string {
+ return mt.PrimaryToken.OAuthToken()
+}
+
+// AuxiliaryOAuthTokens returns one to three auxiliary authorization tokens.
+func (mt *MultiTenantServicePrincipalToken) AuxiliaryOAuthTokens() []string {
+ tokens := make([]string, len(mt.AuxiliaryTokens))
+ for i := range mt.AuxiliaryTokens {
+ tokens[i] = mt.AuxiliaryTokens[i].OAuthToken()
+ }
+ return tokens
+}
+
+// EnsureFreshWithContext will refresh the token if it will expire within the refresh window (as set by
+// RefreshWithin) and autoRefresh flag is on. This method is safe for concurrent use.
+func (mt *MultiTenantServicePrincipalToken) EnsureFreshWithContext(ctx context.Context) error {
+ if err := mt.PrimaryToken.EnsureFreshWithContext(ctx); err != nil {
+ return fmt.Errorf("failed to refresh primary token: %v", err)
+ }
+ for _, aux := range mt.AuxiliaryTokens {
+ if err := aux.EnsureFreshWithContext(ctx); err != nil {
+ return fmt.Errorf("failed to refresh auxiliary token: %v", err)
+ }
+ }
+ return nil
+}
+
+// RefreshWithContext obtains a fresh token for the Service Principal.
+func (mt *MultiTenantServicePrincipalToken) RefreshWithContext(ctx context.Context) error {
+ if err := mt.PrimaryToken.RefreshWithContext(ctx); err != nil {
+ return fmt.Errorf("failed to refresh primary token: %v", err)
+ }
+ for _, aux := range mt.AuxiliaryTokens {
+ if err := aux.RefreshWithContext(ctx); err != nil {
+ return fmt.Errorf("failed to refresh auxiliary token: %v", err)
+ }
+ }
+ return nil
+}
+
+// RefreshExchangeWithContext refreshes the token, but for a different resource.
+func (mt *MultiTenantServicePrincipalToken) RefreshExchangeWithContext(ctx context.Context, resource string) error {
+ if err := mt.PrimaryToken.RefreshExchangeWithContext(ctx, resource); err != nil {
+ return fmt.Errorf("failed to refresh primary token: %v", err)
+ }
+ for _, aux := range mt.AuxiliaryTokens {
+ if err := aux.RefreshExchangeWithContext(ctx, resource); err != nil {
+ return fmt.Errorf("failed to refresh auxiliary token: %v", err)
+ }
+ }
+ return nil
+}
+
+// NewMultiTenantServicePrincipalToken creates a new MultiTenantServicePrincipalToken with the specified credentials and resource.
+func NewMultiTenantServicePrincipalToken(multiTenantCfg MultiTenantOAuthConfig, clientID string, secret string, resource string) (*MultiTenantServicePrincipalToken, error) {
+ if err := validateStringParam(clientID, "clientID"); err != nil {
+ return nil, err
+ }
+ if err := validateStringParam(secret, "secret"); err != nil {
+ return nil, err
+ }
+ if err := validateStringParam(resource, "resource"); err != nil {
+ return nil, err
+ }
+ auxTenants := multiTenantCfg.AuxiliaryTenants()
+ m := MultiTenantServicePrincipalToken{
+ AuxiliaryTokens: make([]*ServicePrincipalToken, len(auxTenants)),
+ }
+ primary, err := NewServicePrincipalToken(*multiTenantCfg.PrimaryTenant(), clientID, secret, resource)
+ if err != nil {
+ return nil, fmt.Errorf("failed to create SPT for primary tenant: %v", err)
+ }
+ m.PrimaryToken = primary
+ for i := range auxTenants {
+ aux, err := NewServicePrincipalToken(*auxTenants[i], clientID, secret, resource)
+ if err != nil {
+ return nil, fmt.Errorf("failed to create SPT for auxiliary tenant: %v", err)
+ }
+ m.AuxiliaryTokens[i] = aux
+ }
+ return &m, nil
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization.go b/vendor/github.com/Azure/go-autorest/autorest/authorization.go
index 2e24b4b397..54e87b5b64 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/authorization.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/authorization.go
@@ -15,6 +15,7 @@ package autorest
// limitations under the License.
import (
+ "crypto/tls"
"encoding/base64"
"fmt"
"net/http"
@@ -22,7 +23,6 @@ import (
"strings"
"github.com/Azure/go-autorest/autorest/adal"
- "github.com/Azure/go-autorest/tracing"
)
const (
@@ -149,11 +149,11 @@ type BearerAuthorizerCallback struct {
// NewBearerAuthorizerCallback creates a bearer authorization callback. The callback
// is invoked when the HTTP request is submitted.
-func NewBearerAuthorizerCallback(sender Sender, callback BearerAuthorizerCallbackFunc) *BearerAuthorizerCallback {
- if sender == nil {
- sender = &http.Client{Transport: tracing.Transport}
+func NewBearerAuthorizerCallback(s Sender, callback BearerAuthorizerCallbackFunc) *BearerAuthorizerCallback {
+ if s == nil {
+ s = sender(tls.RenegotiateNever)
}
- return &BearerAuthorizerCallback{sender: sender, callback: callback}
+ return &BearerAuthorizerCallback{sender: s, callback: callback}
}
// WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header whose value
@@ -285,3 +285,52 @@ func (ba *BasicAuthorizer) WithAuthorization() PrepareDecorator {
return NewAPIKeyAuthorizerWithHeaders(headers).WithAuthorization()
}
+
+// MultiTenantServicePrincipalTokenAuthorizer provides authentication across tenants.
+type MultiTenantServicePrincipalTokenAuthorizer interface {
+ WithAuthorization() PrepareDecorator
+}
+
+// NewMultiTenantServicePrincipalTokenAuthorizer crates a BearerAuthorizer using the given token provider
+func NewMultiTenantServicePrincipalTokenAuthorizer(tp adal.MultitenantOAuthTokenProvider) MultiTenantServicePrincipalTokenAuthorizer {
+ return &multiTenantSPTAuthorizer{tp: tp}
+}
+
+type multiTenantSPTAuthorizer struct {
+ tp adal.MultitenantOAuthTokenProvider
+}
+
+// WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header using the
+// primary token along with the auxiliary authorization header using the auxiliary tokens.
+//
+// By default, the token will be automatically refreshed through the Refresher interface.
+func (mt multiTenantSPTAuthorizer) WithAuthorization() PrepareDecorator {
+ return func(p Preparer) Preparer {
+ return PreparerFunc(func(r *http.Request) (*http.Request, error) {
+ r, err := p.Prepare(r)
+ if err != nil {
+ return r, err
+ }
+ if refresher, ok := mt.tp.(adal.RefresherWithContext); ok {
+ err = refresher.EnsureFreshWithContext(r.Context())
+ if err != nil {
+ var resp *http.Response
+ if tokError, ok := err.(adal.TokenRefreshError); ok {
+ resp = tokError.Response()
+ }
+ return r, NewErrorWithError(err, "azure.multiTenantSPTAuthorizer", "WithAuthorization", resp,
+ "Failed to refresh one or more Tokens for request to %s", r.URL)
+ }
+ }
+ r, err = Prepare(r, WithHeader(headerAuthorization, fmt.Sprintf("Bearer %s", mt.tp.PrimaryOAuthToken())))
+ if err != nil {
+ return r, err
+ }
+ auxTokens := mt.tp.AuxiliaryOAuthTokens()
+ for i := range auxTokens {
+ auxTokens[i] = fmt.Sprintf("Bearer %s", auxTokens[i])
+ }
+ return Prepare(r, WithHeader(headerAuxAuthorization, strings.Join(auxTokens, "; ")))
+ })
+ }
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go b/vendor/github.com/Azure/go-autorest/autorest/azure/async.go
index 0041eacf75..1cb41cbeb1 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/async.go
@@ -45,14 +45,7 @@ var pollingCodes = [...]int{http.StatusNoContent, http.StatusAccepted, http.Stat
// Future provides a mechanism to access the status and results of an asynchronous request.
// Since futures are stateful they should be passed by value to avoid race conditions.
type Future struct {
- req *http.Request // legacy
- pt pollingTracker
-}
-
-// NewFuture returns a new Future object initialized with the specified request.
-// Deprecated: Please use NewFutureFromResponse instead.
-func NewFuture(req *http.Request) Future {
- return Future{req: req}
+ pt pollingTracker
}
// NewFutureFromResponse returns a new Future object initialized
@@ -86,12 +79,6 @@ func (f Future) PollingMethod() PollingMethodType {
return f.pt.pollingMethod()
}
-// Done queries the service to see if the operation has completed.
-// Deprecated: Use DoneWithContext()
-func (f *Future) Done(sender autorest.Sender) (bool, error) {
- return f.DoneWithContext(context.Background(), sender)
-}
-
// DoneWithContext queries the service to see if the operation has completed.
func (f *Future) DoneWithContext(ctx context.Context, sender autorest.Sender) (done bool, err error) {
ctx = tracing.StartSpan(ctx, "github.com/Azure/go-autorest/autorest/azure/async.DoneWithContext")
@@ -104,20 +91,6 @@ func (f *Future) DoneWithContext(ctx context.Context, sender autorest.Sender) (d
tracing.EndSpan(ctx, sc, err)
}()
- // support for legacy Future implementation
- if f.req != nil {
- resp, err := sender.Do(f.req)
- if err != nil {
- return false, err
- }
- pt, err := createPollingTracker(resp)
- if err != nil {
- return false, err
- }
- f.pt = pt
- f.req = nil
- }
- // end legacy
if f.pt == nil {
return false, autorest.NewError("Future", "Done", "future is not initialized")
}
@@ -168,15 +141,6 @@ func (f Future) GetPollingDelay() (time.Duration, bool) {
return d, true
}
-// WaitForCompletion will return when one of the following conditions is met: the long
-// running operation has completed, the provided context is cancelled, or the client's
-// polling duration has been exceeded. It will retry failed polling attempts based on
-// the retry value defined in the client up to the maximum retry attempts.
-// Deprecated: Please use WaitForCompletionRef() instead.
-func (f Future) WaitForCompletion(ctx context.Context, client autorest.Client) error {
- return f.WaitForCompletionRef(ctx, client)
-}
-
// WaitForCompletionRef will return when one of the following conditions is met: the long
// running operation has completed, the provided context is cancelled, or the client's
// polling duration has been exceeded. It will retry failed polling attempts based on
@@ -453,6 +417,11 @@ func (pt *pollingTrackerBase) pollForStatus(ctx context.Context, sender autorest
}
req = req.WithContext(ctx)
+ preparer := autorest.CreatePreparer(autorest.GetPrepareDecorators(ctx)...)
+ req, err = preparer.Prepare(req)
+ if err != nil {
+ return autorest.NewErrorWithError(err, "pollingTrackerBase", "pollForStatus", nil, "failed preparing HTTP request")
+ }
pt.resp, err = sender.Do(req)
if err != nil {
return autorest.NewErrorWithError(err, "pollingTrackerBase", "pollForStatus", nil, "failed to send HTTP request")
@@ -919,43 +888,6 @@ func isValidURL(s string) bool {
return err == nil && u.IsAbs()
}
-// DoPollForAsynchronous returns a SendDecorator that polls if the http.Response is for an Azure
-// long-running operation. It will delay between requests for the duration specified in the
-// RetryAfter header or, if the header is absent, the passed delay. Polling may be canceled via
-// the context associated with the http.Request.
-// Deprecated: Prefer using Futures to allow for non-blocking async operations.
-func DoPollForAsynchronous(delay time.Duration) autorest.SendDecorator {
- return func(s autorest.Sender) autorest.Sender {
- return autorest.SenderFunc(func(r *http.Request) (*http.Response, error) {
- resp, err := s.Do(r)
- if err != nil {
- return resp, err
- }
- if !autorest.ResponseHasStatusCode(resp, pollingCodes[:]...) {
- return resp, nil
- }
- future, err := NewFutureFromResponse(resp)
- if err != nil {
- return resp, err
- }
- // retry until either the LRO completes or we receive an error
- var done bool
- for done, err = future.Done(s); !done && err == nil; done, err = future.Done(s) {
- // check for Retry-After delay, if not present use the specified polling delay
- if pd, ok := future.GetPollingDelay(); ok {
- delay = pd
- }
- // wait until the delay elapses or the context is cancelled
- if delayElapsed := autorest.DelayForBackoff(delay, 0, r.Context().Done()); !delayElapsed {
- return future.Response(),
- autorest.NewErrorWithError(r.Context().Err(), "azure", "DoPollForAsynchronous", future.Response(), "context has been cancelled")
- }
- }
- return future.Response(), err
- })
- }
-}
-
// PollingMethodType defines a type used for enumerating polling mechanisms.
type PollingMethodType string
diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/LICENSE
similarity index 94%
rename from vendor/github.com/census-instrumentation/opencensus-proto/LICENSE
rename to vendor/github.com/Azure/go-autorest/autorest/azure/cli/LICENSE
index d645695673..b9d6a27ea9 100644
--- a/vendor/github.com/census-instrumentation/opencensus-proto/LICENSE
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/LICENSE
@@ -176,18 +176,7 @@
END OF TERMS AND CONDITIONS
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
+ Copyright 2015 Microsoft Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.mod b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.mod
new file mode 100644
index 0000000000..cef48f1ea1
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.mod
@@ -0,0 +1,10 @@
+module github.com/Azure/go-autorest/autorest/azure/cli
+
+go 1.12
+
+require (
+ github.com/Azure/go-autorest/autorest/adal v0.5.0
+ github.com/Azure/go-autorest/autorest/date v0.1.0
+ github.com/dimchansky/utfbom v1.1.0
+ github.com/mitchellh/go-homedir v1.1.0
+)
diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.sum b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.sum
new file mode 100644
index 0000000000..2d6636a338
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.sum
@@ -0,0 +1,17 @@
+github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=
+github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
+github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM=
+github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
+github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI=
+github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k=
+github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4=
+github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8=
+github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
+github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go b/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go
index 85d3202afe..6c20b8179a 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go
@@ -22,9 +22,14 @@ import (
"strings"
)
-// EnvironmentFilepathName captures the name of the environment variable containing the path to the file
-// to be used while populating the Azure Environment.
-const EnvironmentFilepathName = "AZURE_ENVIRONMENT_FILEPATH"
+const (
+ // EnvironmentFilepathName captures the name of the environment variable containing the path to the file
+ // to be used while populating the Azure Environment.
+ EnvironmentFilepathName = "AZURE_ENVIRONMENT_FILEPATH"
+
+ // NotAvailable is used for endpoints and resource IDs that are not available for a given cloud.
+ NotAvailable = "N/A"
+)
var environments = map[string]Environment{
"AZURECHINACLOUD": ChinaCloud,
@@ -33,29 +38,40 @@ var environments = map[string]Environment{
"AZUREUSGOVERNMENTCLOUD": USGovernmentCloud,
}
+// ResourceIdentifier contains a set of Azure resource IDs.
+type ResourceIdentifier struct {
+ Graph string `json:"graph"`
+ KeyVault string `json:"keyVault"`
+ Datalake string `json:"datalake"`
+ Batch string `json:"batch"`
+ OperationalInsights string `json:"operationalInsights"`
+ Storage string `json:"storage"`
+}
+
// Environment represents a set of endpoints for each of Azure's Clouds.
type Environment struct {
- Name string `json:"name"`
- ManagementPortalURL string `json:"managementPortalURL"`
- PublishSettingsURL string `json:"publishSettingsURL"`
- ServiceManagementEndpoint string `json:"serviceManagementEndpoint"`
- ResourceManagerEndpoint string `json:"resourceManagerEndpoint"`
- ActiveDirectoryEndpoint string `json:"activeDirectoryEndpoint"`
- GalleryEndpoint string `json:"galleryEndpoint"`
- KeyVaultEndpoint string `json:"keyVaultEndpoint"`
- GraphEndpoint string `json:"graphEndpoint"`
- ServiceBusEndpoint string `json:"serviceBusEndpoint"`
- BatchManagementEndpoint string `json:"batchManagementEndpoint"`
- StorageEndpointSuffix string `json:"storageEndpointSuffix"`
- SQLDatabaseDNSSuffix string `json:"sqlDatabaseDNSSuffix"`
- TrafficManagerDNSSuffix string `json:"trafficManagerDNSSuffix"`
- KeyVaultDNSSuffix string `json:"keyVaultDNSSuffix"`
- ServiceBusEndpointSuffix string `json:"serviceBusEndpointSuffix"`
- ServiceManagementVMDNSSuffix string `json:"serviceManagementVMDNSSuffix"`
- ResourceManagerVMDNSSuffix string `json:"resourceManagerVMDNSSuffix"`
- ContainerRegistryDNSSuffix string `json:"containerRegistryDNSSuffix"`
- CosmosDBDNSSuffix string `json:"cosmosDBDNSSuffix"`
- TokenAudience string `json:"tokenAudience"`
+ Name string `json:"name"`
+ ManagementPortalURL string `json:"managementPortalURL"`
+ PublishSettingsURL string `json:"publishSettingsURL"`
+ ServiceManagementEndpoint string `json:"serviceManagementEndpoint"`
+ ResourceManagerEndpoint string `json:"resourceManagerEndpoint"`
+ ActiveDirectoryEndpoint string `json:"activeDirectoryEndpoint"`
+ GalleryEndpoint string `json:"galleryEndpoint"`
+ KeyVaultEndpoint string `json:"keyVaultEndpoint"`
+ GraphEndpoint string `json:"graphEndpoint"`
+ ServiceBusEndpoint string `json:"serviceBusEndpoint"`
+ BatchManagementEndpoint string `json:"batchManagementEndpoint"`
+ StorageEndpointSuffix string `json:"storageEndpointSuffix"`
+ SQLDatabaseDNSSuffix string `json:"sqlDatabaseDNSSuffix"`
+ TrafficManagerDNSSuffix string `json:"trafficManagerDNSSuffix"`
+ KeyVaultDNSSuffix string `json:"keyVaultDNSSuffix"`
+ ServiceBusEndpointSuffix string `json:"serviceBusEndpointSuffix"`
+ ServiceManagementVMDNSSuffix string `json:"serviceManagementVMDNSSuffix"`
+ ResourceManagerVMDNSSuffix string `json:"resourceManagerVMDNSSuffix"`
+ ContainerRegistryDNSSuffix string `json:"containerRegistryDNSSuffix"`
+ CosmosDBDNSSuffix string `json:"cosmosDBDNSSuffix"`
+ TokenAudience string `json:"tokenAudience"`
+ ResourceIdentifiers ResourceIdentifier `json:"resourceIdentifiers"`
}
var (
@@ -82,6 +98,14 @@ var (
ContainerRegistryDNSSuffix: "azurecr.io",
CosmosDBDNSSuffix: "documents.azure.com",
TokenAudience: "https://management.azure.com/",
+ ResourceIdentifiers: ResourceIdentifier{
+ Graph: "https://graph.windows.net/",
+ KeyVault: "https://vault.azure.net",
+ Datalake: "https://datalake.azure.net/",
+ Batch: "https://batch.core.windows.net/",
+ OperationalInsights: "https://api.loganalytics.io",
+ Storage: "https://storage.azure.com/",
+ },
}
// USGovernmentCloud is the cloud environment for the US Government
@@ -107,6 +131,14 @@ var (
ContainerRegistryDNSSuffix: "azurecr.us",
CosmosDBDNSSuffix: "documents.azure.us",
TokenAudience: "https://management.usgovcloudapi.net/",
+ ResourceIdentifiers: ResourceIdentifier{
+ Graph: "https://graph.windows.net/",
+ KeyVault: "https://vault.usgovcloudapi.net",
+ Datalake: NotAvailable,
+ Batch: "https://batch.core.usgovcloudapi.net/",
+ OperationalInsights: "https://api.loganalytics.us",
+ Storage: "https://storage.azure.com/",
+ },
}
// ChinaCloud is the cloud environment operated in China
@@ -132,6 +164,14 @@ var (
ContainerRegistryDNSSuffix: "azurecr.cn",
CosmosDBDNSSuffix: "documents.azure.cn",
TokenAudience: "https://management.chinacloudapi.cn/",
+ ResourceIdentifiers: ResourceIdentifier{
+ Graph: "https://graph.chinacloudapi.cn/",
+ KeyVault: "https://vault.azure.cn",
+ Datalake: NotAvailable,
+ Batch: "https://batch.chinacloudapi.cn/",
+ OperationalInsights: NotAvailable,
+ Storage: "https://storage.azure.com/",
+ },
}
// GermanCloud is the cloud environment operated in Germany
@@ -154,9 +194,17 @@ var (
ServiceBusEndpointSuffix: "servicebus.cloudapi.de",
ServiceManagementVMDNSSuffix: "azurecloudapp.de",
ResourceManagerVMDNSSuffix: "cloudapp.microsoftazure.de",
- // ContainerRegistryDNSSuffix: "", ACR not present yet in the German Cloud
- CosmosDBDNSSuffix: "documents.microsoftazure.de",
- TokenAudience: "https://management.microsoftazure.de/",
+ ContainerRegistryDNSSuffix: NotAvailable,
+ CosmosDBDNSSuffix: "documents.microsoftazure.de",
+ TokenAudience: "https://management.microsoftazure.de/",
+ ResourceIdentifiers: ResourceIdentifier{
+ Graph: "https://graph.cloudapi.de/",
+ KeyVault: "https://vault.microsoftazure.de",
+ Datalake: NotAvailable,
+ Batch: "https://batch.cloudapi.de/",
+ OperationalInsights: NotAvailable,
+ Storage: "https://storage.azure.com/",
+ },
}
)
diff --git a/vendor/github.com/Azure/go-autorest/autorest/client.go b/vendor/github.com/Azure/go-autorest/autorest/client.go
index 3496415b27..1c6a0617a1 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/client.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/client.go
@@ -22,12 +22,10 @@ import (
"io/ioutil"
"log"
"net/http"
- "net/http/cookiejar"
"strings"
"time"
"github.com/Azure/go-autorest/logger"
- "github.com/Azure/go-autorest/tracing"
)
const (
@@ -73,6 +71,22 @@ type Response struct {
*http.Response `json:"-"`
}
+// IsHTTPStatus returns true if the returned HTTP status code matches the provided status code.
+// If there was no response (i.e. the underlying http.Response is nil) the return value is false.
+func (r Response) IsHTTPStatus(statusCode int) bool {
+ if r.Response == nil {
+ return false
+ }
+ return r.Response.StatusCode == statusCode
+}
+
+// HasHTTPStatus returns true if the returned HTTP status code matches one of the provided status codes.
+// If there was no response (i.e. the underlying http.Response is nil) or not status codes are provided
+// the return value is false.
+func (r Response) HasHTTPStatus(statusCodes ...int) bool {
+ return ResponseHasStatusCode(r.Response, statusCodes...)
+}
+
// LoggingInspector implements request and response inspectors that log the full request and
// response to a supplied log.
type LoggingInspector struct {
@@ -170,6 +184,24 @@ type Client struct {
// NewClientWithUserAgent returns an instance of a Client with the UserAgent set to the passed
// string.
func NewClientWithUserAgent(ua string) Client {
+ return newClient(ua, tls.RenegotiateNever)
+}
+
+// ClientOptions contains various Client configuration options.
+type ClientOptions struct {
+ // UserAgent is an optional user-agent string to append to the default user agent.
+ UserAgent string
+
+ // Renegotiation is an optional setting to control client-side TLS renegotiation.
+ Renegotiation tls.RenegotiationSupport
+}
+
+// NewClientWithOptions returns an instance of a Client with the specified values.
+func NewClientWithOptions(options ClientOptions) Client {
+ return newClient(options.UserAgent, options.Renegotiation)
+}
+
+func newClient(ua string, renegotiation tls.RenegotiationSupport) Client {
c := Client{
PollingDelay: DefaultPollingDelay,
PollingDuration: DefaultPollingDuration,
@@ -177,7 +209,7 @@ func NewClientWithUserAgent(ua string) Client {
RetryDuration: DefaultRetryDuration,
UserAgent: UserAgent(),
}
- c.Sender = c.sender()
+ c.Sender = c.sender(renegotiation)
c.AddToUserAgent(ua)
return c
}
@@ -221,25 +253,17 @@ func (c Client) Do(r *http.Request) (*http.Response, error) {
return true, v
},
})
- resp, err := SendWithSender(c.sender(), r)
+ resp, err := SendWithSender(c.sender(tls.RenegotiateNever), r)
logger.Instance.WriteResponse(resp, logger.Filter{})
Respond(resp, c.ByInspecting())
return resp, err
}
// sender returns the Sender to which to send requests.
-func (c Client) sender() Sender {
+func (c Client) sender(renengotiation tls.RenegotiationSupport) Sender {
if c.Sender == nil {
- j, _ := cookiejar.New(nil)
- tracing.Transport.Base = &http.Transport{
- TLSClientConfig: &tls.Config{
- MinVersion: tls.VersionTLS12,
- },
- }
- client := &http.Client{Jar: j, Transport: tracing.Transport}
- return client
+ return sender(renengotiation)
}
-
return c.Sender
}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/date/LICENSE
new file mode 100644
index 0000000000..b9d6a27ea9
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/date/LICENSE
@@ -0,0 +1,191 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2015 Microsoft Corporation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/go.mod b/vendor/github.com/Azure/go-autorest/autorest/date/go.mod
new file mode 100644
index 0000000000..3adc4804c3
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/date/go.mod
@@ -0,0 +1,5 @@
+module github.com/Azure/go-autorest/autorest/date
+
+go 1.12
+
+require github.com/Azure/go-autorest/autorest v0.9.0
diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/go.sum b/vendor/github.com/Azure/go-autorest/autorest/date/go.sum
new file mode 100644
index 0000000000..9e2ee7a948
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/date/go.sum
@@ -0,0 +1,16 @@
+github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs=
+github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
+github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=
+github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
+github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
+github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0=
+github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY=
+github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
+github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k=
+github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go
new file mode 100644
index 0000000000..55adf930f4
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go
@@ -0,0 +1,24 @@
+// +build modhack
+
+package date
+
+// Copyright 2017 Microsoft Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of
+// the resultant binary.
+
+// Necessary for safely adding multi-module repo.
+// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository
+import _ "github.com/Azure/go-autorest/autorest"
diff --git a/vendor/github.com/Azure/go-autorest/autorest/go.mod b/vendor/github.com/Azure/go-autorest/autorest/go.mod
new file mode 100644
index 0000000000..ab2ae66ace
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/go.mod
@@ -0,0 +1,11 @@
+module github.com/Azure/go-autorest/autorest
+
+go 1.12
+
+require (
+ github.com/Azure/go-autorest/autorest/adal v0.5.0
+ github.com/Azure/go-autorest/autorest/mocks v0.2.0
+ github.com/Azure/go-autorest/logger v0.1.0
+ github.com/Azure/go-autorest/tracing v0.5.0
+ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
+)
diff --git a/vendor/github.com/Azure/go-autorest/autorest/go.sum b/vendor/github.com/Azure/go-autorest/autorest/go.sum
new file mode 100644
index 0000000000..729b99cd09
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/go.sum
@@ -0,0 +1,18 @@
+github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=
+github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
+github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM=
+github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
+github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI=
+github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0=
+github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY=
+github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
+github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k=
+github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
diff --git a/vendor/github.com/Azure/go-autorest/autorest/preparer.go b/vendor/github.com/Azure/go-autorest/autorest/preparer.go
index 6d67bd7337..9f864ab1a1 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/preparer.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/preparer.go
@@ -16,7 +16,9 @@ package autorest
import (
"bytes"
+ "context"
"encoding/json"
+ "encoding/xml"
"fmt"
"io"
"io/ioutil"
@@ -31,11 +33,33 @@ const (
mimeTypeOctetStream = "application/octet-stream"
mimeTypeFormPost = "application/x-www-form-urlencoded"
- headerAuthorization = "Authorization"
- headerContentType = "Content-Type"
- headerUserAgent = "User-Agent"
+ headerAuthorization = "Authorization"
+ headerAuxAuthorization = "x-ms-authorization-auxiliary"
+ headerContentType = "Content-Type"
+ headerUserAgent = "User-Agent"
)
+// used as a key type in context.WithValue()
+type ctxPrepareDecorators struct{}
+
+// WithPrepareDecorators adds the specified PrepareDecorators to the provided context.
+// If no PrepareDecorators are provided the context is unchanged.
+func WithPrepareDecorators(ctx context.Context, prepareDecorator []PrepareDecorator) context.Context {
+ if len(prepareDecorator) == 0 {
+ return ctx
+ }
+ return context.WithValue(ctx, ctxPrepareDecorators{}, prepareDecorator)
+}
+
+// GetPrepareDecorators returns the PrepareDecorators in the provided context or the provided default PrepareDecorators.
+func GetPrepareDecorators(ctx context.Context, defaultPrepareDecorators ...PrepareDecorator) []PrepareDecorator {
+ inCtx := ctx.Value(ctxPrepareDecorators{})
+ if pd, ok := inCtx.([]PrepareDecorator); ok {
+ return pd
+ }
+ return defaultPrepareDecorators
+}
+
// Preparer is the interface that wraps the Prepare method.
//
// Prepare accepts and possibly modifies an http.Request (e.g., adding Headers). Implementations
@@ -190,6 +214,9 @@ func AsGet() PrepareDecorator { return WithMethod("GET") }
// AsHead returns a PrepareDecorator that sets the HTTP method to HEAD.
func AsHead() PrepareDecorator { return WithMethod("HEAD") }
+// AsMerge returns a PrepareDecorator that sets the HTTP method to MERGE.
+func AsMerge() PrepareDecorator { return WithMethod("MERGE") }
+
// AsOptions returns a PrepareDecorator that sets the HTTP method to OPTIONS.
func AsOptions() PrepareDecorator { return WithMethod("OPTIONS") }
@@ -225,6 +252,25 @@ func WithBaseURL(baseURL string) PrepareDecorator {
}
}
+// WithBytes returns a PrepareDecorator that takes a list of bytes
+// which passes the bytes directly to the body
+func WithBytes(input *[]byte) PrepareDecorator {
+ return func(p Preparer) Preparer {
+ return PreparerFunc(func(r *http.Request) (*http.Request, error) {
+ r, err := p.Prepare(r)
+ if err == nil {
+ if input == nil {
+ return r, fmt.Errorf("Input Bytes was nil")
+ }
+
+ r.ContentLength = int64(len(*input))
+ r.Body = ioutil.NopCloser(bytes.NewReader(*input))
+ }
+ return r, err
+ })
+ }
+}
+
// WithCustomBaseURL returns a PrepareDecorator that replaces brace-enclosed keys within the
// request base URL (i.e., http.Request.URL) with the corresponding values from the passed map.
func WithCustomBaseURL(baseURL string, urlParameters map[string]interface{}) PrepareDecorator {
@@ -377,6 +423,28 @@ func WithJSON(v interface{}) PrepareDecorator {
}
}
+// WithXML returns a PrepareDecorator that encodes the data passed as XML into the body of the
+// request and sets the Content-Length header.
+func WithXML(v interface{}) PrepareDecorator {
+ return func(p Preparer) Preparer {
+ return PreparerFunc(func(r *http.Request) (*http.Request, error) {
+ r, err := p.Prepare(r)
+ if err == nil {
+ b, err := xml.Marshal(v)
+ if err == nil {
+ // we have to tack on an XML header
+ withHeader := xml.Header + string(b)
+ bytesWithHeader := []byte(withHeader)
+
+ r.ContentLength = int64(len(bytesWithHeader))
+ r.Body = ioutil.NopCloser(bytes.NewReader(bytesWithHeader))
+ }
+ }
+ return r, err
+ })
+ }
+}
+
// WithPath returns a PrepareDecorator that adds the supplied path to the request URL. If the path
// is absolute (that is, it begins with a "/"), it replaces the existing path.
func WithPath(path string) PrepareDecorator {
diff --git a/vendor/github.com/Azure/go-autorest/autorest/responder.go b/vendor/github.com/Azure/go-autorest/autorest/responder.go
index a908a0adb7..349e1963a2 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/responder.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/responder.go
@@ -153,6 +153,25 @@ func ByClosingIfError() RespondDecorator {
}
}
+// ByUnmarshallingBytes returns a RespondDecorator that copies the Bytes returned in the
+// response Body into the value pointed to by v.
+func ByUnmarshallingBytes(v *[]byte) RespondDecorator {
+ return func(r Responder) Responder {
+ return ResponderFunc(func(resp *http.Response) error {
+ err := r.Respond(resp)
+ if err == nil {
+ bytes, errInner := ioutil.ReadAll(resp.Body)
+ if errInner != nil {
+ err = fmt.Errorf("Error occurred reading http.Response#Body - Error = '%v'", errInner)
+ } else {
+ *v = bytes
+ }
+ }
+ return err
+ })
+ }
+}
+
// ByUnmarshallingJSON returns a RespondDecorator that decodes a JSON document returned in the
// response Body into the value pointed to by v.
func ByUnmarshallingJSON(v interface{}) RespondDecorator {
diff --git a/vendor/github.com/Azure/go-autorest/autorest/sender.go b/vendor/github.com/Azure/go-autorest/autorest/sender.go
index 6665d7c006..e582489b32 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/sender.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/sender.go
@@ -15,16 +15,40 @@ package autorest
// limitations under the License.
import (
+ "context"
+ "crypto/tls"
"fmt"
"log"
"math"
"net/http"
+ "net/http/cookiejar"
"strconv"
"time"
"github.com/Azure/go-autorest/tracing"
)
+// used as a key type in context.WithValue()
+type ctxSendDecorators struct{}
+
+// WithSendDecorators adds the specified SendDecorators to the provided context.
+// If no SendDecorators are provided the context is unchanged.
+func WithSendDecorators(ctx context.Context, sendDecorator []SendDecorator) context.Context {
+ if len(sendDecorator) == 0 {
+ return ctx
+ }
+ return context.WithValue(ctx, ctxSendDecorators{}, sendDecorator)
+}
+
+// GetSendDecorators returns the SendDecorators in the provided context or the provided default SendDecorators.
+func GetSendDecorators(ctx context.Context, defaultSendDecorators ...SendDecorator) []SendDecorator {
+ inCtx := ctx.Value(ctxSendDecorators{})
+ if sd, ok := inCtx.([]SendDecorator); ok {
+ return sd
+ }
+ return defaultSendDecorators
+}
+
// Sender is the interface that wraps the Do method to send HTTP requests.
//
// The standard http.Client conforms to this interface.
@@ -47,7 +71,7 @@ type SendDecorator func(Sender) Sender
// CreateSender creates, decorates, and returns, as a Sender, the default http.Client.
func CreateSender(decorators ...SendDecorator) Sender {
- return DecorateSender(&http.Client{}, decorators...)
+ return DecorateSender(sender(tls.RenegotiateNever), decorators...)
}
// DecorateSender accepts a Sender and a, possibly empty, set of SendDecorators, which is applies to
@@ -70,7 +94,7 @@ func DecorateSender(s Sender, decorators ...SendDecorator) Sender {
//
// Send will not poll or retry requests.
func Send(r *http.Request, decorators ...SendDecorator) (*http.Response, error) {
- return SendWithSender(&http.Client{Transport: tracing.Transport}, r, decorators...)
+ return SendWithSender(sender(tls.RenegotiateNever), r, decorators...)
}
// SendWithSender sends the passed http.Request, through the provided Sender, returning the
@@ -82,6 +106,29 @@ func SendWithSender(s Sender, r *http.Request, decorators ...SendDecorator) (*ht
return DecorateSender(s, decorators...).Do(r)
}
+func sender(renengotiation tls.RenegotiationSupport) Sender {
+ // Use behaviour compatible with DefaultTransport, but require TLS minimum version.
+ defaultTransport := http.DefaultTransport.(*http.Transport)
+ transport := &http.Transport{
+ Proxy: defaultTransport.Proxy,
+ DialContext: defaultTransport.DialContext,
+ MaxIdleConns: defaultTransport.MaxIdleConns,
+ IdleConnTimeout: defaultTransport.IdleConnTimeout,
+ TLSHandshakeTimeout: defaultTransport.TLSHandshakeTimeout,
+ ExpectContinueTimeout: defaultTransport.ExpectContinueTimeout,
+ TLSClientConfig: &tls.Config{
+ MinVersion: tls.VersionTLS12,
+ Renegotiation: renengotiation,
+ },
+ }
+ var roundTripper http.RoundTripper = transport
+ if tracing.IsEnabled() {
+ roundTripper = tracing.NewTransport(transport)
+ }
+ j, _ := cookiejar.New(nil)
+ return &http.Client{Jar: j, Transport: roundTripper}
+}
+
// AfterDelay returns a SendDecorator that delays for the passed time.Duration before
// invoking the Sender. The delay may be terminated by closing the optional channel on the
// http.Request. If canceled, no further Senders are invoked.
@@ -211,53 +258,77 @@ func DoRetryForAttempts(attempts int, backoff time.Duration) SendDecorator {
// DoRetryForStatusCodes returns a SendDecorator that retries for specified statusCodes for up to the specified
// number of attempts, exponentially backing off between requests using the supplied backoff
-// time.Duration (which may be zero). Retrying may be canceled by closing the optional channel on
-// the http.Request.
+// time.Duration (which may be zero). Retrying may be canceled by cancelling the context on the http.Request.
+// NOTE: Code http.StatusTooManyRequests (429) will *not* be counted against the number of attempts.
func DoRetryForStatusCodes(attempts int, backoff time.Duration, codes ...int) SendDecorator {
return func(s Sender) Sender {
- return SenderFunc(func(r *http.Request) (resp *http.Response, err error) {
- rr := NewRetriableRequest(r)
- // Increment to add the first call (attempts denotes number of retries)
- for attempt := 0; attempt < attempts+1; {
- err = rr.Prepare()
- if err != nil {
- return resp, err
- }
- resp, err = s.Do(rr.Request())
- // if the error isn't temporary don't bother retrying
- if err != nil && !IsTemporaryNetworkError(err) {
- return nil, err
- }
- // we want to retry if err is not nil (e.g. transient network failure). note that for failed authentication
- // resp and err will both have a value, so in this case we don't want to retry as it will never succeed.
- if err == nil && !ResponseHasStatusCode(resp, codes...) || IsTokenRefreshError(err) {
- return resp, err
- }
- delayed := DelayWithRetryAfter(resp, r.Context().Done())
- if !delayed && !DelayForBackoff(backoff, attempt, r.Context().Done()) {
- return resp, r.Context().Err()
- }
- // don't count a 429 against the number of attempts
- // so that we continue to retry until it succeeds
- if resp == nil || resp.StatusCode != http.StatusTooManyRequests {
- attempt++
- }
- }
- return resp, err
+ return SenderFunc(func(r *http.Request) (*http.Response, error) {
+ return doRetryForStatusCodesImpl(s, r, false, attempts, backoff, 0, codes...)
})
}
}
-// DelayWithRetryAfter invokes time.After for the duration specified in the "Retry-After" header in
-// responses with status code 429
+// DoRetryForStatusCodesWithCap returns a SendDecorator that retries for specified statusCodes for up to the
+// specified number of attempts, exponentially backing off between requests using the supplied backoff
+// time.Duration (which may be zero). To cap the maximum possible delay between iterations specify a value greater
+// than zero for cap. Retrying may be canceled by cancelling the context on the http.Request.
+func DoRetryForStatusCodesWithCap(attempts int, backoff, cap time.Duration, codes ...int) SendDecorator {
+ return func(s Sender) Sender {
+ return SenderFunc(func(r *http.Request) (*http.Response, error) {
+ return doRetryForStatusCodesImpl(s, r, true, attempts, backoff, cap, codes...)
+ })
+ }
+}
+
+func doRetryForStatusCodesImpl(s Sender, r *http.Request, count429 bool, attempts int, backoff, cap time.Duration, codes ...int) (resp *http.Response, err error) {
+ rr := NewRetriableRequest(r)
+ // Increment to add the first call (attempts denotes number of retries)
+ for attempt := 0; attempt < attempts+1; {
+ err = rr.Prepare()
+ if err != nil {
+ return
+ }
+ resp, err = s.Do(rr.Request())
+ // if the error isn't temporary don't bother retrying
+ if err != nil && !IsTemporaryNetworkError(err) {
+ return
+ }
+ // we want to retry if err is not nil (e.g. transient network failure). note that for failed authentication
+ // resp and err will both have a value, so in this case we don't want to retry as it will never succeed.
+ if err == nil && !ResponseHasStatusCode(resp, codes...) || IsTokenRefreshError(err) {
+ return resp, err
+ }
+ delayed := DelayWithRetryAfter(resp, r.Context().Done())
+ if !delayed && !DelayForBackoffWithCap(backoff, cap, attempt, r.Context().Done()) {
+ return resp, r.Context().Err()
+ }
+ // when count429 == false don't count a 429 against the number
+ // of attempts so that we continue to retry until it succeeds
+ if count429 || (resp == nil || resp.StatusCode != http.StatusTooManyRequests) {
+ attempt++
+ }
+ }
+ return resp, err
+}
+
+// DelayWithRetryAfter invokes time.After for the duration specified in the "Retry-After" header.
+// The value of Retry-After can be either the number of seconds or a date in RFC1123 format.
+// The function returns true after successfully waiting for the specified duration. If there is
+// no Retry-After header or the wait is cancelled the return value is false.
func DelayWithRetryAfter(resp *http.Response, cancel <-chan struct{}) bool {
if resp == nil {
return false
}
- retryAfter, _ := strconv.Atoi(resp.Header.Get("Retry-After"))
- if resp.StatusCode == http.StatusTooManyRequests && retryAfter > 0 {
+ var dur time.Duration
+ ra := resp.Header.Get("Retry-After")
+ if retryAfter, _ := strconv.Atoi(ra); retryAfter > 0 {
+ dur = time.Duration(retryAfter) * time.Second
+ } else if t, err := time.Parse(time.RFC1123, ra); err == nil {
+ dur = t.Sub(time.Now())
+ }
+ if dur > 0 {
select {
- case <-time.After(time.Duration(retryAfter) * time.Second):
+ case <-time.After(dur):
return true
case <-cancel:
return false
@@ -317,8 +388,22 @@ func WithLogging(logger *log.Logger) SendDecorator {
// Note: Passing attempt 1 will result in doubling "backoff" duration. Treat this as a zero-based attempt
// count.
func DelayForBackoff(backoff time.Duration, attempt int, cancel <-chan struct{}) bool {
+ return DelayForBackoffWithCap(backoff, 0, attempt, cancel)
+}
+
+// DelayForBackoffWithCap invokes time.After for the supplied backoff duration raised to the power of
+// passed attempt (i.e., an exponential backoff delay). Backoff duration is in seconds and can set
+// to zero for no delay. To cap the maximum possible delay specify a value greater than zero for cap.
+// The delay may be canceled by closing the passed channel. If terminated early, returns false.
+// Note: Passing attempt 1 will result in doubling "backoff" duration. Treat this as a zero-based attempt
+// count.
+func DelayForBackoffWithCap(backoff, cap time.Duration, attempt int, cancel <-chan struct{}) bool {
+ d := time.Duration(backoff.Seconds()*math.Pow(2, float64(attempt))) * time.Second
+ if cap > 0 && d > cap {
+ d = cap
+ }
select {
- case <-time.After(time.Duration(backoff.Seconds()*math.Pow(2, float64(attempt))) * time.Second):
+ case <-time.After(d):
return true
case <-cancel:
return false
diff --git a/vendor/github.com/Azure/go-autorest/autorest/to/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/to/LICENSE
new file mode 100644
index 0000000000..b9d6a27ea9
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/to/LICENSE
@@ -0,0 +1,191 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2015 Microsoft Corporation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/Azure/go-autorest/autorest/to/convert.go b/vendor/github.com/Azure/go-autorest/autorest/to/convert.go
index fdda2ce1aa..86694bd255 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/to/convert.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/to/convert.go
@@ -145,3 +145,8 @@ func Float64(i *float64) float64 {
func Float64Ptr(i float64) *float64 {
return &i
}
+
+// ByteSlicePtr returns a pointer to the passed byte slice.
+func ByteSlicePtr(b []byte) *[]byte {
+ return &b
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/to/go.mod b/vendor/github.com/Azure/go-autorest/autorest/to/go.mod
new file mode 100644
index 0000000000..48fd8c6e57
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/to/go.mod
@@ -0,0 +1,5 @@
+module github.com/Azure/go-autorest/autorest/to
+
+go 1.12
+
+require github.com/Azure/go-autorest/autorest v0.9.0
diff --git a/vendor/github.com/Azure/go-autorest/autorest/to/go.sum b/vendor/github.com/Azure/go-autorest/autorest/to/go.sum
new file mode 100644
index 0000000000..d7ee6b4623
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/to/go.sum
@@ -0,0 +1,17 @@
+github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs=
+github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
+github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=
+github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
+github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM=
+github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
+github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0=
+github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY=
+github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
+github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k=
+github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
diff --git a/vendor/github.com/Azure/go-autorest/autorest/to/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/to/go_mod_tidy_hack.go
new file mode 100644
index 0000000000..8e82921070
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/to/go_mod_tidy_hack.go
@@ -0,0 +1,24 @@
+// +build modhack
+
+package to
+
+// Copyright 2017 Microsoft Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of
+// the resultant binary.
+
+// Necessary for safely adding multi-module repo.
+// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository
+import _ "github.com/Azure/go-autorest/autorest"
diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/validation/LICENSE
new file mode 100644
index 0000000000..b9d6a27ea9
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/validation/LICENSE
@@ -0,0 +1,191 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2015 Microsoft Corporation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod b/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod
new file mode 100644
index 0000000000..b3f9b6a096
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod
@@ -0,0 +1,8 @@
+module github.com/Azure/go-autorest/autorest/validation
+
+go 1.12
+
+require (
+ github.com/Azure/go-autorest/autorest v0.9.0
+ github.com/stretchr/testify v1.3.0
+)
diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/go.sum b/vendor/github.com/Azure/go-autorest/autorest/validation/go.sum
new file mode 100644
index 0000000000..6b9010a736
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/validation/go.sum
@@ -0,0 +1,24 @@
+github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs=
+github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
+github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=
+github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
+github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM=
+github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
+github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0=
+github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY=
+github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
+github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k=
+github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/validation/go_mod_tidy_hack.go
new file mode 100644
index 0000000000..2b2668581e
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/validation/go_mod_tidy_hack.go
@@ -0,0 +1,24 @@
+// +build modhack
+
+package validation
+
+// Copyright 2017 Microsoft Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of
+// the resultant binary.
+
+// Necessary for safely adding multi-module repo.
+// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository
+import _ "github.com/Azure/go-autorest/autorest"
diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go b/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go
index ae987f8fae..65899b69b8 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go
@@ -398,11 +398,3 @@ func toInt64(v interface{}) (int64, bool) {
}
return 0, false
}
-
-// NewErrorWithValidationError appends package type and method name in
-// validation error.
-//
-// Deprecated: Please use validation.NewError() instead.
-func NewErrorWithValidationError(err error, packageType, method string) error {
- return NewError(packageType, method, err.Error())
-}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/version.go b/vendor/github.com/Azure/go-autorest/autorest/version.go
index 9ecc348708..cb851937a1 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/version.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/version.go
@@ -19,7 +19,7 @@ import (
"runtime"
)
-const number = "v11.7.0"
+const number = "v13.0.0"
var (
userAgent = fmt.Sprintf("Go/%s (%s-%s) go-autorest/%s",
diff --git a/vendor/github.com/Azure/go-autorest/logger/LICENSE b/vendor/github.com/Azure/go-autorest/logger/LICENSE
new file mode 100644
index 0000000000..b9d6a27ea9
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/logger/LICENSE
@@ -0,0 +1,191 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2015 Microsoft Corporation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/Azure/go-autorest/logger/go.mod b/vendor/github.com/Azure/go-autorest/logger/go.mod
new file mode 100644
index 0000000000..f22ed56bcd
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/logger/go.mod
@@ -0,0 +1,3 @@
+module github.com/Azure/go-autorest/logger
+
+go 1.12
diff --git a/vendor/github.com/Azure/go-autorest/tracing/LICENSE b/vendor/github.com/Azure/go-autorest/tracing/LICENSE
new file mode 100644
index 0000000000..b9d6a27ea9
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/tracing/LICENSE
@@ -0,0 +1,191 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2015 Microsoft Corporation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/Azure/go-autorest/tracing/go.mod b/vendor/github.com/Azure/go-autorest/tracing/go.mod
new file mode 100644
index 0000000000..25c34c1085
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/tracing/go.mod
@@ -0,0 +1,3 @@
+module github.com/Azure/go-autorest/tracing
+
+go 1.12
diff --git a/vendor/github.com/Azure/go-autorest/tracing/tracing.go b/vendor/github.com/Azure/go-autorest/tracing/tracing.go
index cd61cb18b6..0e7a6e9625 100644
--- a/vendor/github.com/Azure/go-autorest/tracing/tracing.go
+++ b/vendor/github.com/Azure/go-autorest/tracing/tracing.go
@@ -16,175 +16,52 @@ package tracing
import (
"context"
- "fmt"
"net/http"
- "os"
-
- "contrib.go.opencensus.io/exporter/ocagent"
- "go.opencensus.io/plugin/ochttp"
- "go.opencensus.io/plugin/ochttp/propagation/tracecontext"
- "go.opencensus.io/stats/view"
- "go.opencensus.io/trace"
-)
-
-var (
- // Transport is the default tracing RoundTripper. The custom options setter will control
- // if traces are being emitted or not.
- Transport = &ochttp.Transport{
- Propagation: &tracecontext.HTTPFormat{},
- GetStartOptions: getStartOptions,
- }
-
- // enabled is the flag for marking if tracing is enabled.
- enabled = false
-
- // Sampler is the tracing sampler. If tracing is disabled it will never sample. Otherwise
- // it will be using the parent sampler or the default.
- sampler = trace.NeverSample()
-
- // Views for metric instrumentation.
- views = map[string]*view.View{}
-
- // the trace exporter
- traceExporter trace.Exporter
)
-func init() {
- enableFromEnv()
+// Tracer represents an HTTP tracing facility.
+type Tracer interface {
+ NewTransport(base *http.Transport) http.RoundTripper
+ StartSpan(ctx context.Context, name string) context.Context
+ EndSpan(ctx context.Context, httpStatusCode int, err error)
}
-func enableFromEnv() {
- _, ok := os.LookupEnv("AZURE_SDK_TRACING_ENABLED")
- _, legacyOk := os.LookupEnv("AZURE_SDK_TRACING_ENABELD")
- if ok || legacyOk {
- agentEndpoint, ok := os.LookupEnv("OCAGENT_TRACE_EXPORTER_ENDPOINT")
+var (
+ tracer Tracer
+)
- if ok {
- EnableWithAIForwarding(agentEndpoint)
- } else {
- Enable()
- }
- }
+// Register will register the provided Tracer. Pass nil to unregister a Tracer.
+func Register(t Tracer) {
+ tracer = t
}
-// IsEnabled returns true if monitoring is enabled for the sdk.
+// IsEnabled returns true if a Tracer has been registered.
func IsEnabled() bool {
- return enabled
-}
-
-// Enable will start instrumentation for metrics and traces.
-func Enable() error {
- enabled = true
- sampler = nil
-
- err := initStats()
- return err
+ return tracer != nil
}
-// Disable will disable instrumentation for metrics and traces.
-func Disable() {
- disableStats()
- sampler = trace.NeverSample()
- if traceExporter != nil {
- trace.UnregisterExporter(traceExporter)
+// NewTransport creates a new instrumenting http.RoundTripper for the
+// registered Tracer. If no Tracer has been registered it returns nil.
+func NewTransport(base *http.Transport) http.RoundTripper {
+ if tracer != nil {
+ return tracer.NewTransport(base)
}
- enabled = false
+ return nil
}
-// EnableWithAIForwarding will start instrumentation and will connect to app insights forwarder
-// exporter making the metrics and traces available in app insights.
-func EnableWithAIForwarding(agentEndpoint string) (err error) {
- err = Enable()
- if err != nil {
- return err
- }
-
- traceExporter, err := ocagent.NewExporter(ocagent.WithInsecure(), ocagent.WithAddress(agentEndpoint))
- if err != nil {
- return err
- }
- trace.RegisterExporter(traceExporter)
- return
-}
-
-// getStartOptions is the custom options setter for the ochttp package.
-func getStartOptions(*http.Request) trace.StartOptions {
- return trace.StartOptions{
- Sampler: sampler,
- }
-}
-
-// initStats registers the views for the http metrics
-func initStats() (err error) {
- clientViews := []*view.View{
- ochttp.ClientCompletedCount,
- ochttp.ClientRoundtripLatencyDistribution,
- ochttp.ClientReceivedBytesDistribution,
- ochttp.ClientSentBytesDistribution,
- }
- for _, cv := range clientViews {
- vn := fmt.Sprintf("Azure/go-autorest/tracing-%s", cv.Name)
- views[vn] = cv.WithName(vn)
- err = view.Register(views[vn])
- if err != nil {
- return err
- }
- }
- return
-}
-
-// disableStats will unregister the previously registered metrics
-func disableStats() {
- for _, v := range views {
- view.Unregister(v)
- }
-}
-
-// StartSpan starts a trace span
+// StartSpan starts a trace span with the specified name, associating it with the
+// provided context. Has no effect if a Tracer has not been registered.
func StartSpan(ctx context.Context, name string) context.Context {
- ctx, _ = trace.StartSpan(ctx, name, trace.WithSampler(sampler))
+ if tracer != nil {
+ return tracer.StartSpan(ctx, name)
+ }
return ctx
}
-// EndSpan ends a previously started span stored in the context
+// EndSpan ends a previously started span stored in the context.
+// Has no effect if a Tracer has not been registered.
func EndSpan(ctx context.Context, httpStatusCode int, err error) {
- span := trace.FromContext(ctx)
-
- if span == nil {
- return
- }
-
- if err != nil {
- span.SetStatus(trace.Status{Message: err.Error(), Code: toTraceStatusCode(httpStatusCode)})
- }
- span.End()
-}
-
-// toTraceStatusCode converts HTTP Codes to OpenCensus codes as defined
-// at https://github.com/census-instrumentation/opencensus-specs/blob/master/trace/HTTP.md#status
-func toTraceStatusCode(httpStatusCode int) int32 {
- switch {
- case http.StatusOK <= httpStatusCode && httpStatusCode < http.StatusBadRequest:
- return trace.StatusCodeOK
- case httpStatusCode == http.StatusBadRequest:
- return trace.StatusCodeInvalidArgument
- case httpStatusCode == http.StatusUnauthorized: // 401 is actually unauthenticated.
- return trace.StatusCodeUnauthenticated
- case httpStatusCode == http.StatusForbidden:
- return trace.StatusCodePermissionDenied
- case httpStatusCode == http.StatusNotFound:
- return trace.StatusCodeNotFound
- case httpStatusCode == http.StatusTooManyRequests:
- return trace.StatusCodeResourceExhausted
- case httpStatusCode == 499:
- return trace.StatusCodeCancelled
- case httpStatusCode == http.StatusNotImplemented:
- return trace.StatusCodeUnimplemented
- case httpStatusCode == http.StatusServiceUnavailable:
- return trace.StatusCodeUnavailable
- case httpStatusCode == http.StatusGatewayTimeout:
- return trace.StatusCodeDeadlineExceeded
- default:
- return trace.StatusCodeUnknown
+ if tracer != nil {
+ tracer.EndSpan(ctx, httpStatusCode, err)
}
}
diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/AUTHORS b/vendor/github.com/census-instrumentation/opencensus-proto/AUTHORS
deleted file mode 100644
index e068e731ea..0000000000
--- a/vendor/github.com/census-instrumentation/opencensus-proto/AUTHORS
+++ /dev/null
@@ -1 +0,0 @@
-Google Inc.
\ No newline at end of file
diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/agent/common/v1/common.pb.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/agent/common/v1/common.pb.go
deleted file mode 100644
index 2a3570beca..0000000000
--- a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/agent/common/v1/common.pb.go
+++ /dev/null
@@ -1,348 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: opencensus/proto/agent/common/v1/common.proto
-
-package v1 // import "github.com/census-instrumentation/opencensus-proto/gen-go/agent/common/v1"
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import timestamp "github.com/golang/protobuf/ptypes/timestamp"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type LibraryInfo_Language int32
-
-const (
- LibraryInfo_LANGUAGE_UNSPECIFIED LibraryInfo_Language = 0
- LibraryInfo_CPP LibraryInfo_Language = 1
- LibraryInfo_C_SHARP LibraryInfo_Language = 2
- LibraryInfo_ERLANG LibraryInfo_Language = 3
- LibraryInfo_GO_LANG LibraryInfo_Language = 4
- LibraryInfo_JAVA LibraryInfo_Language = 5
- LibraryInfo_NODE_JS LibraryInfo_Language = 6
- LibraryInfo_PHP LibraryInfo_Language = 7
- LibraryInfo_PYTHON LibraryInfo_Language = 8
- LibraryInfo_RUBY LibraryInfo_Language = 9
-)
-
-var LibraryInfo_Language_name = map[int32]string{
- 0: "LANGUAGE_UNSPECIFIED",
- 1: "CPP",
- 2: "C_SHARP",
- 3: "ERLANG",
- 4: "GO_LANG",
- 5: "JAVA",
- 6: "NODE_JS",
- 7: "PHP",
- 8: "PYTHON",
- 9: "RUBY",
-}
-var LibraryInfo_Language_value = map[string]int32{
- "LANGUAGE_UNSPECIFIED": 0,
- "CPP": 1,
- "C_SHARP": 2,
- "ERLANG": 3,
- "GO_LANG": 4,
- "JAVA": 5,
- "NODE_JS": 6,
- "PHP": 7,
- "PYTHON": 8,
- "RUBY": 9,
-}
-
-func (x LibraryInfo_Language) String() string {
- return proto.EnumName(LibraryInfo_Language_name, int32(x))
-}
-func (LibraryInfo_Language) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_common_5e0eaac3929d3455, []int{2, 0}
-}
-
-// Identifier metadata of the Node (Application instrumented with OpenCensus)
-// that connects to OpenCensus Agent.
-// In the future we plan to extend the identifier proto definition to support
-// additional information (e.g cloud id, etc.)
-type Node struct {
- // Identifier that uniquely identifies a process within a VM/container.
- Identifier *ProcessIdentifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
- // Information on the OpenCensus Library that initiates the stream.
- LibraryInfo *LibraryInfo `protobuf:"bytes,2,opt,name=library_info,json=libraryInfo,proto3" json:"library_info,omitempty"`
- // Additional information on service.
- ServiceInfo *ServiceInfo `protobuf:"bytes,3,opt,name=service_info,json=serviceInfo,proto3" json:"service_info,omitempty"`
- // Additional attributes.
- Attributes map[string]string `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Node) Reset() { *m = Node{} }
-func (m *Node) String() string { return proto.CompactTextString(m) }
-func (*Node) ProtoMessage() {}
-func (*Node) Descriptor() ([]byte, []int) {
- return fileDescriptor_common_5e0eaac3929d3455, []int{0}
-}
-func (m *Node) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Node.Unmarshal(m, b)
-}
-func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Node.Marshal(b, m, deterministic)
-}
-func (dst *Node) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Node.Merge(dst, src)
-}
-func (m *Node) XXX_Size() int {
- return xxx_messageInfo_Node.Size(m)
-}
-func (m *Node) XXX_DiscardUnknown() {
- xxx_messageInfo_Node.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Node proto.InternalMessageInfo
-
-func (m *Node) GetIdentifier() *ProcessIdentifier {
- if m != nil {
- return m.Identifier
- }
- return nil
-}
-
-func (m *Node) GetLibraryInfo() *LibraryInfo {
- if m != nil {
- return m.LibraryInfo
- }
- return nil
-}
-
-func (m *Node) GetServiceInfo() *ServiceInfo {
- if m != nil {
- return m.ServiceInfo
- }
- return nil
-}
-
-func (m *Node) GetAttributes() map[string]string {
- if m != nil {
- return m.Attributes
- }
- return nil
-}
-
-// Identifier that uniquely identifies a process within a VM/container.
-type ProcessIdentifier struct {
- // The host name. Usually refers to the machine/container name.
- // For example: os.Hostname() in Go, socket.gethostname() in Python.
- HostName string `protobuf:"bytes,1,opt,name=host_name,json=hostName,proto3" json:"host_name,omitempty"`
- // Process id.
- Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
- // Start time of this ProcessIdentifier. Represented in epoch time.
- StartTimestamp *timestamp.Timestamp `protobuf:"bytes,3,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *ProcessIdentifier) Reset() { *m = ProcessIdentifier{} }
-func (m *ProcessIdentifier) String() string { return proto.CompactTextString(m) }
-func (*ProcessIdentifier) ProtoMessage() {}
-func (*ProcessIdentifier) Descriptor() ([]byte, []int) {
- return fileDescriptor_common_5e0eaac3929d3455, []int{1}
-}
-func (m *ProcessIdentifier) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ProcessIdentifier.Unmarshal(m, b)
-}
-func (m *ProcessIdentifier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ProcessIdentifier.Marshal(b, m, deterministic)
-}
-func (dst *ProcessIdentifier) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ProcessIdentifier.Merge(dst, src)
-}
-func (m *ProcessIdentifier) XXX_Size() int {
- return xxx_messageInfo_ProcessIdentifier.Size(m)
-}
-func (m *ProcessIdentifier) XXX_DiscardUnknown() {
- xxx_messageInfo_ProcessIdentifier.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ProcessIdentifier proto.InternalMessageInfo
-
-func (m *ProcessIdentifier) GetHostName() string {
- if m != nil {
- return m.HostName
- }
- return ""
-}
-
-func (m *ProcessIdentifier) GetPid() uint32 {
- if m != nil {
- return m.Pid
- }
- return 0
-}
-
-func (m *ProcessIdentifier) GetStartTimestamp() *timestamp.Timestamp {
- if m != nil {
- return m.StartTimestamp
- }
- return nil
-}
-
-// Information on OpenCensus Library.
-type LibraryInfo struct {
- // Language of OpenCensus Library.
- Language LibraryInfo_Language `protobuf:"varint,1,opt,name=language,proto3,enum=opencensus.proto.agent.common.v1.LibraryInfo_Language" json:"language,omitempty"`
- // Version of Agent exporter of Library.
- ExporterVersion string `protobuf:"bytes,2,opt,name=exporter_version,json=exporterVersion,proto3" json:"exporter_version,omitempty"`
- // Version of OpenCensus Library.
- CoreLibraryVersion string `protobuf:"bytes,3,opt,name=core_library_version,json=coreLibraryVersion,proto3" json:"core_library_version,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *LibraryInfo) Reset() { *m = LibraryInfo{} }
-func (m *LibraryInfo) String() string { return proto.CompactTextString(m) }
-func (*LibraryInfo) ProtoMessage() {}
-func (*LibraryInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_common_5e0eaac3929d3455, []int{2}
-}
-func (m *LibraryInfo) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_LibraryInfo.Unmarshal(m, b)
-}
-func (m *LibraryInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_LibraryInfo.Marshal(b, m, deterministic)
-}
-func (dst *LibraryInfo) XXX_Merge(src proto.Message) {
- xxx_messageInfo_LibraryInfo.Merge(dst, src)
-}
-func (m *LibraryInfo) XXX_Size() int {
- return xxx_messageInfo_LibraryInfo.Size(m)
-}
-func (m *LibraryInfo) XXX_DiscardUnknown() {
- xxx_messageInfo_LibraryInfo.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_LibraryInfo proto.InternalMessageInfo
-
-func (m *LibraryInfo) GetLanguage() LibraryInfo_Language {
- if m != nil {
- return m.Language
- }
- return LibraryInfo_LANGUAGE_UNSPECIFIED
-}
-
-func (m *LibraryInfo) GetExporterVersion() string {
- if m != nil {
- return m.ExporterVersion
- }
- return ""
-}
-
-func (m *LibraryInfo) GetCoreLibraryVersion() string {
- if m != nil {
- return m.CoreLibraryVersion
- }
- return ""
-}
-
-// Additional service information.
-type ServiceInfo struct {
- // Name of the service.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *ServiceInfo) Reset() { *m = ServiceInfo{} }
-func (m *ServiceInfo) String() string { return proto.CompactTextString(m) }
-func (*ServiceInfo) ProtoMessage() {}
-func (*ServiceInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_common_5e0eaac3929d3455, []int{3}
-}
-func (m *ServiceInfo) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ServiceInfo.Unmarshal(m, b)
-}
-func (m *ServiceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ServiceInfo.Marshal(b, m, deterministic)
-}
-func (dst *ServiceInfo) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ServiceInfo.Merge(dst, src)
-}
-func (m *ServiceInfo) XXX_Size() int {
- return xxx_messageInfo_ServiceInfo.Size(m)
-}
-func (m *ServiceInfo) XXX_DiscardUnknown() {
- xxx_messageInfo_ServiceInfo.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ServiceInfo proto.InternalMessageInfo
-
-func (m *ServiceInfo) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func init() {
- proto.RegisterType((*Node)(nil), "opencensus.proto.agent.common.v1.Node")
- proto.RegisterMapType((map[string]string)(nil), "opencensus.proto.agent.common.v1.Node.AttributesEntry")
- proto.RegisterType((*ProcessIdentifier)(nil), "opencensus.proto.agent.common.v1.ProcessIdentifier")
- proto.RegisterType((*LibraryInfo)(nil), "opencensus.proto.agent.common.v1.LibraryInfo")
- proto.RegisterType((*ServiceInfo)(nil), "opencensus.proto.agent.common.v1.ServiceInfo")
- proto.RegisterEnum("opencensus.proto.agent.common.v1.LibraryInfo_Language", LibraryInfo_Language_name, LibraryInfo_Language_value)
-}
-
-func init() {
- proto.RegisterFile("opencensus/proto/agent/common/v1/common.proto", fileDescriptor_common_5e0eaac3929d3455)
-}
-
-var fileDescriptor_common_5e0eaac3929d3455 = []byte{
- // 590 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4f, 0x4f, 0xdb, 0x3e,
- 0x1c, 0xc6, 0x7f, 0x69, 0x0a, 0xb4, 0xdf, 0xfc, 0x06, 0x99, 0xc5, 0xa1, 0x62, 0x87, 0xb1, 0xee,
- 0xc2, 0x0e, 0x4d, 0x06, 0x48, 0xd3, 0x34, 0x69, 0x87, 0x52, 0x3a, 0x28, 0x42, 0x25, 0x72, 0x01,
- 0x89, 0x5d, 0xa2, 0xb4, 0xb8, 0xc1, 0x5a, 0x63, 0x57, 0xb6, 0x53, 0x8d, 0xd3, 0x8e, 0xd3, 0xde,
- 0xc0, 0x5e, 0xd4, 0x5e, 0xd5, 0x64, 0x3b, 0x69, 0xa3, 0x71, 0x28, 0xb7, 0xef, 0x9f, 0xe7, 0xf9,
- 0x38, 0x7a, 0x6c, 0x05, 0x3a, 0x7c, 0x4e, 0xd8, 0x84, 0x30, 0x99, 0xcb, 0x70, 0x2e, 0xb8, 0xe2,
- 0x61, 0x92, 0x12, 0xa6, 0xc2, 0x09, 0xcf, 0x32, 0xce, 0xc2, 0xc5, 0x61, 0x51, 0x05, 0x66, 0x89,
- 0xf6, 0x57, 0x72, 0x3b, 0x09, 0x8c, 0x3c, 0x28, 0x44, 0x8b, 0xc3, 0xbd, 0xd7, 0x29, 0xe7, 0xe9,
- 0x8c, 0x58, 0xd8, 0x38, 0x9f, 0x86, 0x8a, 0x66, 0x44, 0xaa, 0x24, 0x9b, 0x5b, 0x43, 0xfb, 0xb7,
- 0x0b, 0xf5, 0x21, 0xbf, 0x27, 0x68, 0x04, 0x40, 0xef, 0x09, 0x53, 0x74, 0x4a, 0x89, 0x68, 0x39,
- 0xfb, 0xce, 0x81, 0x77, 0x74, 0x1c, 0xac, 0x3b, 0x20, 0x88, 0x04, 0x9f, 0x10, 0x29, 0x07, 0x4b,
- 0x2b, 0xae, 0x60, 0x50, 0x04, 0xff, 0xcf, 0xe8, 0x58, 0x24, 0xe2, 0x31, 0xa6, 0x6c, 0xca, 0x5b,
- 0x35, 0x83, 0xed, 0xac, 0xc7, 0x5e, 0x5a, 0xd7, 0x80, 0x4d, 0x39, 0xf6, 0x66, 0xab, 0x46, 0x13,
- 0x25, 0x11, 0x0b, 0x3a, 0x21, 0x96, 0xe8, 0x3e, 0x97, 0x38, 0xb2, 0x2e, 0x4b, 0x94, 0xab, 0x06,
- 0xdd, 0x02, 0x24, 0x4a, 0x09, 0x3a, 0xce, 0x15, 0x91, 0xad, 0xfa, 0xbe, 0x7b, 0xe0, 0x1d, 0x7d,
- 0x58, 0xcf, 0xd3, 0xa1, 0x05, 0xdd, 0xa5, 0xb1, 0xcf, 0x94, 0x78, 0xc4, 0x15, 0xd2, 0xde, 0x67,
- 0xd8, 0xf9, 0x67, 0x8d, 0x7c, 0x70, 0xbf, 0x91, 0x47, 0x13, 0x6e, 0x13, 0xeb, 0x12, 0xed, 0xc2,
- 0xc6, 0x22, 0x99, 0xe5, 0xc4, 0x24, 0xd3, 0xc4, 0xb6, 0xf9, 0x54, 0xfb, 0xe8, 0xb4, 0x7f, 0x3a,
- 0xf0, 0xf2, 0x49, 0xb8, 0xe8, 0x15, 0x34, 0x1f, 0xb8, 0x54, 0x31, 0x4b, 0x32, 0x52, 0x70, 0x1a,
- 0x7a, 0x30, 0x4c, 0x32, 0xa2, 0xf1, 0x73, 0x7a, 0x6f, 0x50, 0x2f, 0xb0, 0x2e, 0x51, 0x0f, 0x76,
- 0xa4, 0x4a, 0x84, 0x8a, 0x97, 0xd7, 0x5e, 0x04, 0xb6, 0x17, 0xd8, 0x87, 0x11, 0x94, 0x0f, 0x23,
- 0xb8, 0x2e, 0x15, 0x78, 0xdb, 0x58, 0x96, 0x7d, 0xfb, 0x4f, 0x0d, 0xbc, 0xca, 0x7d, 0x20, 0x0c,
- 0x8d, 0x59, 0xc2, 0xd2, 0x3c, 0x49, 0xed, 0x27, 0x6c, 0x3f, 0x27, 0xae, 0x0a, 0x20, 0xb8, 0x2c,
- 0xdc, 0x78, 0xc9, 0x41, 0xef, 0xc0, 0x27, 0xdf, 0xe7, 0x5c, 0x28, 0x22, 0xe2, 0x05, 0x11, 0x92,
- 0x72, 0x56, 0x44, 0xb2, 0x53, 0xce, 0x6f, 0xed, 0x18, 0xbd, 0x87, 0xdd, 0x09, 0x17, 0x24, 0x2e,
- 0x1f, 0x56, 0x29, 0x77, 0x8d, 0x1c, 0xe9, 0x5d, 0x71, 0x58, 0xe1, 0x68, 0xff, 0x72, 0xa0, 0x51,
- 0x9e, 0x89, 0x5a, 0xb0, 0x7b, 0xd9, 0x1d, 0x9e, 0xdd, 0x74, 0xcf, 0xfa, 0xf1, 0xcd, 0x70, 0x14,
- 0xf5, 0x7b, 0x83, 0x2f, 0x83, 0xfe, 0xa9, 0xff, 0x1f, 0xda, 0x02, 0xb7, 0x17, 0x45, 0xbe, 0x83,
- 0x3c, 0xd8, 0xea, 0xc5, 0xa3, 0xf3, 0x2e, 0x8e, 0xfc, 0x1a, 0x02, 0xd8, 0xec, 0x63, 0xed, 0xf0,
- 0x5d, 0xbd, 0x38, 0xbb, 0x8a, 0x4d, 0x53, 0x47, 0x0d, 0xa8, 0x5f, 0x74, 0x6f, 0xbb, 0xfe, 0x86,
- 0x1e, 0x0f, 0xaf, 0x4e, 0xfb, 0xf1, 0xc5, 0xc8, 0xdf, 0xd4, 0x94, 0xe8, 0x3c, 0xf2, 0xb7, 0xb4,
- 0x31, 0xba, 0xbb, 0x3e, 0xbf, 0x1a, 0xfa, 0x0d, 0xad, 0xc5, 0x37, 0x27, 0x77, 0x7e, 0xb3, 0xfd,
- 0x06, 0xbc, 0xca, 0x4b, 0x44, 0x08, 0xea, 0x95, 0xab, 0x34, 0xf5, 0xc9, 0x0f, 0x78, 0x4b, 0xf9,
- 0xda, 0x44, 0x4f, 0xbc, 0x9e, 0x29, 0x23, 0xbd, 0x8c, 0x9c, 0xaf, 0x83, 0x94, 0xaa, 0x87, 0x7c,
- 0xac, 0x05, 0xa1, 0xf5, 0x75, 0x28, 0x93, 0x4a, 0xe4, 0x19, 0x61, 0x2a, 0x51, 0x94, 0xb3, 0x70,
- 0x85, 0xec, 0xd8, 0x9f, 0x4b, 0x4a, 0x58, 0x27, 0x7d, 0xf2, 0x8f, 0x19, 0x6f, 0x9a, 0xed, 0xf1,
- 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x94, 0xe5, 0x77, 0x76, 0x8e, 0x04, 0x00, 0x00,
-}
diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/agent/metrics/v1/metrics_service.pb.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/agent/metrics/v1/metrics_service.pb.go
deleted file mode 100644
index 81e0a4e27d..0000000000
--- a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/agent/metrics/v1/metrics_service.pb.go
+++ /dev/null
@@ -1,263 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: opencensus/proto/agent/metrics/v1/metrics_service.proto
-
-package v1 // import "github.com/census-instrumentation/opencensus-proto/gen-go/agent/metrics/v1"
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import v1 "github.com/census-instrumentation/opencensus-proto/gen-go/agent/common/v1"
-import v11 "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1"
-import v12 "github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1"
-
-import (
- context "golang.org/x/net/context"
- grpc "google.golang.org/grpc"
-)
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type ExportMetricsServiceRequest struct {
- // This is required only in the first message on the stream or if the
- // previous sent ExportMetricsServiceRequest message has a different Node (e.g.
- // when the same RPC is used to send Metrics from multiple Applications).
- Node *v1.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
- // A list of metrics that belong to the last received Node.
- Metrics []*v11.Metric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"`
- // The resource for the metrics in this message that do not have an explicit
- // resource set.
- // If unset, the most recently set resource in the RPC stream applies. It is
- // valid to never be set within a stream, e.g. when no resource info is known
- // at all or when all sent metrics have an explicit resource set.
- Resource *v12.Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *ExportMetricsServiceRequest) Reset() { *m = ExportMetricsServiceRequest{} }
-func (m *ExportMetricsServiceRequest) String() string { return proto.CompactTextString(m) }
-func (*ExportMetricsServiceRequest) ProtoMessage() {}
-func (*ExportMetricsServiceRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_metrics_service_0b252d64875a1756, []int{0}
-}
-func (m *ExportMetricsServiceRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ExportMetricsServiceRequest.Unmarshal(m, b)
-}
-func (m *ExportMetricsServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ExportMetricsServiceRequest.Marshal(b, m, deterministic)
-}
-func (dst *ExportMetricsServiceRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ExportMetricsServiceRequest.Merge(dst, src)
-}
-func (m *ExportMetricsServiceRequest) XXX_Size() int {
- return xxx_messageInfo_ExportMetricsServiceRequest.Size(m)
-}
-func (m *ExportMetricsServiceRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_ExportMetricsServiceRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ExportMetricsServiceRequest proto.InternalMessageInfo
-
-func (m *ExportMetricsServiceRequest) GetNode() *v1.Node {
- if m != nil {
- return m.Node
- }
- return nil
-}
-
-func (m *ExportMetricsServiceRequest) GetMetrics() []*v11.Metric {
- if m != nil {
- return m.Metrics
- }
- return nil
-}
-
-func (m *ExportMetricsServiceRequest) GetResource() *v12.Resource {
- if m != nil {
- return m.Resource
- }
- return nil
-}
-
-type ExportMetricsServiceResponse struct {
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *ExportMetricsServiceResponse) Reset() { *m = ExportMetricsServiceResponse{} }
-func (m *ExportMetricsServiceResponse) String() string { return proto.CompactTextString(m) }
-func (*ExportMetricsServiceResponse) ProtoMessage() {}
-func (*ExportMetricsServiceResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_metrics_service_0b252d64875a1756, []int{1}
-}
-func (m *ExportMetricsServiceResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ExportMetricsServiceResponse.Unmarshal(m, b)
-}
-func (m *ExportMetricsServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ExportMetricsServiceResponse.Marshal(b, m, deterministic)
-}
-func (dst *ExportMetricsServiceResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ExportMetricsServiceResponse.Merge(dst, src)
-}
-func (m *ExportMetricsServiceResponse) XXX_Size() int {
- return xxx_messageInfo_ExportMetricsServiceResponse.Size(m)
-}
-func (m *ExportMetricsServiceResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_ExportMetricsServiceResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ExportMetricsServiceResponse proto.InternalMessageInfo
-
-func init() {
- proto.RegisterType((*ExportMetricsServiceRequest)(nil), "opencensus.proto.agent.metrics.v1.ExportMetricsServiceRequest")
- proto.RegisterType((*ExportMetricsServiceResponse)(nil), "opencensus.proto.agent.metrics.v1.ExportMetricsServiceResponse")
-}
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ context.Context
-var _ grpc.ClientConn
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion4
-
-// MetricsServiceClient is the client API for MetricsService service.
-//
-// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
-type MetricsServiceClient interface {
- // For performance reasons, it is recommended to keep this RPC
- // alive for the entire life of the application.
- Export(ctx context.Context, opts ...grpc.CallOption) (MetricsService_ExportClient, error)
-}
-
-type metricsServiceClient struct {
- cc *grpc.ClientConn
-}
-
-func NewMetricsServiceClient(cc *grpc.ClientConn) MetricsServiceClient {
- return &metricsServiceClient{cc}
-}
-
-func (c *metricsServiceClient) Export(ctx context.Context, opts ...grpc.CallOption) (MetricsService_ExportClient, error) {
- stream, err := c.cc.NewStream(ctx, &_MetricsService_serviceDesc.Streams[0], "/opencensus.proto.agent.metrics.v1.MetricsService/Export", opts...)
- if err != nil {
- return nil, err
- }
- x := &metricsServiceExportClient{stream}
- return x, nil
-}
-
-type MetricsService_ExportClient interface {
- Send(*ExportMetricsServiceRequest) error
- Recv() (*ExportMetricsServiceResponse, error)
- grpc.ClientStream
-}
-
-type metricsServiceExportClient struct {
- grpc.ClientStream
-}
-
-func (x *metricsServiceExportClient) Send(m *ExportMetricsServiceRequest) error {
- return x.ClientStream.SendMsg(m)
-}
-
-func (x *metricsServiceExportClient) Recv() (*ExportMetricsServiceResponse, error) {
- m := new(ExportMetricsServiceResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-// MetricsServiceServer is the server API for MetricsService service.
-type MetricsServiceServer interface {
- // For performance reasons, it is recommended to keep this RPC
- // alive for the entire life of the application.
- Export(MetricsService_ExportServer) error
-}
-
-func RegisterMetricsServiceServer(s *grpc.Server, srv MetricsServiceServer) {
- s.RegisterService(&_MetricsService_serviceDesc, srv)
-}
-
-func _MetricsService_Export_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(MetricsServiceServer).Export(&metricsServiceExportServer{stream})
-}
-
-type MetricsService_ExportServer interface {
- Send(*ExportMetricsServiceResponse) error
- Recv() (*ExportMetricsServiceRequest, error)
- grpc.ServerStream
-}
-
-type metricsServiceExportServer struct {
- grpc.ServerStream
-}
-
-func (x *metricsServiceExportServer) Send(m *ExportMetricsServiceResponse) error {
- return x.ServerStream.SendMsg(m)
-}
-
-func (x *metricsServiceExportServer) Recv() (*ExportMetricsServiceRequest, error) {
- m := new(ExportMetricsServiceRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-var _MetricsService_serviceDesc = grpc.ServiceDesc{
- ServiceName: "opencensus.proto.agent.metrics.v1.MetricsService",
- HandlerType: (*MetricsServiceServer)(nil),
- Methods: []grpc.MethodDesc{},
- Streams: []grpc.StreamDesc{
- {
- StreamName: "Export",
- Handler: _MetricsService_Export_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- },
- Metadata: "opencensus/proto/agent/metrics/v1/metrics_service.proto",
-}
-
-func init() {
- proto.RegisterFile("opencensus/proto/agent/metrics/v1/metrics_service.proto", fileDescriptor_metrics_service_0b252d64875a1756)
-}
-
-var fileDescriptor_metrics_service_0b252d64875a1756 = []byte{
- // 340 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xc1, 0x4a, 0xf3, 0x40,
- 0x14, 0x85, 0xff, 0xf9, 0x2b, 0x55, 0xa6, 0xe0, 0x62, 0xdc, 0x94, 0x2a, 0x52, 0xab, 0x48, 0x45,
- 0x32, 0x63, 0xea, 0x42, 0x10, 0x54, 0x28, 0xb8, 0x11, 0x94, 0x12, 0x77, 0x6e, 0xa4, 0x4d, 0x2f,
- 0x71, 0x16, 0x99, 0x1b, 0x67, 0x26, 0xc1, 0x57, 0x70, 0xe5, 0x3b, 0xf8, 0x5c, 0x3e, 0x8c, 0x24,
- 0x93, 0xb4, 0x94, 0x18, 0x0b, 0xee, 0x2e, 0x99, 0xf3, 0x9d, 0x9c, 0x33, 0x73, 0xe9, 0x05, 0x26,
- 0xa0, 0x42, 0x50, 0x26, 0x35, 0x22, 0xd1, 0x68, 0x51, 0x4c, 0x23, 0x50, 0x56, 0xc4, 0x60, 0xb5,
- 0x0c, 0x8d, 0xc8, 0xfc, 0x6a, 0x7c, 0x36, 0xa0, 0x33, 0x19, 0x02, 0x2f, 0x64, 0xec, 0x60, 0x09,
- 0xba, 0x2f, 0xbc, 0x00, 0x79, 0xa9, 0xe6, 0x99, 0xdf, 0xf3, 0x1a, 0xbc, 0x43, 0x8c, 0x63, 0x54,
- 0xb9, 0xb5, 0x9b, 0x1c, 0xdf, 0x3b, 0xa9, 0xc9, 0xeb, 0x21, 0x4a, 0xe9, 0x69, 0x4d, 0xaa, 0xc1,
- 0x60, 0xaa, 0x43, 0xc8, 0xb5, 0xd5, 0xec, 0xc4, 0x83, 0x2f, 0x42, 0x77, 0x6f, 0xdf, 0x12, 0xd4,
- 0xf6, 0xde, 0x99, 0x3c, 0xba, 0x22, 0x01, 0xbc, 0xa6, 0x60, 0x2c, 0xbb, 0xa4, 0x1b, 0x0a, 0xe7,
- 0xd0, 0x25, 0x7d, 0x32, 0xec, 0x8c, 0x8e, 0x79, 0x43, 0xb1, 0x32, 0x6b, 0xe6, 0xf3, 0x07, 0x9c,
- 0x43, 0x50, 0x30, 0xec, 0x8a, 0x6e, 0x96, 0xc9, 0xba, 0xff, 0xfb, 0xad, 0x61, 0x67, 0x74, 0x58,
- 0xc7, 0x97, 0x37, 0xc2, 0x5d, 0x80, 0xa0, 0x62, 0xd8, 0x98, 0x6e, 0x55, 0x61, 0xbb, 0xad, 0xa6,
- 0xdf, 0x2f, 0xea, 0x64, 0x3e, 0x0f, 0xca, 0x39, 0x58, 0x70, 0x83, 0x7d, 0xba, 0xf7, 0x73, 0x3b,
- 0x93, 0xa0, 0x32, 0x30, 0xfa, 0x24, 0x74, 0x7b, 0xf5, 0x88, 0x7d, 0x10, 0xda, 0x76, 0x0c, 0xbb,
- 0xe6, 0x6b, 0xdf, 0x91, 0xff, 0x72, 0x79, 0xbd, 0x9b, 0x3f, 0xf3, 0x2e, 0xde, 0xe0, 0xdf, 0x90,
- 0x9c, 0x91, 0xf1, 0x3b, 0xa1, 0x47, 0x12, 0xd7, 0x7b, 0x8d, 0x77, 0x56, 0x6d, 0x26, 0xb9, 0x6a,
- 0x42, 0x9e, 0xee, 0x22, 0x69, 0x5f, 0xd2, 0x59, 0xfe, 0x48, 0xc2, 0x19, 0x78, 0x52, 0x19, 0xab,
- 0xd3, 0x18, 0x94, 0x9d, 0x5a, 0x89, 0x4a, 0x2c, 0xbd, 0x3d, 0xb7, 0x32, 0x11, 0x28, 0x2f, 0xaa,
- 0xef, 0xfb, 0xac, 0x5d, 0x1c, 0x9f, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x16, 0x61, 0x3b, 0xc3,
- 0x1b, 0x03, 0x00, 0x00,
-}
diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/agent/trace/v1/trace_service.pb.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/agent/trace/v1/trace_service.pb.go
deleted file mode 100644
index 65ca648ea8..0000000000
--- a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/agent/trace/v1/trace_service.pb.go
+++ /dev/null
@@ -1,440 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: opencensus/proto/agent/trace/v1/trace_service.proto
-
-package v1 // import "github.com/census-instrumentation/opencensus-proto/gen-go/agent/trace/v1"
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import v1 "github.com/census-instrumentation/opencensus-proto/gen-go/agent/common/v1"
-import v12 "github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1"
-import v11 "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1"
-
-import (
- context "golang.org/x/net/context"
- grpc "google.golang.org/grpc"
-)
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type CurrentLibraryConfig struct {
- // This is required only in the first message on the stream or if the
- // previous sent CurrentLibraryConfig message has a different Node (e.g.
- // when the same RPC is used to configure multiple Applications).
- Node *v1.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
- // Current configuration.
- Config *v11.TraceConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *CurrentLibraryConfig) Reset() { *m = CurrentLibraryConfig{} }
-func (m *CurrentLibraryConfig) String() string { return proto.CompactTextString(m) }
-func (*CurrentLibraryConfig) ProtoMessage() {}
-func (*CurrentLibraryConfig) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_service_14d467877eaed17f, []int{0}
-}
-func (m *CurrentLibraryConfig) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_CurrentLibraryConfig.Unmarshal(m, b)
-}
-func (m *CurrentLibraryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_CurrentLibraryConfig.Marshal(b, m, deterministic)
-}
-func (dst *CurrentLibraryConfig) XXX_Merge(src proto.Message) {
- xxx_messageInfo_CurrentLibraryConfig.Merge(dst, src)
-}
-func (m *CurrentLibraryConfig) XXX_Size() int {
- return xxx_messageInfo_CurrentLibraryConfig.Size(m)
-}
-func (m *CurrentLibraryConfig) XXX_DiscardUnknown() {
- xxx_messageInfo_CurrentLibraryConfig.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_CurrentLibraryConfig proto.InternalMessageInfo
-
-func (m *CurrentLibraryConfig) GetNode() *v1.Node {
- if m != nil {
- return m.Node
- }
- return nil
-}
-
-func (m *CurrentLibraryConfig) GetConfig() *v11.TraceConfig {
- if m != nil {
- return m.Config
- }
- return nil
-}
-
-type UpdatedLibraryConfig struct {
- // This field is ignored when the RPC is used to configure only one Application.
- // This is required only in the first message on the stream or if the
- // previous sent UpdatedLibraryConfig message has a different Node.
- Node *v1.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
- // Requested updated configuration.
- Config *v11.TraceConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *UpdatedLibraryConfig) Reset() { *m = UpdatedLibraryConfig{} }
-func (m *UpdatedLibraryConfig) String() string { return proto.CompactTextString(m) }
-func (*UpdatedLibraryConfig) ProtoMessage() {}
-func (*UpdatedLibraryConfig) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_service_14d467877eaed17f, []int{1}
-}
-func (m *UpdatedLibraryConfig) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_UpdatedLibraryConfig.Unmarshal(m, b)
-}
-func (m *UpdatedLibraryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_UpdatedLibraryConfig.Marshal(b, m, deterministic)
-}
-func (dst *UpdatedLibraryConfig) XXX_Merge(src proto.Message) {
- xxx_messageInfo_UpdatedLibraryConfig.Merge(dst, src)
-}
-func (m *UpdatedLibraryConfig) XXX_Size() int {
- return xxx_messageInfo_UpdatedLibraryConfig.Size(m)
-}
-func (m *UpdatedLibraryConfig) XXX_DiscardUnknown() {
- xxx_messageInfo_UpdatedLibraryConfig.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_UpdatedLibraryConfig proto.InternalMessageInfo
-
-func (m *UpdatedLibraryConfig) GetNode() *v1.Node {
- if m != nil {
- return m.Node
- }
- return nil
-}
-
-func (m *UpdatedLibraryConfig) GetConfig() *v11.TraceConfig {
- if m != nil {
- return m.Config
- }
- return nil
-}
-
-type ExportTraceServiceRequest struct {
- // This is required only in the first message on the stream or if the
- // previous sent ExportTraceServiceRequest message has a different Node (e.g.
- // when the same RPC is used to send Spans from multiple Applications).
- Node *v1.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
- // A list of Spans that belong to the last received Node.
- Spans []*v11.Span `protobuf:"bytes,2,rep,name=spans,proto3" json:"spans,omitempty"`
- // The resource for the spans in this message that do not have an explicit
- // resource set.
- // If unset, the most recently set resource in the RPC stream applies. It is
- // valid to never be set within a stream, e.g. when no resource info is known.
- Resource *v12.Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *ExportTraceServiceRequest) Reset() { *m = ExportTraceServiceRequest{} }
-func (m *ExportTraceServiceRequest) String() string { return proto.CompactTextString(m) }
-func (*ExportTraceServiceRequest) ProtoMessage() {}
-func (*ExportTraceServiceRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_service_14d467877eaed17f, []int{2}
-}
-func (m *ExportTraceServiceRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ExportTraceServiceRequest.Unmarshal(m, b)
-}
-func (m *ExportTraceServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ExportTraceServiceRequest.Marshal(b, m, deterministic)
-}
-func (dst *ExportTraceServiceRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ExportTraceServiceRequest.Merge(dst, src)
-}
-func (m *ExportTraceServiceRequest) XXX_Size() int {
- return xxx_messageInfo_ExportTraceServiceRequest.Size(m)
-}
-func (m *ExportTraceServiceRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_ExportTraceServiceRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ExportTraceServiceRequest proto.InternalMessageInfo
-
-func (m *ExportTraceServiceRequest) GetNode() *v1.Node {
- if m != nil {
- return m.Node
- }
- return nil
-}
-
-func (m *ExportTraceServiceRequest) GetSpans() []*v11.Span {
- if m != nil {
- return m.Spans
- }
- return nil
-}
-
-func (m *ExportTraceServiceRequest) GetResource() *v12.Resource {
- if m != nil {
- return m.Resource
- }
- return nil
-}
-
-type ExportTraceServiceResponse struct {
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *ExportTraceServiceResponse) Reset() { *m = ExportTraceServiceResponse{} }
-func (m *ExportTraceServiceResponse) String() string { return proto.CompactTextString(m) }
-func (*ExportTraceServiceResponse) ProtoMessage() {}
-func (*ExportTraceServiceResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_service_14d467877eaed17f, []int{3}
-}
-func (m *ExportTraceServiceResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ExportTraceServiceResponse.Unmarshal(m, b)
-}
-func (m *ExportTraceServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ExportTraceServiceResponse.Marshal(b, m, deterministic)
-}
-func (dst *ExportTraceServiceResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ExportTraceServiceResponse.Merge(dst, src)
-}
-func (m *ExportTraceServiceResponse) XXX_Size() int {
- return xxx_messageInfo_ExportTraceServiceResponse.Size(m)
-}
-func (m *ExportTraceServiceResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_ExportTraceServiceResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ExportTraceServiceResponse proto.InternalMessageInfo
-
-func init() {
- proto.RegisterType((*CurrentLibraryConfig)(nil), "opencensus.proto.agent.trace.v1.CurrentLibraryConfig")
- proto.RegisterType((*UpdatedLibraryConfig)(nil), "opencensus.proto.agent.trace.v1.UpdatedLibraryConfig")
- proto.RegisterType((*ExportTraceServiceRequest)(nil), "opencensus.proto.agent.trace.v1.ExportTraceServiceRequest")
- proto.RegisterType((*ExportTraceServiceResponse)(nil), "opencensus.proto.agent.trace.v1.ExportTraceServiceResponse")
-}
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ context.Context
-var _ grpc.ClientConn
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion4
-
-// TraceServiceClient is the client API for TraceService service.
-//
-// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
-type TraceServiceClient interface {
- // After initialization, this RPC must be kept alive for the entire life of
- // the application. The agent pushes configs down to applications via a
- // stream.
- Config(ctx context.Context, opts ...grpc.CallOption) (TraceService_ConfigClient, error)
- // For performance reasons, it is recommended to keep this RPC
- // alive for the entire life of the application.
- Export(ctx context.Context, opts ...grpc.CallOption) (TraceService_ExportClient, error)
-}
-
-type traceServiceClient struct {
- cc *grpc.ClientConn
-}
-
-func NewTraceServiceClient(cc *grpc.ClientConn) TraceServiceClient {
- return &traceServiceClient{cc}
-}
-
-func (c *traceServiceClient) Config(ctx context.Context, opts ...grpc.CallOption) (TraceService_ConfigClient, error) {
- stream, err := c.cc.NewStream(ctx, &_TraceService_serviceDesc.Streams[0], "/opencensus.proto.agent.trace.v1.TraceService/Config", opts...)
- if err != nil {
- return nil, err
- }
- x := &traceServiceConfigClient{stream}
- return x, nil
-}
-
-type TraceService_ConfigClient interface {
- Send(*CurrentLibraryConfig) error
- Recv() (*UpdatedLibraryConfig, error)
- grpc.ClientStream
-}
-
-type traceServiceConfigClient struct {
- grpc.ClientStream
-}
-
-func (x *traceServiceConfigClient) Send(m *CurrentLibraryConfig) error {
- return x.ClientStream.SendMsg(m)
-}
-
-func (x *traceServiceConfigClient) Recv() (*UpdatedLibraryConfig, error) {
- m := new(UpdatedLibraryConfig)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func (c *traceServiceClient) Export(ctx context.Context, opts ...grpc.CallOption) (TraceService_ExportClient, error) {
- stream, err := c.cc.NewStream(ctx, &_TraceService_serviceDesc.Streams[1], "/opencensus.proto.agent.trace.v1.TraceService/Export", opts...)
- if err != nil {
- return nil, err
- }
- x := &traceServiceExportClient{stream}
- return x, nil
-}
-
-type TraceService_ExportClient interface {
- Send(*ExportTraceServiceRequest) error
- Recv() (*ExportTraceServiceResponse, error)
- grpc.ClientStream
-}
-
-type traceServiceExportClient struct {
- grpc.ClientStream
-}
-
-func (x *traceServiceExportClient) Send(m *ExportTraceServiceRequest) error {
- return x.ClientStream.SendMsg(m)
-}
-
-func (x *traceServiceExportClient) Recv() (*ExportTraceServiceResponse, error) {
- m := new(ExportTraceServiceResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-// TraceServiceServer is the server API for TraceService service.
-type TraceServiceServer interface {
- // After initialization, this RPC must be kept alive for the entire life of
- // the application. The agent pushes configs down to applications via a
- // stream.
- Config(TraceService_ConfigServer) error
- // For performance reasons, it is recommended to keep this RPC
- // alive for the entire life of the application.
- Export(TraceService_ExportServer) error
-}
-
-func RegisterTraceServiceServer(s *grpc.Server, srv TraceServiceServer) {
- s.RegisterService(&_TraceService_serviceDesc, srv)
-}
-
-func _TraceService_Config_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(TraceServiceServer).Config(&traceServiceConfigServer{stream})
-}
-
-type TraceService_ConfigServer interface {
- Send(*UpdatedLibraryConfig) error
- Recv() (*CurrentLibraryConfig, error)
- grpc.ServerStream
-}
-
-type traceServiceConfigServer struct {
- grpc.ServerStream
-}
-
-func (x *traceServiceConfigServer) Send(m *UpdatedLibraryConfig) error {
- return x.ServerStream.SendMsg(m)
-}
-
-func (x *traceServiceConfigServer) Recv() (*CurrentLibraryConfig, error) {
- m := new(CurrentLibraryConfig)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-func _TraceService_Export_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(TraceServiceServer).Export(&traceServiceExportServer{stream})
-}
-
-type TraceService_ExportServer interface {
- Send(*ExportTraceServiceResponse) error
- Recv() (*ExportTraceServiceRequest, error)
- grpc.ServerStream
-}
-
-type traceServiceExportServer struct {
- grpc.ServerStream
-}
-
-func (x *traceServiceExportServer) Send(m *ExportTraceServiceResponse) error {
- return x.ServerStream.SendMsg(m)
-}
-
-func (x *traceServiceExportServer) Recv() (*ExportTraceServiceRequest, error) {
- m := new(ExportTraceServiceRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
-
-var _TraceService_serviceDesc = grpc.ServiceDesc{
- ServiceName: "opencensus.proto.agent.trace.v1.TraceService",
- HandlerType: (*TraceServiceServer)(nil),
- Methods: []grpc.MethodDesc{},
- Streams: []grpc.StreamDesc{
- {
- StreamName: "Config",
- Handler: _TraceService_Config_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- {
- StreamName: "Export",
- Handler: _TraceService_Export_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- },
- Metadata: "opencensus/proto/agent/trace/v1/trace_service.proto",
-}
-
-func init() {
- proto.RegisterFile("opencensus/proto/agent/trace/v1/trace_service.proto", fileDescriptor_trace_service_14d467877eaed17f)
-}
-
-var fileDescriptor_trace_service_14d467877eaed17f = []byte{
- // 423 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xbf, 0x6b, 0xdb, 0x40,
- 0x14, 0xee, 0xd9, 0xad, 0x28, 0xe7, 0x2e, 0x15, 0x1d, 0x54, 0x51, 0xb0, 0x11, 0xb4, 0x18, 0x5a,
- 0x9d, 0x2a, 0x1b, 0x2f, 0x2e, 0x74, 0xb0, 0x29, 0x74, 0x28, 0xc5, 0xc8, 0xed, 0x92, 0xc5, 0xc8,
- 0xd2, 0x8b, 0xa2, 0xc1, 0x77, 0xca, 0xdd, 0x49, 0x24, 0x90, 0x2d, 0x43, 0xf6, 0x0c, 0xf9, 0xc3,
- 0xf2, 0x17, 0x05, 0xdd, 0xc9, 0x3f, 0x12, 0x5b, 0x11, 0x24, 0x4b, 0xb6, 0x87, 0xde, 0xf7, 0x7d,
- 0xf7, 0xbd, 0x7b, 0xdf, 0x09, 0x0f, 0x59, 0x06, 0x34, 0x02, 0x2a, 0x72, 0xe1, 0x65, 0x9c, 0x49,
- 0xe6, 0x85, 0x09, 0x50, 0xe9, 0x49, 0x1e, 0x46, 0xe0, 0x15, 0xbe, 0x2e, 0x16, 0x02, 0x78, 0x91,
- 0x46, 0x40, 0x14, 0xc4, 0xec, 0x6e, 0x49, 0xfa, 0x0b, 0x51, 0x24, 0xa2, 0xb0, 0xa4, 0xf0, 0x6d,
- 0xb7, 0x46, 0x35, 0x62, 0xab, 0x15, 0xa3, 0xa5, 0xac, 0xae, 0x34, 0xdb, 0xfe, 0xba, 0x07, 0xe7,
- 0x20, 0x58, 0xce, 0xb5, 0x83, 0x75, 0x5d, 0x81, 0x3f, 0xef, 0x81, 0xef, 0x7b, 0xad, 0x60, 0xdf,
- 0x1a, 0x60, 0x8b, 0x88, 0xd1, 0xe3, 0x34, 0xd1, 0x68, 0xe7, 0x1a, 0xe1, 0x0f, 0xd3, 0x9c, 0x73,
- 0xa0, 0xf2, 0x4f, 0xba, 0xe4, 0x21, 0x3f, 0x9f, 0xaa, 0xb6, 0x39, 0xc6, 0xaf, 0x29, 0x8b, 0xc1,
- 0x42, 0x3d, 0xd4, 0xef, 0x0c, 0xbe, 0x90, 0x9a, 0xc9, 0xab, 0x71, 0x0a, 0x9f, 0xfc, 0x65, 0x31,
- 0x04, 0x8a, 0x63, 0xfe, 0xc4, 0x86, 0x3e, 0xc4, 0x6a, 0xd5, 0xb1, 0xd7, 0x37, 0x46, 0xfe, 0x95,
- 0x85, 0x3e, 0x33, 0xa8, 0x58, 0xca, 0xd4, 0xff, 0x2c, 0x0e, 0x25, 0xc4, 0x2f, 0xc7, 0xd4, 0x2d,
- 0xc2, 0x1f, 0x7f, 0x9d, 0x65, 0x8c, 0x4b, 0xd5, 0x9d, 0xeb, 0x60, 0x04, 0x70, 0x9a, 0x83, 0x90,
- 0xcf, 0x72, 0x36, 0xc2, 0x6f, 0x44, 0x16, 0x52, 0x61, 0xb5, 0x7a, 0xed, 0x7e, 0x67, 0xd0, 0x7d,
- 0xc4, 0xd8, 0x3c, 0x0b, 0x69, 0xa0, 0xd1, 0xe6, 0x04, 0xbf, 0x5d, 0x27, 0xc4, 0x6a, 0xd7, 0x1d,
- 0xbb, 0xc9, 0x50, 0xe1, 0x93, 0xa0, 0xaa, 0x83, 0x0d, 0xcf, 0xf9, 0x84, 0xed, 0x43, 0x33, 0x89,
- 0x8c, 0x51, 0x01, 0x83, 0x9b, 0x16, 0x7e, 0xb7, 0xdb, 0x30, 0x2f, 0xb0, 0x51, 0x6d, 0x62, 0x44,
- 0x1a, 0x9e, 0x02, 0x39, 0x94, 0x2a, 0xbb, 0x99, 0x76, 0x68, 0xef, 0xce, 0xab, 0x3e, 0xfa, 0x8e,
- 0xcc, 0x2b, 0x84, 0x0d, 0xed, 0xd6, 0x1c, 0x37, 0xea, 0xd4, 0xae, 0xca, 0xfe, 0xf1, 0x24, 0xae,
- 0xbe, 0x12, 0xed, 0x64, 0x72, 0x89, 0xb0, 0x93, 0xb2, 0x26, 0x9d, 0xc9, 0xfb, 0x5d, 0x89, 0x59,
- 0x89, 0x98, 0xa1, 0xa3, 0xdf, 0x49, 0x2a, 0x4f, 0xf2, 0x65, 0x19, 0x05, 0x4f, 0x93, 0xdd, 0x94,
- 0x0a, 0xc9, 0xf3, 0x15, 0x50, 0x19, 0xca, 0x94, 0x51, 0x6f, 0xab, 0xeb, 0xea, 0x17, 0x9c, 0x00,
- 0x75, 0x93, 0x87, 0x7f, 0xa8, 0xa5, 0xa1, 0x9a, 0xc3, 0xbb, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcf,
- 0x9c, 0x9b, 0xf7, 0xcb, 0x04, 0x00, 0x00,
-}
diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/agent/trace/v1/trace_service.pb.gw.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/agent/trace/v1/trace_service.pb.gw.go
deleted file mode 100644
index 9081740a03..0000000000
--- a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/agent/trace/v1/trace_service.pb.gw.go
+++ /dev/null
@@ -1,159 +0,0 @@
-// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
-// source: opencensus/proto/agent/trace/v1/trace_service.proto
-
-/*
-Package v1 is a reverse proxy.
-
-It translates gRPC into RESTful JSON APIs.
-*/
-package v1
-
-import (
- "io"
- "net/http"
-
- "github.com/golang/protobuf/proto"
- "github.com/grpc-ecosystem/grpc-gateway/runtime"
- "github.com/grpc-ecosystem/grpc-gateway/utilities"
- "golang.org/x/net/context"
- "google.golang.org/grpc"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/grpclog"
- "google.golang.org/grpc/status"
-)
-
-var _ codes.Code
-var _ io.Reader
-var _ status.Status
-var _ = runtime.String
-var _ = utilities.NewDoubleArray
-
-func request_TraceService_Export_0(ctx context.Context, marshaler runtime.Marshaler, client TraceServiceClient, req *http.Request, pathParams map[string]string) (TraceService_ExportClient, runtime.ServerMetadata, error) {
- var metadata runtime.ServerMetadata
- stream, err := client.Export(ctx)
- if err != nil {
- grpclog.Infof("Failed to start streaming: %v", err)
- return nil, metadata, err
- }
- dec := marshaler.NewDecoder(req.Body)
- handleSend := func() error {
- var protoReq ExportTraceServiceRequest
- err := dec.Decode(&protoReq)
- if err == io.EOF {
- return err
- }
- if err != nil {
- grpclog.Infof("Failed to decode request: %v", err)
- return err
- }
- if err := stream.Send(&protoReq); err != nil {
- grpclog.Infof("Failed to send request: %v", err)
- return err
- }
- return nil
- }
- if err := handleSend(); err != nil {
- if cerr := stream.CloseSend(); cerr != nil {
- grpclog.Infof("Failed to terminate client stream: %v", cerr)
- }
- if err == io.EOF {
- return stream, metadata, nil
- }
- return nil, metadata, err
- }
- go func() {
- for {
- if err := handleSend(); err != nil {
- break
- }
- }
- if err := stream.CloseSend(); err != nil {
- grpclog.Infof("Failed to terminate client stream: %v", err)
- }
- }()
- header, err := stream.Header()
- if err != nil {
- grpclog.Infof("Failed to get header from client: %v", err)
- return nil, metadata, err
- }
- metadata.HeaderMD = header
- return stream, metadata, nil
-}
-
-// RegisterTraceServiceHandlerFromEndpoint is same as RegisterTraceServiceHandler but
-// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
-func RegisterTraceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
- conn, err := grpc.Dial(endpoint, opts...)
- if err != nil {
- return err
- }
- defer func() {
- if err != nil {
- if cerr := conn.Close(); cerr != nil {
- grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
- }
- return
- }
- go func() {
- <-ctx.Done()
- if cerr := conn.Close(); cerr != nil {
- grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
- }
- }()
- }()
-
- return RegisterTraceServiceHandler(ctx, mux, conn)
-}
-
-// RegisterTraceServiceHandler registers the http handlers for service TraceService to "mux".
-// The handlers forward requests to the grpc endpoint over "conn".
-func RegisterTraceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
- return RegisterTraceServiceHandlerClient(ctx, mux, NewTraceServiceClient(conn))
-}
-
-// RegisterTraceServiceHandlerClient registers the http handlers for service TraceService
-// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TraceServiceClient".
-// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TraceServiceClient"
-// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
-// "TraceServiceClient" to call the correct interceptors.
-func RegisterTraceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TraceServiceClient) error {
-
- mux.Handle("POST", pattern_TraceService_Export_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- if cn, ok := w.(http.CloseNotifier); ok {
- go func(done <-chan struct{}, closed <-chan bool) {
- select {
- case <-done:
- case <-closed:
- cancel()
- }
- }(ctx.Done(), cn.CloseNotify())
- }
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req)
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_TraceService_Export_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_TraceService_Export_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
-
- })
-
- return nil
-}
-
-var (
- pattern_TraceService_Export_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "trace"}, ""))
-)
-
-var (
- forward_TraceService_Export_0 = runtime.ForwardResponseStream
-)
diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1/metrics.pb.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1/metrics.pb.go
deleted file mode 100644
index c8607e84c6..0000000000
--- a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1/metrics.pb.go
+++ /dev/null
@@ -1,1352 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: opencensus/proto/metrics/v1/metrics.proto
-
-package v1 // import "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1"
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import v1 "github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1"
-import timestamp "github.com/golang/protobuf/ptypes/timestamp"
-import wrappers "github.com/golang/protobuf/ptypes/wrappers"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-// The kind of metric. It describes how the data is reported.
-//
-// A gauge is an instantaneous measurement of a value.
-//
-// A cumulative measurement is a value accumulated over a time interval. In
-// a time series, cumulative measurements should have the same start time,
-// increasing values and increasing end times, until an event resets the
-// cumulative value to zero and sets a new start time for the following
-// points.
-type MetricDescriptor_Type int32
-
-const (
- // Do not use this default value.
- MetricDescriptor_UNSPECIFIED MetricDescriptor_Type = 0
- // Integer gauge. The value can go both up and down.
- MetricDescriptor_GAUGE_INT64 MetricDescriptor_Type = 1
- // Floating point gauge. The value can go both up and down.
- MetricDescriptor_GAUGE_DOUBLE MetricDescriptor_Type = 2
- // Distribution gauge measurement. The count and sum can go both up and
- // down. Recorded values are always >= 0.
- // Used in scenarios like a snapshot of time the current items in a queue
- // have spent there.
- MetricDescriptor_GAUGE_DISTRIBUTION MetricDescriptor_Type = 3
- // Integer cumulative measurement. The value cannot decrease, if resets
- // then the start_time should also be reset.
- MetricDescriptor_CUMULATIVE_INT64 MetricDescriptor_Type = 4
- // Floating point cumulative measurement. The value cannot decrease, if
- // resets then the start_time should also be reset. Recorded values are
- // always >= 0.
- MetricDescriptor_CUMULATIVE_DOUBLE MetricDescriptor_Type = 5
- // Distribution cumulative measurement. The count and sum cannot decrease,
- // if resets then the start_time should also be reset.
- MetricDescriptor_CUMULATIVE_DISTRIBUTION MetricDescriptor_Type = 6
- // Some frameworks implemented Histograms as a summary of observations
- // (usually things like request durations and response sizes). While it
- // also provides a total count of observations and a sum of all observed
- // values, it calculates configurable percentiles over a sliding time
- // window. This is not recommended, since it cannot be aggregated.
- MetricDescriptor_SUMMARY MetricDescriptor_Type = 7
-)
-
-var MetricDescriptor_Type_name = map[int32]string{
- 0: "UNSPECIFIED",
- 1: "GAUGE_INT64",
- 2: "GAUGE_DOUBLE",
- 3: "GAUGE_DISTRIBUTION",
- 4: "CUMULATIVE_INT64",
- 5: "CUMULATIVE_DOUBLE",
- 6: "CUMULATIVE_DISTRIBUTION",
- 7: "SUMMARY",
-}
-var MetricDescriptor_Type_value = map[string]int32{
- "UNSPECIFIED": 0,
- "GAUGE_INT64": 1,
- "GAUGE_DOUBLE": 2,
- "GAUGE_DISTRIBUTION": 3,
- "CUMULATIVE_INT64": 4,
- "CUMULATIVE_DOUBLE": 5,
- "CUMULATIVE_DISTRIBUTION": 6,
- "SUMMARY": 7,
-}
-
-func (x MetricDescriptor_Type) String() string {
- return proto.EnumName(MetricDescriptor_Type_name, int32(x))
-}
-func (MetricDescriptor_Type) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_metrics_d25fbad7c11497fc, []int{1, 0}
-}
-
-// Defines a Metric which has one or more timeseries.
-type Metric struct {
- // The descriptor of the Metric. This is an optimization for network wire
- // size, from data-model perspective a Metric contains always a
- // MetricDescriptor.
- //
- // Types that are valid to be assigned to Descriptor_:
- // *Metric_MetricDescriptor
- // *Metric_Name
- Descriptor_ isMetric_Descriptor_ `protobuf_oneof:"descriptor"`
- // One or more timeseries for a single metric, where each timeseries has
- // one or more points.
- Timeseries []*TimeSeries `protobuf:"bytes,3,rep,name=timeseries,proto3" json:"timeseries,omitempty"`
- // The resource for the metric. If unset, it may be set to a default value
- // provided for a sequence of messages in an RPC stream.
- Resource *v1.Resource `protobuf:"bytes,4,opt,name=resource,proto3" json:"resource,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Metric) Reset() { *m = Metric{} }
-func (m *Metric) String() string { return proto.CompactTextString(m) }
-func (*Metric) ProtoMessage() {}
-func (*Metric) Descriptor() ([]byte, []int) {
- return fileDescriptor_metrics_d25fbad7c11497fc, []int{0}
-}
-func (m *Metric) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Metric.Unmarshal(m, b)
-}
-func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Metric.Marshal(b, m, deterministic)
-}
-func (dst *Metric) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Metric.Merge(dst, src)
-}
-func (m *Metric) XXX_Size() int {
- return xxx_messageInfo_Metric.Size(m)
-}
-func (m *Metric) XXX_DiscardUnknown() {
- xxx_messageInfo_Metric.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Metric proto.InternalMessageInfo
-
-type isMetric_Descriptor_ interface {
- isMetric_Descriptor_()
-}
-
-type Metric_MetricDescriptor struct {
- MetricDescriptor *MetricDescriptor `protobuf:"bytes,1,opt,name=metric_descriptor,json=metricDescriptor,proto3,oneof"`
-}
-
-type Metric_Name struct {
- Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"`
-}
-
-func (*Metric_MetricDescriptor) isMetric_Descriptor_() {}
-
-func (*Metric_Name) isMetric_Descriptor_() {}
-
-func (m *Metric) GetDescriptor_() isMetric_Descriptor_ {
- if m != nil {
- return m.Descriptor_
- }
- return nil
-}
-
-func (m *Metric) GetMetricDescriptor() *MetricDescriptor {
- if x, ok := m.GetDescriptor_().(*Metric_MetricDescriptor); ok {
- return x.MetricDescriptor
- }
- return nil
-}
-
-func (m *Metric) GetName() string {
- if x, ok := m.GetDescriptor_().(*Metric_Name); ok {
- return x.Name
- }
- return ""
-}
-
-func (m *Metric) GetTimeseries() []*TimeSeries {
- if m != nil {
- return m.Timeseries
- }
- return nil
-}
-
-func (m *Metric) GetResource() *v1.Resource {
- if m != nil {
- return m.Resource
- }
- return nil
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*Metric) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _Metric_OneofMarshaler, _Metric_OneofUnmarshaler, _Metric_OneofSizer, []interface{}{
- (*Metric_MetricDescriptor)(nil),
- (*Metric_Name)(nil),
- }
-}
-
-func _Metric_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*Metric)
- // descriptor
- switch x := m.Descriptor_.(type) {
- case *Metric_MetricDescriptor:
- b.EncodeVarint(1<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.MetricDescriptor); err != nil {
- return err
- }
- case *Metric_Name:
- b.EncodeVarint(2<<3 | proto.WireBytes)
- b.EncodeStringBytes(x.Name)
- case nil:
- default:
- return fmt.Errorf("Metric.Descriptor_ has unexpected type %T", x)
- }
- return nil
-}
-
-func _Metric_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*Metric)
- switch tag {
- case 1: // descriptor.metric_descriptor
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(MetricDescriptor)
- err := b.DecodeMessage(msg)
- m.Descriptor_ = &Metric_MetricDescriptor{msg}
- return true, err
- case 2: // descriptor.name
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeStringBytes()
- m.Descriptor_ = &Metric_Name{x}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _Metric_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*Metric)
- // descriptor
- switch x := m.Descriptor_.(type) {
- case *Metric_MetricDescriptor:
- s := proto.Size(x.MetricDescriptor)
- n += 1 // tag and wire
- n += proto.SizeVarint(uint64(s))
- n += s
- case *Metric_Name:
- n += 1 // tag and wire
- n += proto.SizeVarint(uint64(len(x.Name)))
- n += len(x.Name)
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-// Defines a metric type and its schema.
-type MetricDescriptor struct {
- // The metric type, including its DNS name prefix. It must be unique.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // A detailed description of the metric, which can be used in documentation.
- Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
- // The unit in which the metric value is reported. Follows the format
- // described by http://unitsofmeasure.org/ucum.html.
- Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"`
- Type MetricDescriptor_Type `protobuf:"varint,4,opt,name=type,proto3,enum=opencensus.proto.metrics.v1.MetricDescriptor_Type" json:"type,omitempty"`
- // The label keys associated with the metric descriptor.
- LabelKeys []*LabelKey `protobuf:"bytes,5,rep,name=label_keys,json=labelKeys,proto3" json:"label_keys,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *MetricDescriptor) Reset() { *m = MetricDescriptor{} }
-func (m *MetricDescriptor) String() string { return proto.CompactTextString(m) }
-func (*MetricDescriptor) ProtoMessage() {}
-func (*MetricDescriptor) Descriptor() ([]byte, []int) {
- return fileDescriptor_metrics_d25fbad7c11497fc, []int{1}
-}
-func (m *MetricDescriptor) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_MetricDescriptor.Unmarshal(m, b)
-}
-func (m *MetricDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_MetricDescriptor.Marshal(b, m, deterministic)
-}
-func (dst *MetricDescriptor) XXX_Merge(src proto.Message) {
- xxx_messageInfo_MetricDescriptor.Merge(dst, src)
-}
-func (m *MetricDescriptor) XXX_Size() int {
- return xxx_messageInfo_MetricDescriptor.Size(m)
-}
-func (m *MetricDescriptor) XXX_DiscardUnknown() {
- xxx_messageInfo_MetricDescriptor.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_MetricDescriptor proto.InternalMessageInfo
-
-func (m *MetricDescriptor) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *MetricDescriptor) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-func (m *MetricDescriptor) GetUnit() string {
- if m != nil {
- return m.Unit
- }
- return ""
-}
-
-func (m *MetricDescriptor) GetType() MetricDescriptor_Type {
- if m != nil {
- return m.Type
- }
- return MetricDescriptor_UNSPECIFIED
-}
-
-func (m *MetricDescriptor) GetLabelKeys() []*LabelKey {
- if m != nil {
- return m.LabelKeys
- }
- return nil
-}
-
-// Defines a label key associated with a metric descriptor.
-type LabelKey struct {
- // The key for the label.
- Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
- // A human-readable description of what this label key represents.
- Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *LabelKey) Reset() { *m = LabelKey{} }
-func (m *LabelKey) String() string { return proto.CompactTextString(m) }
-func (*LabelKey) ProtoMessage() {}
-func (*LabelKey) Descriptor() ([]byte, []int) {
- return fileDescriptor_metrics_d25fbad7c11497fc, []int{2}
-}
-func (m *LabelKey) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_LabelKey.Unmarshal(m, b)
-}
-func (m *LabelKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_LabelKey.Marshal(b, m, deterministic)
-}
-func (dst *LabelKey) XXX_Merge(src proto.Message) {
- xxx_messageInfo_LabelKey.Merge(dst, src)
-}
-func (m *LabelKey) XXX_Size() int {
- return xxx_messageInfo_LabelKey.Size(m)
-}
-func (m *LabelKey) XXX_DiscardUnknown() {
- xxx_messageInfo_LabelKey.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_LabelKey proto.InternalMessageInfo
-
-func (m *LabelKey) GetKey() string {
- if m != nil {
- return m.Key
- }
- return ""
-}
-
-func (m *LabelKey) GetDescription() string {
- if m != nil {
- return m.Description
- }
- return ""
-}
-
-// A collection of data points that describes the time-varying values
-// of a metric.
-type TimeSeries struct {
- // Must be present for cumulative metrics. The time when the cumulative value
- // was reset to zero. Exclusive. The cumulative value is over the time interval
- // (start_timestamp, timestamp]. If not specified, the backend can use the
- // previous recorded value.
- StartTimestamp *timestamp.Timestamp `protobuf:"bytes,1,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"`
- // The set of label values that uniquely identify this timeseries. Applies to
- // all points. The order of label values must match that of label keys in the
- // metric descriptor.
- LabelValues []*LabelValue `protobuf:"bytes,2,rep,name=label_values,json=labelValues,proto3" json:"label_values,omitempty"`
- // The data points of this timeseries. Point.value type MUST match the
- // MetricDescriptor.type.
- Points []*Point `protobuf:"bytes,3,rep,name=points,proto3" json:"points,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *TimeSeries) Reset() { *m = TimeSeries{} }
-func (m *TimeSeries) String() string { return proto.CompactTextString(m) }
-func (*TimeSeries) ProtoMessage() {}
-func (*TimeSeries) Descriptor() ([]byte, []int) {
- return fileDescriptor_metrics_d25fbad7c11497fc, []int{3}
-}
-func (m *TimeSeries) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_TimeSeries.Unmarshal(m, b)
-}
-func (m *TimeSeries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_TimeSeries.Marshal(b, m, deterministic)
-}
-func (dst *TimeSeries) XXX_Merge(src proto.Message) {
- xxx_messageInfo_TimeSeries.Merge(dst, src)
-}
-func (m *TimeSeries) XXX_Size() int {
- return xxx_messageInfo_TimeSeries.Size(m)
-}
-func (m *TimeSeries) XXX_DiscardUnknown() {
- xxx_messageInfo_TimeSeries.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_TimeSeries proto.InternalMessageInfo
-
-func (m *TimeSeries) GetStartTimestamp() *timestamp.Timestamp {
- if m != nil {
- return m.StartTimestamp
- }
- return nil
-}
-
-func (m *TimeSeries) GetLabelValues() []*LabelValue {
- if m != nil {
- return m.LabelValues
- }
- return nil
-}
-
-func (m *TimeSeries) GetPoints() []*Point {
- if m != nil {
- return m.Points
- }
- return nil
-}
-
-type LabelValue struct {
- // The value for the label.
- Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
- // If false the value field is ignored and considered not set.
- // This is used to differentiate a missing label from an empty string.
- HasValue bool `protobuf:"varint,2,opt,name=has_value,json=hasValue,proto3" json:"has_value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *LabelValue) Reset() { *m = LabelValue{} }
-func (m *LabelValue) String() string { return proto.CompactTextString(m) }
-func (*LabelValue) ProtoMessage() {}
-func (*LabelValue) Descriptor() ([]byte, []int) {
- return fileDescriptor_metrics_d25fbad7c11497fc, []int{4}
-}
-func (m *LabelValue) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_LabelValue.Unmarshal(m, b)
-}
-func (m *LabelValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_LabelValue.Marshal(b, m, deterministic)
-}
-func (dst *LabelValue) XXX_Merge(src proto.Message) {
- xxx_messageInfo_LabelValue.Merge(dst, src)
-}
-func (m *LabelValue) XXX_Size() int {
- return xxx_messageInfo_LabelValue.Size(m)
-}
-func (m *LabelValue) XXX_DiscardUnknown() {
- xxx_messageInfo_LabelValue.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_LabelValue proto.InternalMessageInfo
-
-func (m *LabelValue) GetValue() string {
- if m != nil {
- return m.Value
- }
- return ""
-}
-
-func (m *LabelValue) GetHasValue() bool {
- if m != nil {
- return m.HasValue
- }
- return false
-}
-
-// A timestamped measurement.
-type Point struct {
- // The moment when this point was recorded. Inclusive.
- // If not specified, the timestamp will be decided by the backend.
- Timestamp *timestamp.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
- // The actual point value.
- //
- // Types that are valid to be assigned to Value:
- // *Point_Int64Value
- // *Point_DoubleValue
- // *Point_DistributionValue
- // *Point_SummaryValue
- Value isPoint_Value `protobuf_oneof:"value"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Point) Reset() { *m = Point{} }
-func (m *Point) String() string { return proto.CompactTextString(m) }
-func (*Point) ProtoMessage() {}
-func (*Point) Descriptor() ([]byte, []int) {
- return fileDescriptor_metrics_d25fbad7c11497fc, []int{5}
-}
-func (m *Point) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Point.Unmarshal(m, b)
-}
-func (m *Point) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Point.Marshal(b, m, deterministic)
-}
-func (dst *Point) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Point.Merge(dst, src)
-}
-func (m *Point) XXX_Size() int {
- return xxx_messageInfo_Point.Size(m)
-}
-func (m *Point) XXX_DiscardUnknown() {
- xxx_messageInfo_Point.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Point proto.InternalMessageInfo
-
-func (m *Point) GetTimestamp() *timestamp.Timestamp {
- if m != nil {
- return m.Timestamp
- }
- return nil
-}
-
-type isPoint_Value interface {
- isPoint_Value()
-}
-
-type Point_Int64Value struct {
- Int64Value int64 `protobuf:"varint,2,opt,name=int64_value,json=int64Value,proto3,oneof"`
-}
-
-type Point_DoubleValue struct {
- DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"`
-}
-
-type Point_DistributionValue struct {
- DistributionValue *DistributionValue `protobuf:"bytes,4,opt,name=distribution_value,json=distributionValue,proto3,oneof"`
-}
-
-type Point_SummaryValue struct {
- SummaryValue *SummaryValue `protobuf:"bytes,5,opt,name=summary_value,json=summaryValue,proto3,oneof"`
-}
-
-func (*Point_Int64Value) isPoint_Value() {}
-
-func (*Point_DoubleValue) isPoint_Value() {}
-
-func (*Point_DistributionValue) isPoint_Value() {}
-
-func (*Point_SummaryValue) isPoint_Value() {}
-
-func (m *Point) GetValue() isPoint_Value {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-func (m *Point) GetInt64Value() int64 {
- if x, ok := m.GetValue().(*Point_Int64Value); ok {
- return x.Int64Value
- }
- return 0
-}
-
-func (m *Point) GetDoubleValue() float64 {
- if x, ok := m.GetValue().(*Point_DoubleValue); ok {
- return x.DoubleValue
- }
- return 0
-}
-
-func (m *Point) GetDistributionValue() *DistributionValue {
- if x, ok := m.GetValue().(*Point_DistributionValue); ok {
- return x.DistributionValue
- }
- return nil
-}
-
-func (m *Point) GetSummaryValue() *SummaryValue {
- if x, ok := m.GetValue().(*Point_SummaryValue); ok {
- return x.SummaryValue
- }
- return nil
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*Point) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _Point_OneofMarshaler, _Point_OneofUnmarshaler, _Point_OneofSizer, []interface{}{
- (*Point_Int64Value)(nil),
- (*Point_DoubleValue)(nil),
- (*Point_DistributionValue)(nil),
- (*Point_SummaryValue)(nil),
- }
-}
-
-func _Point_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*Point)
- // value
- switch x := m.Value.(type) {
- case *Point_Int64Value:
- b.EncodeVarint(2<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.Int64Value))
- case *Point_DoubleValue:
- b.EncodeVarint(3<<3 | proto.WireFixed64)
- b.EncodeFixed64(math.Float64bits(x.DoubleValue))
- case *Point_DistributionValue:
- b.EncodeVarint(4<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.DistributionValue); err != nil {
- return err
- }
- case *Point_SummaryValue:
- b.EncodeVarint(5<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.SummaryValue); err != nil {
- return err
- }
- case nil:
- default:
- return fmt.Errorf("Point.Value has unexpected type %T", x)
- }
- return nil
-}
-
-func _Point_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*Point)
- switch tag {
- case 2: // value.int64_value
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Value = &Point_Int64Value{int64(x)}
- return true, err
- case 3: // value.double_value
- if wire != proto.WireFixed64 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed64()
- m.Value = &Point_DoubleValue{math.Float64frombits(x)}
- return true, err
- case 4: // value.distribution_value
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(DistributionValue)
- err := b.DecodeMessage(msg)
- m.Value = &Point_DistributionValue{msg}
- return true, err
- case 5: // value.summary_value
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(SummaryValue)
- err := b.DecodeMessage(msg)
- m.Value = &Point_SummaryValue{msg}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _Point_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*Point)
- // value
- switch x := m.Value.(type) {
- case *Point_Int64Value:
- n += 1 // tag and wire
- n += proto.SizeVarint(uint64(x.Int64Value))
- case *Point_DoubleValue:
- n += 1 // tag and wire
- n += 8
- case *Point_DistributionValue:
- s := proto.Size(x.DistributionValue)
- n += 1 // tag and wire
- n += proto.SizeVarint(uint64(s))
- n += s
- case *Point_SummaryValue:
- s := proto.Size(x.SummaryValue)
- n += 1 // tag and wire
- n += proto.SizeVarint(uint64(s))
- n += s
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-// Distribution contains summary statistics for a population of values. It
-// optionally contains a histogram representing the distribution of those
-// values across a set of buckets.
-type DistributionValue struct {
- // The number of values in the population. Must be non-negative. This value
- // must equal the sum of the values in bucket_counts if a histogram is
- // provided.
- Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
- // The sum of the values in the population. If count is zero then this field
- // must be zero.
- Sum float64 `protobuf:"fixed64,2,opt,name=sum,proto3" json:"sum,omitempty"`
- // The sum of squared deviations from the mean of the values in the
- // population. For values x_i this is:
- //
- // Sum[i=1..n]((x_i - mean)^2)
- //
- // Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
- // describes Welford's method for accumulating this sum in one pass.
- //
- // If count is zero then this field must be zero.
- SumOfSquaredDeviation float64 `protobuf:"fixed64,3,opt,name=sum_of_squared_deviation,json=sumOfSquaredDeviation,proto3" json:"sum_of_squared_deviation,omitempty"`
- // Don't change bucket boundaries within a TimeSeries if your backend doesn't
- // support this. To save network bandwidth this field can be sent only the
- // first time a metric is sent when using a streaming RPC.
- BucketOptions *DistributionValue_BucketOptions `protobuf:"bytes,4,opt,name=bucket_options,json=bucketOptions,proto3" json:"bucket_options,omitempty"`
- // If the distribution does not have a histogram, then omit this field.
- // If there is a histogram, then the sum of the values in the Bucket counts
- // must equal the value in the count field of the distribution.
- Buckets []*DistributionValue_Bucket `protobuf:"bytes,5,rep,name=buckets,proto3" json:"buckets,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *DistributionValue) Reset() { *m = DistributionValue{} }
-func (m *DistributionValue) String() string { return proto.CompactTextString(m) }
-func (*DistributionValue) ProtoMessage() {}
-func (*DistributionValue) Descriptor() ([]byte, []int) {
- return fileDescriptor_metrics_d25fbad7c11497fc, []int{6}
-}
-func (m *DistributionValue) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DistributionValue.Unmarshal(m, b)
-}
-func (m *DistributionValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DistributionValue.Marshal(b, m, deterministic)
-}
-func (dst *DistributionValue) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DistributionValue.Merge(dst, src)
-}
-func (m *DistributionValue) XXX_Size() int {
- return xxx_messageInfo_DistributionValue.Size(m)
-}
-func (m *DistributionValue) XXX_DiscardUnknown() {
- xxx_messageInfo_DistributionValue.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DistributionValue proto.InternalMessageInfo
-
-func (m *DistributionValue) GetCount() int64 {
- if m != nil {
- return m.Count
- }
- return 0
-}
-
-func (m *DistributionValue) GetSum() float64 {
- if m != nil {
- return m.Sum
- }
- return 0
-}
-
-func (m *DistributionValue) GetSumOfSquaredDeviation() float64 {
- if m != nil {
- return m.SumOfSquaredDeviation
- }
- return 0
-}
-
-func (m *DistributionValue) GetBucketOptions() *DistributionValue_BucketOptions {
- if m != nil {
- return m.BucketOptions
- }
- return nil
-}
-
-func (m *DistributionValue) GetBuckets() []*DistributionValue_Bucket {
- if m != nil {
- return m.Buckets
- }
- return nil
-}
-
-// A Distribution may optionally contain a histogram of the values in the
-// population. The bucket boundaries for that histogram are described by
-// BucketOptions.
-//
-// If bucket_options has no type, then there is no histogram associated with
-// the Distribution.
-type DistributionValue_BucketOptions struct {
- // Types that are valid to be assigned to Type:
- // *DistributionValue_BucketOptions_Explicit_
- Type isDistributionValue_BucketOptions_Type `protobuf_oneof:"type"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *DistributionValue_BucketOptions) Reset() { *m = DistributionValue_BucketOptions{} }
-func (m *DistributionValue_BucketOptions) String() string { return proto.CompactTextString(m) }
-func (*DistributionValue_BucketOptions) ProtoMessage() {}
-func (*DistributionValue_BucketOptions) Descriptor() ([]byte, []int) {
- return fileDescriptor_metrics_d25fbad7c11497fc, []int{6, 0}
-}
-func (m *DistributionValue_BucketOptions) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DistributionValue_BucketOptions.Unmarshal(m, b)
-}
-func (m *DistributionValue_BucketOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DistributionValue_BucketOptions.Marshal(b, m, deterministic)
-}
-func (dst *DistributionValue_BucketOptions) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DistributionValue_BucketOptions.Merge(dst, src)
-}
-func (m *DistributionValue_BucketOptions) XXX_Size() int {
- return xxx_messageInfo_DistributionValue_BucketOptions.Size(m)
-}
-func (m *DistributionValue_BucketOptions) XXX_DiscardUnknown() {
- xxx_messageInfo_DistributionValue_BucketOptions.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DistributionValue_BucketOptions proto.InternalMessageInfo
-
-type isDistributionValue_BucketOptions_Type interface {
- isDistributionValue_BucketOptions_Type()
-}
-
-type DistributionValue_BucketOptions_Explicit_ struct {
- Explicit *DistributionValue_BucketOptions_Explicit `protobuf:"bytes,1,opt,name=explicit,proto3,oneof"`
-}
-
-func (*DistributionValue_BucketOptions_Explicit_) isDistributionValue_BucketOptions_Type() {}
-
-func (m *DistributionValue_BucketOptions) GetType() isDistributionValue_BucketOptions_Type {
- if m != nil {
- return m.Type
- }
- return nil
-}
-
-func (m *DistributionValue_BucketOptions) GetExplicit() *DistributionValue_BucketOptions_Explicit {
- if x, ok := m.GetType().(*DistributionValue_BucketOptions_Explicit_); ok {
- return x.Explicit
- }
- return nil
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*DistributionValue_BucketOptions) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _DistributionValue_BucketOptions_OneofMarshaler, _DistributionValue_BucketOptions_OneofUnmarshaler, _DistributionValue_BucketOptions_OneofSizer, []interface{}{
- (*DistributionValue_BucketOptions_Explicit_)(nil),
- }
-}
-
-func _DistributionValue_BucketOptions_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*DistributionValue_BucketOptions)
- // type
- switch x := m.Type.(type) {
- case *DistributionValue_BucketOptions_Explicit_:
- b.EncodeVarint(1<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Explicit); err != nil {
- return err
- }
- case nil:
- default:
- return fmt.Errorf("DistributionValue_BucketOptions.Type has unexpected type %T", x)
- }
- return nil
-}
-
-func _DistributionValue_BucketOptions_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*DistributionValue_BucketOptions)
- switch tag {
- case 1: // type.explicit
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(DistributionValue_BucketOptions_Explicit)
- err := b.DecodeMessage(msg)
- m.Type = &DistributionValue_BucketOptions_Explicit_{msg}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _DistributionValue_BucketOptions_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*DistributionValue_BucketOptions)
- // type
- switch x := m.Type.(type) {
- case *DistributionValue_BucketOptions_Explicit_:
- s := proto.Size(x.Explicit)
- n += 1 // tag and wire
- n += proto.SizeVarint(uint64(s))
- n += s
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-// Specifies a set of buckets with arbitrary upper-bounds.
-// This defines size(bounds) + 1 (= N) buckets. The boundaries for bucket
-// index i are:
-//
-// [0, bucket_bounds[i]) for i == 0
-// [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-1
-// [bucket_bounds[i-1], +infinity) for i == N-1
-type DistributionValue_BucketOptions_Explicit struct {
- // The values must be strictly increasing and > 0.
- Bounds []float64 `protobuf:"fixed64,1,rep,packed,name=bounds,proto3" json:"bounds,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *DistributionValue_BucketOptions_Explicit) Reset() {
- *m = DistributionValue_BucketOptions_Explicit{}
-}
-func (m *DistributionValue_BucketOptions_Explicit) String() string { return proto.CompactTextString(m) }
-func (*DistributionValue_BucketOptions_Explicit) ProtoMessage() {}
-func (*DistributionValue_BucketOptions_Explicit) Descriptor() ([]byte, []int) {
- return fileDescriptor_metrics_d25fbad7c11497fc, []int{6, 0, 0}
-}
-func (m *DistributionValue_BucketOptions_Explicit) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DistributionValue_BucketOptions_Explicit.Unmarshal(m, b)
-}
-func (m *DistributionValue_BucketOptions_Explicit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DistributionValue_BucketOptions_Explicit.Marshal(b, m, deterministic)
-}
-func (dst *DistributionValue_BucketOptions_Explicit) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DistributionValue_BucketOptions_Explicit.Merge(dst, src)
-}
-func (m *DistributionValue_BucketOptions_Explicit) XXX_Size() int {
- return xxx_messageInfo_DistributionValue_BucketOptions_Explicit.Size(m)
-}
-func (m *DistributionValue_BucketOptions_Explicit) XXX_DiscardUnknown() {
- xxx_messageInfo_DistributionValue_BucketOptions_Explicit.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DistributionValue_BucketOptions_Explicit proto.InternalMessageInfo
-
-func (m *DistributionValue_BucketOptions_Explicit) GetBounds() []float64 {
- if m != nil {
- return m.Bounds
- }
- return nil
-}
-
-type DistributionValue_Bucket struct {
- // The number of values in each bucket of the histogram, as described in
- // bucket_bounds.
- Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
- // If the distribution does not have a histogram, then omit this field.
- Exemplar *DistributionValue_Exemplar `protobuf:"bytes,2,opt,name=exemplar,proto3" json:"exemplar,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *DistributionValue_Bucket) Reset() { *m = DistributionValue_Bucket{} }
-func (m *DistributionValue_Bucket) String() string { return proto.CompactTextString(m) }
-func (*DistributionValue_Bucket) ProtoMessage() {}
-func (*DistributionValue_Bucket) Descriptor() ([]byte, []int) {
- return fileDescriptor_metrics_d25fbad7c11497fc, []int{6, 1}
-}
-func (m *DistributionValue_Bucket) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DistributionValue_Bucket.Unmarshal(m, b)
-}
-func (m *DistributionValue_Bucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DistributionValue_Bucket.Marshal(b, m, deterministic)
-}
-func (dst *DistributionValue_Bucket) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DistributionValue_Bucket.Merge(dst, src)
-}
-func (m *DistributionValue_Bucket) XXX_Size() int {
- return xxx_messageInfo_DistributionValue_Bucket.Size(m)
-}
-func (m *DistributionValue_Bucket) XXX_DiscardUnknown() {
- xxx_messageInfo_DistributionValue_Bucket.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DistributionValue_Bucket proto.InternalMessageInfo
-
-func (m *DistributionValue_Bucket) GetCount() int64 {
- if m != nil {
- return m.Count
- }
- return 0
-}
-
-func (m *DistributionValue_Bucket) GetExemplar() *DistributionValue_Exemplar {
- if m != nil {
- return m.Exemplar
- }
- return nil
-}
-
-// Exemplars are example points that may be used to annotate aggregated
-// Distribution values. They are metadata that gives information about a
-// particular value added to a Distribution bucket.
-type DistributionValue_Exemplar struct {
- // Value of the exemplar point. It determines which bucket the exemplar
- // belongs to.
- Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
- // The observation (sampling) time of the above value.
- Timestamp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
- // Contextual information about the example value.
- Attachments map[string]string `protobuf:"bytes,3,rep,name=attachments,proto3" json:"attachments,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *DistributionValue_Exemplar) Reset() { *m = DistributionValue_Exemplar{} }
-func (m *DistributionValue_Exemplar) String() string { return proto.CompactTextString(m) }
-func (*DistributionValue_Exemplar) ProtoMessage() {}
-func (*DistributionValue_Exemplar) Descriptor() ([]byte, []int) {
- return fileDescriptor_metrics_d25fbad7c11497fc, []int{6, 2}
-}
-func (m *DistributionValue_Exemplar) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DistributionValue_Exemplar.Unmarshal(m, b)
-}
-func (m *DistributionValue_Exemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DistributionValue_Exemplar.Marshal(b, m, deterministic)
-}
-func (dst *DistributionValue_Exemplar) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DistributionValue_Exemplar.Merge(dst, src)
-}
-func (m *DistributionValue_Exemplar) XXX_Size() int {
- return xxx_messageInfo_DistributionValue_Exemplar.Size(m)
-}
-func (m *DistributionValue_Exemplar) XXX_DiscardUnknown() {
- xxx_messageInfo_DistributionValue_Exemplar.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DistributionValue_Exemplar proto.InternalMessageInfo
-
-func (m *DistributionValue_Exemplar) GetValue() float64 {
- if m != nil {
- return m.Value
- }
- return 0
-}
-
-func (m *DistributionValue_Exemplar) GetTimestamp() *timestamp.Timestamp {
- if m != nil {
- return m.Timestamp
- }
- return nil
-}
-
-func (m *DistributionValue_Exemplar) GetAttachments() map[string]string {
- if m != nil {
- return m.Attachments
- }
- return nil
-}
-
-// The start_timestamp only applies to the count and sum in the SummaryValue.
-type SummaryValue struct {
- // The total number of recorded values since start_time. Optional since
- // some systems don't expose this.
- Count *wrappers.Int64Value `protobuf:"bytes,1,opt,name=count,proto3" json:"count,omitempty"`
- // The total sum of recorded values since start_time. Optional since some
- // systems don't expose this. If count is zero then this field must be zero.
- // This field must be unset if the sum is not available.
- Sum *wrappers.DoubleValue `protobuf:"bytes,2,opt,name=sum,proto3" json:"sum,omitempty"`
- // Values calculated over an arbitrary time window.
- Snapshot *SummaryValue_Snapshot `protobuf:"bytes,3,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *SummaryValue) Reset() { *m = SummaryValue{} }
-func (m *SummaryValue) String() string { return proto.CompactTextString(m) }
-func (*SummaryValue) ProtoMessage() {}
-func (*SummaryValue) Descriptor() ([]byte, []int) {
- return fileDescriptor_metrics_d25fbad7c11497fc, []int{7}
-}
-func (m *SummaryValue) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_SummaryValue.Unmarshal(m, b)
-}
-func (m *SummaryValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_SummaryValue.Marshal(b, m, deterministic)
-}
-func (dst *SummaryValue) XXX_Merge(src proto.Message) {
- xxx_messageInfo_SummaryValue.Merge(dst, src)
-}
-func (m *SummaryValue) XXX_Size() int {
- return xxx_messageInfo_SummaryValue.Size(m)
-}
-func (m *SummaryValue) XXX_DiscardUnknown() {
- xxx_messageInfo_SummaryValue.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SummaryValue proto.InternalMessageInfo
-
-func (m *SummaryValue) GetCount() *wrappers.Int64Value {
- if m != nil {
- return m.Count
- }
- return nil
-}
-
-func (m *SummaryValue) GetSum() *wrappers.DoubleValue {
- if m != nil {
- return m.Sum
- }
- return nil
-}
-
-func (m *SummaryValue) GetSnapshot() *SummaryValue_Snapshot {
- if m != nil {
- return m.Snapshot
- }
- return nil
-}
-
-// The values in this message can be reset at arbitrary unknown times, with
-// the requirement that all of them are reset at the same time.
-type SummaryValue_Snapshot struct {
- // The number of values in the snapshot. Optional since some systems don't
- // expose this.
- Count *wrappers.Int64Value `protobuf:"bytes,1,opt,name=count,proto3" json:"count,omitempty"`
- // The sum of values in the snapshot. Optional since some systems don't
- // expose this. If count is zero then this field must be zero or not set
- // (if not supported).
- Sum *wrappers.DoubleValue `protobuf:"bytes,2,opt,name=sum,proto3" json:"sum,omitempty"`
- // A list of values at different percentiles of the distribution calculated
- // from the current snapshot. The percentiles must be strictly increasing.
- PercentileValues []*SummaryValue_Snapshot_ValueAtPercentile `protobuf:"bytes,3,rep,name=percentile_values,json=percentileValues,proto3" json:"percentile_values,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *SummaryValue_Snapshot) Reset() { *m = SummaryValue_Snapshot{} }
-func (m *SummaryValue_Snapshot) String() string { return proto.CompactTextString(m) }
-func (*SummaryValue_Snapshot) ProtoMessage() {}
-func (*SummaryValue_Snapshot) Descriptor() ([]byte, []int) {
- return fileDescriptor_metrics_d25fbad7c11497fc, []int{7, 0}
-}
-func (m *SummaryValue_Snapshot) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_SummaryValue_Snapshot.Unmarshal(m, b)
-}
-func (m *SummaryValue_Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_SummaryValue_Snapshot.Marshal(b, m, deterministic)
-}
-func (dst *SummaryValue_Snapshot) XXX_Merge(src proto.Message) {
- xxx_messageInfo_SummaryValue_Snapshot.Merge(dst, src)
-}
-func (m *SummaryValue_Snapshot) XXX_Size() int {
- return xxx_messageInfo_SummaryValue_Snapshot.Size(m)
-}
-func (m *SummaryValue_Snapshot) XXX_DiscardUnknown() {
- xxx_messageInfo_SummaryValue_Snapshot.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SummaryValue_Snapshot proto.InternalMessageInfo
-
-func (m *SummaryValue_Snapshot) GetCount() *wrappers.Int64Value {
- if m != nil {
- return m.Count
- }
- return nil
-}
-
-func (m *SummaryValue_Snapshot) GetSum() *wrappers.DoubleValue {
- if m != nil {
- return m.Sum
- }
- return nil
-}
-
-func (m *SummaryValue_Snapshot) GetPercentileValues() []*SummaryValue_Snapshot_ValueAtPercentile {
- if m != nil {
- return m.PercentileValues
- }
- return nil
-}
-
-// Represents the value at a given percentile of a distribution.
-type SummaryValue_Snapshot_ValueAtPercentile struct {
- // The percentile of a distribution. Must be in the interval
- // (0.0, 100.0].
- Percentile float64 `protobuf:"fixed64,1,opt,name=percentile,proto3" json:"percentile,omitempty"`
- // The value at the given percentile of a distribution.
- Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *SummaryValue_Snapshot_ValueAtPercentile) Reset() {
- *m = SummaryValue_Snapshot_ValueAtPercentile{}
-}
-func (m *SummaryValue_Snapshot_ValueAtPercentile) String() string { return proto.CompactTextString(m) }
-func (*SummaryValue_Snapshot_ValueAtPercentile) ProtoMessage() {}
-func (*SummaryValue_Snapshot_ValueAtPercentile) Descriptor() ([]byte, []int) {
- return fileDescriptor_metrics_d25fbad7c11497fc, []int{7, 0, 0}
-}
-func (m *SummaryValue_Snapshot_ValueAtPercentile) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_SummaryValue_Snapshot_ValueAtPercentile.Unmarshal(m, b)
-}
-func (m *SummaryValue_Snapshot_ValueAtPercentile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_SummaryValue_Snapshot_ValueAtPercentile.Marshal(b, m, deterministic)
-}
-func (dst *SummaryValue_Snapshot_ValueAtPercentile) XXX_Merge(src proto.Message) {
- xxx_messageInfo_SummaryValue_Snapshot_ValueAtPercentile.Merge(dst, src)
-}
-func (m *SummaryValue_Snapshot_ValueAtPercentile) XXX_Size() int {
- return xxx_messageInfo_SummaryValue_Snapshot_ValueAtPercentile.Size(m)
-}
-func (m *SummaryValue_Snapshot_ValueAtPercentile) XXX_DiscardUnknown() {
- xxx_messageInfo_SummaryValue_Snapshot_ValueAtPercentile.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SummaryValue_Snapshot_ValueAtPercentile proto.InternalMessageInfo
-
-func (m *SummaryValue_Snapshot_ValueAtPercentile) GetPercentile() float64 {
- if m != nil {
- return m.Percentile
- }
- return 0
-}
-
-func (m *SummaryValue_Snapshot_ValueAtPercentile) GetValue() float64 {
- if m != nil {
- return m.Value
- }
- return 0
-}
-
-func init() {
- proto.RegisterType((*Metric)(nil), "opencensus.proto.metrics.v1.Metric")
- proto.RegisterType((*MetricDescriptor)(nil), "opencensus.proto.metrics.v1.MetricDescriptor")
- proto.RegisterType((*LabelKey)(nil), "opencensus.proto.metrics.v1.LabelKey")
- proto.RegisterType((*TimeSeries)(nil), "opencensus.proto.metrics.v1.TimeSeries")
- proto.RegisterType((*LabelValue)(nil), "opencensus.proto.metrics.v1.LabelValue")
- proto.RegisterType((*Point)(nil), "opencensus.proto.metrics.v1.Point")
- proto.RegisterType((*DistributionValue)(nil), "opencensus.proto.metrics.v1.DistributionValue")
- proto.RegisterType((*DistributionValue_BucketOptions)(nil), "opencensus.proto.metrics.v1.DistributionValue.BucketOptions")
- proto.RegisterType((*DistributionValue_BucketOptions_Explicit)(nil), "opencensus.proto.metrics.v1.DistributionValue.BucketOptions.Explicit")
- proto.RegisterType((*DistributionValue_Bucket)(nil), "opencensus.proto.metrics.v1.DistributionValue.Bucket")
- proto.RegisterType((*DistributionValue_Exemplar)(nil), "opencensus.proto.metrics.v1.DistributionValue.Exemplar")
- proto.RegisterMapType((map[string]string)(nil), "opencensus.proto.metrics.v1.DistributionValue.Exemplar.AttachmentsEntry")
- proto.RegisterType((*SummaryValue)(nil), "opencensus.proto.metrics.v1.SummaryValue")
- proto.RegisterType((*SummaryValue_Snapshot)(nil), "opencensus.proto.metrics.v1.SummaryValue.Snapshot")
- proto.RegisterType((*SummaryValue_Snapshot_ValueAtPercentile)(nil), "opencensus.proto.metrics.v1.SummaryValue.Snapshot.ValueAtPercentile")
- proto.RegisterEnum("opencensus.proto.metrics.v1.MetricDescriptor_Type", MetricDescriptor_Type_name, MetricDescriptor_Type_value)
-}
-
-func init() {
- proto.RegisterFile("opencensus/proto/metrics/v1/metrics.proto", fileDescriptor_metrics_d25fbad7c11497fc)
-}
-
-var fileDescriptor_metrics_d25fbad7c11497fc = []byte{
- // 1114 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xdd, 0x6e, 0x1b, 0xc5,
- 0x17, 0xf7, 0xda, 0x89, 0xe3, 0x9c, 0x75, 0xd3, 0xf5, 0x28, 0xed, 0xdf, 0x72, 0xfe, 0x0a, 0x61,
- 0x11, 0x90, 0x0a, 0x65, 0xad, 0x98, 0xd2, 0x56, 0x15, 0x2a, 0x8a, 0x63, 0x37, 0x36, 0xe4, 0xc3,
- 0x1a, 0xdb, 0x95, 0x40, 0x48, 0xd6, 0x7a, 0x3d, 0x49, 0x96, 0x78, 0x3f, 0xba, 0x33, 0x6b, 0xf0,
- 0x0b, 0xf0, 0x08, 0x70, 0xcb, 0x2d, 0xe2, 0x39, 0xb8, 0xe2, 0x09, 0x78, 0x0a, 0x5e, 0x01, 0xed,
- 0xcc, 0xec, 0x47, 0x62, 0x70, 0x71, 0x91, 0xb8, 0x9b, 0x73, 0xe6, 0xfc, 0x7e, 0x73, 0xbe, 0x77,
- 0xe1, 0x91, 0xe7, 0x13, 0xd7, 0x22, 0x2e, 0x0d, 0x69, 0xdd, 0x0f, 0x3c, 0xe6, 0xd5, 0x1d, 0xc2,
- 0x02, 0xdb, 0xa2, 0xf5, 0xd9, 0x61, 0x7c, 0x34, 0xf8, 0x05, 0xda, 0x49, 0x4d, 0x85, 0xc6, 0x88,
- 0xef, 0x67, 0x87, 0xb5, 0x77, 0xae, 0x3c, 0xef, 0x6a, 0x4a, 0x04, 0xc7, 0x38, 0xbc, 0xac, 0x33,
- 0xdb, 0x21, 0x94, 0x99, 0x8e, 0x2f, 0x6c, 0x6b, 0xbb, 0x77, 0x0d, 0xbe, 0x0d, 0x4c, 0xdf, 0x27,
- 0x81, 0xe4, 0xaa, 0x7d, 0xb4, 0xe0, 0x48, 0x40, 0xa8, 0x17, 0x06, 0x16, 0x89, 0x3c, 0x89, 0xcf,
- 0xc2, 0x58, 0xff, 0x31, 0x0f, 0xc5, 0x33, 0xfe, 0x38, 0xfa, 0x1a, 0x2a, 0xc2, 0x8d, 0xd1, 0x84,
- 0x50, 0x2b, 0xb0, 0x7d, 0xe6, 0x05, 0x55, 0x65, 0x4f, 0xd9, 0x57, 0x1b, 0x07, 0xc6, 0x12, 0x8f,
- 0x0d, 0x81, 0x6f, 0x25, 0xa0, 0x4e, 0x0e, 0x6b, 0xce, 0x1d, 0x1d, 0xda, 0x86, 0x35, 0xd7, 0x74,
- 0x48, 0x35, 0xbf, 0xa7, 0xec, 0x6f, 0x76, 0x72, 0x98, 0x4b, 0xe8, 0x04, 0x80, 0x87, 0x47, 0x02,
- 0x9b, 0xd0, 0x6a, 0x61, 0xaf, 0xb0, 0xaf, 0x36, 0x3e, 0x5c, 0xfa, 0xd8, 0xc0, 0x76, 0x48, 0x9f,
- 0x9b, 0xe3, 0x0c, 0x14, 0x35, 0xa1, 0x14, 0x47, 0x56, 0x5d, 0xe3, 0x3e, 0x7f, 0xb0, 0x48, 0x93,
- 0xc4, 0x3e, 0x3b, 0x34, 0xb0, 0x3c, 0xe3, 0x04, 0xd7, 0x2c, 0x03, 0xa4, 0x91, 0xeb, 0x3f, 0x14,
- 0x40, 0xbb, 0x1b, 0x19, 0x42, 0x32, 0x8a, 0x28, 0x2d, 0x9b, 0x32, 0x86, 0x3d, 0x50, 0x63, 0x98,
- 0xed, 0xb9, 0x22, 0x40, 0x9c, 0x55, 0x45, 0xa8, 0xd0, 0xb5, 0x59, 0xb5, 0x20, 0x50, 0xd1, 0x19,
- 0xbd, 0x84, 0x35, 0x36, 0xf7, 0x85, 0xb3, 0x5b, 0x8d, 0xc6, 0x4a, 0x09, 0x36, 0x06, 0x73, 0x9f,
- 0x60, 0x8e, 0x47, 0x2d, 0x80, 0xa9, 0x39, 0x26, 0xd3, 0xd1, 0x0d, 0x99, 0xd3, 0xea, 0x3a, 0xcf,
- 0xe0, 0xfb, 0x4b, 0xd9, 0x4e, 0x23, 0xf3, 0x2f, 0xc8, 0x1c, 0x6f, 0x4e, 0xe5, 0x89, 0xea, 0x3f,
- 0x2b, 0xb0, 0x16, 0x91, 0xa2, 0xfb, 0xa0, 0x0e, 0xcf, 0xfb, 0xbd, 0xf6, 0x71, 0xf7, 0x65, 0xb7,
- 0xdd, 0xd2, 0x72, 0x91, 0xe2, 0xe4, 0x68, 0x78, 0xd2, 0x1e, 0x75, 0xcf, 0x07, 0x4f, 0x1e, 0x6b,
- 0x0a, 0xd2, 0xa0, 0x2c, 0x14, 0xad, 0x8b, 0x61, 0xf3, 0xb4, 0xad, 0xe5, 0xd1, 0x43, 0x40, 0x52,
- 0xd3, 0xed, 0x0f, 0x70, 0xb7, 0x39, 0x1c, 0x74, 0x2f, 0xce, 0xb5, 0x02, 0xda, 0x06, 0xed, 0x78,
- 0x78, 0x36, 0x3c, 0x3d, 0x1a, 0x74, 0x5f, 0xc5, 0xf8, 0x35, 0xf4, 0x00, 0x2a, 0x19, 0xad, 0x24,
- 0x59, 0x47, 0x3b, 0xf0, 0xbf, 0xac, 0x3a, 0xcb, 0x54, 0x44, 0x2a, 0x6c, 0xf4, 0x87, 0x67, 0x67,
- 0x47, 0xf8, 0x4b, 0x6d, 0x43, 0x7f, 0x01, 0xa5, 0x38, 0x04, 0xa4, 0x41, 0xe1, 0x86, 0xcc, 0x65,
- 0x39, 0xa2, 0xe3, 0x9b, 0xab, 0xa1, 0xff, 0xae, 0x00, 0xa4, 0x5d, 0x84, 0x8e, 0xe1, 0x3e, 0x65,
- 0x66, 0xc0, 0x46, 0xc9, 0x9c, 0xc9, 0xa6, 0xaf, 0x19, 0x62, 0xd0, 0x8c, 0x78, 0xd0, 0x78, 0xef,
- 0x71, 0x0b, 0xbc, 0xc5, 0x21, 0x89, 0x8c, 0x3e, 0x87, 0xb2, 0xa8, 0xc2, 0xcc, 0x9c, 0x86, 0x84,
- 0x56, 0xf3, 0xff, 0xa0, 0x93, 0x79, 0x10, 0xaf, 0x22, 0x7b, 0xac, 0x4e, 0x93, 0x33, 0x45, 0xcf,
- 0xa1, 0xe8, 0x7b, 0xb6, 0xcb, 0xe2, 0x79, 0xd0, 0x97, 0xb2, 0xf4, 0x22, 0x53, 0x2c, 0x11, 0xfa,
- 0x67, 0x00, 0x29, 0x2d, 0xda, 0x86, 0x75, 0xee, 0x8f, 0xcc, 0x8f, 0x10, 0xd0, 0x0e, 0x6c, 0x5e,
- 0x9b, 0x54, 0x78, 0xca, 0xf3, 0x53, 0xc2, 0xa5, 0x6b, 0x93, 0x72, 0x88, 0xfe, 0x6b, 0x1e, 0xd6,
- 0x39, 0x25, 0x7a, 0x06, 0x9b, 0xab, 0x64, 0x24, 0x35, 0x46, 0xef, 0x82, 0x6a, 0xbb, 0xec, 0xc9,
- 0xe3, 0xcc, 0x13, 0x85, 0x4e, 0x0e, 0x03, 0x57, 0x0a, 0xcf, 0xde, 0x83, 0xf2, 0xc4, 0x0b, 0xc7,
- 0x53, 0x22, 0x6d, 0xa2, 0xc9, 0x50, 0x3a, 0x39, 0xac, 0x0a, 0xad, 0x30, 0x1a, 0x01, 0x9a, 0xd8,
- 0x94, 0x05, 0xf6, 0x38, 0x8c, 0x0a, 0x27, 0x4d, 0xc5, 0x74, 0x1b, 0x4b, 0x93, 0xd2, 0xca, 0xc0,
- 0x38, 0x57, 0x27, 0x87, 0x2b, 0x93, 0xbb, 0x4a, 0xd4, 0x83, 0x7b, 0x34, 0x74, 0x1c, 0x33, 0x98,
- 0x4b, 0xee, 0x75, 0xce, 0xfd, 0x68, 0x29, 0x77, 0x5f, 0x20, 0x62, 0xda, 0x32, 0xcd, 0xc8, 0xcd,
- 0x0d, 0x99, 0x71, 0xfd, 0xb7, 0x22, 0x54, 0x16, 0xbc, 0x88, 0x0a, 0x62, 0x79, 0xa1, 0xcb, 0x78,
- 0x3e, 0x0b, 0x58, 0x08, 0x51, 0x13, 0xd3, 0xd0, 0xe1, 0x79, 0x52, 0x70, 0x74, 0x44, 0x4f, 0xa1,
- 0x4a, 0x43, 0x67, 0xe4, 0x5d, 0x8e, 0xe8, 0xeb, 0xd0, 0x0c, 0xc8, 0x64, 0x34, 0x21, 0x33, 0xdb,
- 0xe4, 0x1d, 0xcd, 0x53, 0x85, 0x1f, 0xd0, 0xd0, 0xb9, 0xb8, 0xec, 0x8b, 0xdb, 0x56, 0x7c, 0x89,
- 0x2c, 0xd8, 0x1a, 0x87, 0xd6, 0x0d, 0x61, 0x23, 0x8f, 0x37, 0x3b, 0x95, 0xe9, 0xfa, 0x74, 0xb5,
- 0x74, 0x19, 0x4d, 0x4e, 0x72, 0x21, 0x38, 0xf0, 0xbd, 0x71, 0x56, 0x44, 0x17, 0xb0, 0x21, 0x14,
- 0xf1, 0xbe, 0xf9, 0xe4, 0xad, 0xd8, 0x71, 0xcc, 0x52, 0xfb, 0x49, 0x81, 0x7b, 0xb7, 0x5e, 0x44,
- 0x16, 0x94, 0xc8, 0x77, 0xfe, 0xd4, 0xb6, 0x6c, 0x26, 0x7b, 0xaf, 0xfd, 0x6f, 0x22, 0x30, 0xda,
- 0x92, 0xac, 0x93, 0xc3, 0x09, 0x71, 0x4d, 0x87, 0x52, 0xac, 0x47, 0x0f, 0xa1, 0x38, 0xf6, 0x42,
- 0x77, 0x42, 0xab, 0xca, 0x5e, 0x61, 0x5f, 0xc1, 0x52, 0x6a, 0x16, 0xc5, 0x9a, 0xae, 0x51, 0x28,
- 0x0a, 0xc6, 0xbf, 0xa9, 0x61, 0x3f, 0x72, 0x98, 0x38, 0xfe, 0xd4, 0x0c, 0x78, 0x21, 0xd5, 0xc6,
- 0xd3, 0x15, 0x1d, 0x6e, 0x4b, 0x38, 0x4e, 0x88, 0x6a, 0xdf, 0xe7, 0x23, 0x0f, 0x85, 0x70, 0x7b,
- 0x98, 0x95, 0x78, 0x98, 0x6f, 0x4d, 0x69, 0x7e, 0x95, 0x29, 0xfd, 0x06, 0x54, 0x93, 0x31, 0xd3,
- 0xba, 0x76, 0x48, 0xba, 0x6b, 0x3a, 0x6f, 0xe9, 0xb4, 0x71, 0x94, 0x52, 0xb5, 0x5d, 0x16, 0xcc,
- 0x71, 0x96, 0xbc, 0xf6, 0x02, 0xb4, 0xbb, 0x06, 0x7f, 0xb1, 0xba, 0x93, 0x08, 0xf3, 0x99, 0x75,
- 0xf5, 0x3c, 0xff, 0x4c, 0xd1, 0xff, 0x28, 0x40, 0x39, 0x3b, 0x77, 0xe8, 0x30, 0x5b, 0x04, 0xb5,
- 0xb1, 0xb3, 0x10, 0x72, 0x37, 0xd9, 0x35, 0x71, 0x85, 0x8c, 0x74, 0xca, 0xd4, 0xc6, 0xff, 0x17,
- 0x00, 0xad, 0x74, 0xf1, 0x88, 0x19, 0x3c, 0x87, 0x12, 0x75, 0x4d, 0x9f, 0x5e, 0x7b, 0xe2, 0xc3,
- 0xad, 0xbe, 0xe1, 0x23, 0x9d, 0xf5, 0xcf, 0xe8, 0x4b, 0x24, 0x4e, 0x38, 0x6a, 0xbf, 0xe4, 0xa1,
- 0x14, 0xab, 0xff, 0x0b, 0xff, 0x5f, 0x43, 0xc5, 0x27, 0x81, 0x45, 0x5c, 0x66, 0xc7, 0x6b, 0x36,
- 0xae, 0x72, 0x6b, 0xf5, 0x40, 0x0c, 0x2e, 0x1e, 0xb1, 0x5e, 0x42, 0x89, 0xb5, 0x94, 0x5e, 0x7c,
- 0xb9, 0x6a, 0x5d, 0xa8, 0x2c, 0x98, 0xa1, 0x5d, 0x80, 0xd4, 0x50, 0x36, 0x6f, 0x46, 0x73, 0xbb,
- 0xea, 0x71, 0x5f, 0x37, 0x67, 0xb0, 0x6b, 0x7b, 0xcb, 0xdc, 0x6c, 0x96, 0xc5, 0x5f, 0x11, 0xed,
- 0x45, 0x17, 0x3d, 0xe5, 0xab, 0xd6, 0x95, 0xcd, 0xae, 0xc3, 0xb1, 0x61, 0x79, 0x4e, 0x5d, 0x60,
- 0x0e, 0x6c, 0x97, 0xb2, 0x20, 0x8c, 0x7a, 0x8e, 0x6f, 0xc7, 0x7a, 0x4a, 0x77, 0x20, 0x7e, 0x8c,
- 0xaf, 0x88, 0x7b, 0x70, 0x95, 0xfd, 0x51, 0x1f, 0x17, 0xf9, 0xc5, 0xc7, 0x7f, 0x06, 0x00, 0x00,
- 0xff, 0xff, 0x24, 0xa6, 0x3d, 0x2b, 0xce, 0x0b, 0x00, 0x00,
-}
diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1/resource.pb.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1/resource.pb.go
deleted file mode 100644
index 23747da127..0000000000
--- a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1/resource.pb.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: opencensus/proto/resource/v1/resource.proto
-
-package v1 // import "github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1"
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-// Resource information.
-type Resource struct {
- // Type identifier for the resource.
- Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
- // Set of labels that describe the resource.
- Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Resource) Reset() { *m = Resource{} }
-func (m *Resource) String() string { return proto.CompactTextString(m) }
-func (*Resource) ProtoMessage() {}
-func (*Resource) Descriptor() ([]byte, []int) {
- return fileDescriptor_resource_471b1e1cf1b04db0, []int{0}
-}
-func (m *Resource) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Resource.Unmarshal(m, b)
-}
-func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Resource.Marshal(b, m, deterministic)
-}
-func (dst *Resource) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Resource.Merge(dst, src)
-}
-func (m *Resource) XXX_Size() int {
- return xxx_messageInfo_Resource.Size(m)
-}
-func (m *Resource) XXX_DiscardUnknown() {
- xxx_messageInfo_Resource.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Resource proto.InternalMessageInfo
-
-func (m *Resource) GetType() string {
- if m != nil {
- return m.Type
- }
- return ""
-}
-
-func (m *Resource) GetLabels() map[string]string {
- if m != nil {
- return m.Labels
- }
- return nil
-}
-
-func init() {
- proto.RegisterType((*Resource)(nil), "opencensus.proto.resource.v1.Resource")
- proto.RegisterMapType((map[string]string)(nil), "opencensus.proto.resource.v1.Resource.LabelsEntry")
-}
-
-func init() {
- proto.RegisterFile("opencensus/proto/resource/v1/resource.proto", fileDescriptor_resource_471b1e1cf1b04db0)
-}
-
-var fileDescriptor_resource_471b1e1cf1b04db0 = []byte{
- // 234 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xce, 0x2f, 0x48, 0xcd,
- 0x4b, 0x4e, 0xcd, 0x2b, 0x2e, 0x2d, 0xd6, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0x4a, 0x2d,
- 0xce, 0x2f, 0x2d, 0x4a, 0x4e, 0xd5, 0x2f, 0x33, 0x84, 0xb3, 0xf5, 0xc0, 0x52, 0x42, 0x32, 0x08,
- 0xc5, 0x10, 0x11, 0x3d, 0xb8, 0x82, 0x32, 0x43, 0xa5, 0xa5, 0x8c, 0x5c, 0x1c, 0x41, 0x50, 0xbe,
- 0x90, 0x10, 0x17, 0x4b, 0x49, 0x65, 0x41, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x98,
- 0x2d, 0xe4, 0xc5, 0xc5, 0x96, 0x93, 0x98, 0x94, 0x9a, 0x53, 0x2c, 0xc1, 0xa4, 0xc0, 0xac, 0xc1,
- 0x6d, 0x64, 0xa4, 0x87, 0xcf, 0x3c, 0x3d, 0x98, 0x59, 0x7a, 0x3e, 0x60, 0x4d, 0xae, 0x79, 0x25,
- 0x45, 0x95, 0x41, 0x50, 0x13, 0xa4, 0x2c, 0xb9, 0xb8, 0x91, 0x84, 0x85, 0x04, 0xb8, 0x98, 0xb3,
- 0x53, 0x2b, 0xa1, 0xb6, 0x81, 0x98, 0x42, 0x22, 0x5c, 0xac, 0x65, 0x89, 0x39, 0xa5, 0xa9, 0x12,
- 0x4c, 0x60, 0x31, 0x08, 0xc7, 0x8a, 0xc9, 0x82, 0xd1, 0xa9, 0x92, 0x4b, 0x3e, 0x33, 0x1f, 0xaf,
- 0xd5, 0x4e, 0xbc, 0x30, 0xbb, 0x03, 0x40, 0x52, 0x01, 0x8c, 0x51, 0xae, 0xe9, 0x99, 0x25, 0x19,
- 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x10, 0x5d, 0xba, 0x99, 0x79, 0xc5, 0x25, 0x45, 0xa5,
- 0xb9, 0xa9, 0x79, 0x25, 0x89, 0x25, 0x99, 0xf9, 0x79, 0xfa, 0x08, 0x03, 0x75, 0x21, 0x01, 0x99,
- 0x9e, 0x9a, 0xa7, 0x9b, 0x8e, 0x12, 0x9e, 0x49, 0x6c, 0x60, 0x19, 0x63, 0x40, 0x00, 0x00, 0x00,
- 0xff, 0xff, 0x8e, 0x11, 0xaf, 0xda, 0x76, 0x01, 0x00, 0x00,
-}
diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace.pb.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace.pb.go
deleted file mode 100644
index d5ebb7b820..0000000000
--- a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace.pb.go
+++ /dev/null
@@ -1,1629 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: opencensus/proto/trace/v1/trace.proto
-
-package v1 // import "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1"
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import timestamp "github.com/golang/protobuf/ptypes/timestamp"
-import wrappers "github.com/golang/protobuf/ptypes/wrappers"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-// Type of span. Can be used to specify additional relationships between spans
-// in addition to a parent/child relationship.
-type Span_SpanKind int32
-
-const (
- // Unspecified.
- Span_SPAN_KIND_UNSPECIFIED Span_SpanKind = 0
- // Indicates that the span covers server-side handling of an RPC or other
- // remote network request.
- Span_SERVER Span_SpanKind = 1
- // Indicates that the span covers the client-side wrapper around an RPC or
- // other remote request.
- Span_CLIENT Span_SpanKind = 2
-)
-
-var Span_SpanKind_name = map[int32]string{
- 0: "SPAN_KIND_UNSPECIFIED",
- 1: "SERVER",
- 2: "CLIENT",
-}
-var Span_SpanKind_value = map[string]int32{
- "SPAN_KIND_UNSPECIFIED": 0,
- "SERVER": 1,
- "CLIENT": 2,
-}
-
-func (x Span_SpanKind) String() string {
- return proto.EnumName(Span_SpanKind_name, int32(x))
-}
-func (Span_SpanKind) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{0, 0}
-}
-
-// Indicates whether the message was sent or received.
-type Span_TimeEvent_MessageEvent_Type int32
-
-const (
- // Unknown event type.
- Span_TimeEvent_MessageEvent_TYPE_UNSPECIFIED Span_TimeEvent_MessageEvent_Type = 0
- // Indicates a sent message.
- Span_TimeEvent_MessageEvent_SENT Span_TimeEvent_MessageEvent_Type = 1
- // Indicates a received message.
- Span_TimeEvent_MessageEvent_RECEIVED Span_TimeEvent_MessageEvent_Type = 2
-)
-
-var Span_TimeEvent_MessageEvent_Type_name = map[int32]string{
- 0: "TYPE_UNSPECIFIED",
- 1: "SENT",
- 2: "RECEIVED",
-}
-var Span_TimeEvent_MessageEvent_Type_value = map[string]int32{
- "TYPE_UNSPECIFIED": 0,
- "SENT": 1,
- "RECEIVED": 2,
-}
-
-func (x Span_TimeEvent_MessageEvent_Type) String() string {
- return proto.EnumName(Span_TimeEvent_MessageEvent_Type_name, int32(x))
-}
-func (Span_TimeEvent_MessageEvent_Type) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{0, 2, 1, 0}
-}
-
-// The relationship of the current span relative to the linked span: child,
-// parent, or unspecified.
-type Span_Link_Type int32
-
-const (
- // The relationship of the two spans is unknown, or known but other
- // than parent-child.
- Span_Link_TYPE_UNSPECIFIED Span_Link_Type = 0
- // The linked span is a child of the current span.
- Span_Link_CHILD_LINKED_SPAN Span_Link_Type = 1
- // The linked span is a parent of the current span.
- Span_Link_PARENT_LINKED_SPAN Span_Link_Type = 2
-)
-
-var Span_Link_Type_name = map[int32]string{
- 0: "TYPE_UNSPECIFIED",
- 1: "CHILD_LINKED_SPAN",
- 2: "PARENT_LINKED_SPAN",
-}
-var Span_Link_Type_value = map[string]int32{
- "TYPE_UNSPECIFIED": 0,
- "CHILD_LINKED_SPAN": 1,
- "PARENT_LINKED_SPAN": 2,
-}
-
-func (x Span_Link_Type) String() string {
- return proto.EnumName(Span_Link_Type_name, int32(x))
-}
-func (Span_Link_Type) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{0, 4, 0}
-}
-
-// A span represents a single operation within a trace. Spans can be
-// nested to form a trace tree. Often, a trace contains a root span
-// that describes the end-to-end latency, and one or more subspans for
-// its sub-operations. A trace can also contain multiple root spans,
-// or none at all. Spans do not need to be contiguous - there may be
-// gaps or overlaps between spans in a trace.
-//
-// The next id is 16.
-// TODO(bdrutu): Add an example.
-type Span struct {
- // A unique identifier for a trace. All spans from the same trace share
- // the same `trace_id`. The ID is a 16-byte array.
- //
- // This field is required.
- TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
- // A unique identifier for a span within a trace, assigned when the span
- // is created. The ID is an 8-byte array.
- //
- // This field is required.
- SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
- // The Tracestate on the span.
- Tracestate *Span_Tracestate `protobuf:"bytes,15,opt,name=tracestate,proto3" json:"tracestate,omitempty"`
- // The `span_id` of this span's parent span. If this is a root span, then this
- // field must be empty. The ID is an 8-byte array.
- ParentSpanId []byte `protobuf:"bytes,3,opt,name=parent_span_id,json=parentSpanId,proto3" json:"parent_span_id,omitempty"`
- // A description of the span's operation.
- //
- // For example, the name can be a qualified method name or a file name
- // and a line number where the operation is called. A best practice is to use
- // the same display name at the same call point in an application.
- // This makes it easier to correlate spans in different traces.
- //
- // This field is required.
- Name *TruncatableString `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
- // Distinguishes between spans generated in a particular context. For example,
- // two spans with the same name may be distinguished using `CLIENT`
- // and `SERVER` to identify queueing latency associated with the span.
- Kind Span_SpanKind `protobuf:"varint,14,opt,name=kind,proto3,enum=opencensus.proto.trace.v1.Span_SpanKind" json:"kind,omitempty"`
- // The start time of the span. On the client side, this is the time kept by
- // the local machine where the span execution starts. On the server side, this
- // is the time when the server's application handler starts running.
- StartTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
- // The end time of the span. On the client side, this is the time kept by
- // the local machine where the span execution ends. On the server side, this
- // is the time when the server application handler stops running.
- EndTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
- // A set of attributes on the span.
- Attributes *Span_Attributes `protobuf:"bytes,7,opt,name=attributes,proto3" json:"attributes,omitempty"`
- // A stack trace captured at the start of the span.
- StackTrace *StackTrace `protobuf:"bytes,8,opt,name=stack_trace,json=stackTrace,proto3" json:"stack_trace,omitempty"`
- // The included time events.
- TimeEvents *Span_TimeEvents `protobuf:"bytes,9,opt,name=time_events,json=timeEvents,proto3" json:"time_events,omitempty"`
- // The included links.
- Links *Span_Links `protobuf:"bytes,10,opt,name=links,proto3" json:"links,omitempty"`
- // An optional final status for this span.
- Status *Status `protobuf:"bytes,11,opt,name=status,proto3" json:"status,omitempty"`
- // A highly recommended but not required flag that identifies when a trace
- // crosses a process boundary. True when the parent_span belongs to the
- // same process as the current span.
- SameProcessAsParentSpan *wrappers.BoolValue `protobuf:"bytes,12,opt,name=same_process_as_parent_span,json=sameProcessAsParentSpan,proto3" json:"same_process_as_parent_span,omitempty"`
- // An optional number of child spans that were generated while this span
- // was active. If set, allows an implementation to detect missing child spans.
- ChildSpanCount *wrappers.UInt32Value `protobuf:"bytes,13,opt,name=child_span_count,json=childSpanCount,proto3" json:"child_span_count,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Span) Reset() { *m = Span{} }
-func (m *Span) String() string { return proto.CompactTextString(m) }
-func (*Span) ProtoMessage() {}
-func (*Span) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{0}
-}
-func (m *Span) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Span.Unmarshal(m, b)
-}
-func (m *Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Span.Marshal(b, m, deterministic)
-}
-func (dst *Span) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Span.Merge(dst, src)
-}
-func (m *Span) XXX_Size() int {
- return xxx_messageInfo_Span.Size(m)
-}
-func (m *Span) XXX_DiscardUnknown() {
- xxx_messageInfo_Span.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Span proto.InternalMessageInfo
-
-func (m *Span) GetTraceId() []byte {
- if m != nil {
- return m.TraceId
- }
- return nil
-}
-
-func (m *Span) GetSpanId() []byte {
- if m != nil {
- return m.SpanId
- }
- return nil
-}
-
-func (m *Span) GetTracestate() *Span_Tracestate {
- if m != nil {
- return m.Tracestate
- }
- return nil
-}
-
-func (m *Span) GetParentSpanId() []byte {
- if m != nil {
- return m.ParentSpanId
- }
- return nil
-}
-
-func (m *Span) GetName() *TruncatableString {
- if m != nil {
- return m.Name
- }
- return nil
-}
-
-func (m *Span) GetKind() Span_SpanKind {
- if m != nil {
- return m.Kind
- }
- return Span_SPAN_KIND_UNSPECIFIED
-}
-
-func (m *Span) GetStartTime() *timestamp.Timestamp {
- if m != nil {
- return m.StartTime
- }
- return nil
-}
-
-func (m *Span) GetEndTime() *timestamp.Timestamp {
- if m != nil {
- return m.EndTime
- }
- return nil
-}
-
-func (m *Span) GetAttributes() *Span_Attributes {
- if m != nil {
- return m.Attributes
- }
- return nil
-}
-
-func (m *Span) GetStackTrace() *StackTrace {
- if m != nil {
- return m.StackTrace
- }
- return nil
-}
-
-func (m *Span) GetTimeEvents() *Span_TimeEvents {
- if m != nil {
- return m.TimeEvents
- }
- return nil
-}
-
-func (m *Span) GetLinks() *Span_Links {
- if m != nil {
- return m.Links
- }
- return nil
-}
-
-func (m *Span) GetStatus() *Status {
- if m != nil {
- return m.Status
- }
- return nil
-}
-
-func (m *Span) GetSameProcessAsParentSpan() *wrappers.BoolValue {
- if m != nil {
- return m.SameProcessAsParentSpan
- }
- return nil
-}
-
-func (m *Span) GetChildSpanCount() *wrappers.UInt32Value {
- if m != nil {
- return m.ChildSpanCount
- }
- return nil
-}
-
-// This field conveys information about request position in multiple distributed tracing graphs.
-// It is a list of Tracestate.Entry with a maximum of 32 members in the list.
-//
-// See the https://github.com/w3c/distributed-tracing for more details about this field.
-type Span_Tracestate struct {
- // A list of entries that represent the Tracestate.
- Entries []*Span_Tracestate_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Span_Tracestate) Reset() { *m = Span_Tracestate{} }
-func (m *Span_Tracestate) String() string { return proto.CompactTextString(m) }
-func (*Span_Tracestate) ProtoMessage() {}
-func (*Span_Tracestate) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{0, 0}
-}
-func (m *Span_Tracestate) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Span_Tracestate.Unmarshal(m, b)
-}
-func (m *Span_Tracestate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Span_Tracestate.Marshal(b, m, deterministic)
-}
-func (dst *Span_Tracestate) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Span_Tracestate.Merge(dst, src)
-}
-func (m *Span_Tracestate) XXX_Size() int {
- return xxx_messageInfo_Span_Tracestate.Size(m)
-}
-func (m *Span_Tracestate) XXX_DiscardUnknown() {
- xxx_messageInfo_Span_Tracestate.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Span_Tracestate proto.InternalMessageInfo
-
-func (m *Span_Tracestate) GetEntries() []*Span_Tracestate_Entry {
- if m != nil {
- return m.Entries
- }
- return nil
-}
-
-type Span_Tracestate_Entry struct {
- // The key must begin with a lowercase letter, and can only contain
- // lowercase letters 'a'-'z', digits '0'-'9', underscores '_', dashes
- // '-', asterisks '*', and forward slashes '/'.
- Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
- // The value is opaque string up to 256 characters printable ASCII
- // RFC0020 characters (i.e., the range 0x20 to 0x7E) except ',' and '='.
- // Note that this also excludes tabs, newlines, carriage returns, etc.
- Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Span_Tracestate_Entry) Reset() { *m = Span_Tracestate_Entry{} }
-func (m *Span_Tracestate_Entry) String() string { return proto.CompactTextString(m) }
-func (*Span_Tracestate_Entry) ProtoMessage() {}
-func (*Span_Tracestate_Entry) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{0, 0, 0}
-}
-func (m *Span_Tracestate_Entry) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Span_Tracestate_Entry.Unmarshal(m, b)
-}
-func (m *Span_Tracestate_Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Span_Tracestate_Entry.Marshal(b, m, deterministic)
-}
-func (dst *Span_Tracestate_Entry) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Span_Tracestate_Entry.Merge(dst, src)
-}
-func (m *Span_Tracestate_Entry) XXX_Size() int {
- return xxx_messageInfo_Span_Tracestate_Entry.Size(m)
-}
-func (m *Span_Tracestate_Entry) XXX_DiscardUnknown() {
- xxx_messageInfo_Span_Tracestate_Entry.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Span_Tracestate_Entry proto.InternalMessageInfo
-
-func (m *Span_Tracestate_Entry) GetKey() string {
- if m != nil {
- return m.Key
- }
- return ""
-}
-
-func (m *Span_Tracestate_Entry) GetValue() string {
- if m != nil {
- return m.Value
- }
- return ""
-}
-
-// A set of attributes, each with a key and a value.
-type Span_Attributes struct {
- // The set of attributes. The value can be a string, an integer, or the
- // Boolean values `true` and `false`. For example:
- //
- // "/instance_id": "my-instance"
- // "/http/user_agent": ""
- // "/http/server_latency": 300
- // "abc.com/myattribute": true
- AttributeMap map[string]*AttributeValue `protobuf:"bytes,1,rep,name=attribute_map,json=attributeMap,proto3" json:"attribute_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- // The number of attributes that were discarded. Attributes can be discarded
- // because their keys are too long or because there are too many attributes.
- // If this value is 0, then no attributes were dropped.
- DroppedAttributesCount int32 `protobuf:"varint,2,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Span_Attributes) Reset() { *m = Span_Attributes{} }
-func (m *Span_Attributes) String() string { return proto.CompactTextString(m) }
-func (*Span_Attributes) ProtoMessage() {}
-func (*Span_Attributes) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{0, 1}
-}
-func (m *Span_Attributes) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Span_Attributes.Unmarshal(m, b)
-}
-func (m *Span_Attributes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Span_Attributes.Marshal(b, m, deterministic)
-}
-func (dst *Span_Attributes) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Span_Attributes.Merge(dst, src)
-}
-func (m *Span_Attributes) XXX_Size() int {
- return xxx_messageInfo_Span_Attributes.Size(m)
-}
-func (m *Span_Attributes) XXX_DiscardUnknown() {
- xxx_messageInfo_Span_Attributes.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Span_Attributes proto.InternalMessageInfo
-
-func (m *Span_Attributes) GetAttributeMap() map[string]*AttributeValue {
- if m != nil {
- return m.AttributeMap
- }
- return nil
-}
-
-func (m *Span_Attributes) GetDroppedAttributesCount() int32 {
- if m != nil {
- return m.DroppedAttributesCount
- }
- return 0
-}
-
-// A time-stamped annotation or message event in the Span.
-type Span_TimeEvent struct {
- // The time the event occurred.
- Time *timestamp.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
- // A `TimeEvent` can contain either an `Annotation` object or a
- // `MessageEvent` object, but not both.
- //
- // Types that are valid to be assigned to Value:
- // *Span_TimeEvent_Annotation_
- // *Span_TimeEvent_MessageEvent_
- Value isSpan_TimeEvent_Value `protobuf_oneof:"value"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Span_TimeEvent) Reset() { *m = Span_TimeEvent{} }
-func (m *Span_TimeEvent) String() string { return proto.CompactTextString(m) }
-func (*Span_TimeEvent) ProtoMessage() {}
-func (*Span_TimeEvent) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{0, 2}
-}
-func (m *Span_TimeEvent) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Span_TimeEvent.Unmarshal(m, b)
-}
-func (m *Span_TimeEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Span_TimeEvent.Marshal(b, m, deterministic)
-}
-func (dst *Span_TimeEvent) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Span_TimeEvent.Merge(dst, src)
-}
-func (m *Span_TimeEvent) XXX_Size() int {
- return xxx_messageInfo_Span_TimeEvent.Size(m)
-}
-func (m *Span_TimeEvent) XXX_DiscardUnknown() {
- xxx_messageInfo_Span_TimeEvent.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Span_TimeEvent proto.InternalMessageInfo
-
-func (m *Span_TimeEvent) GetTime() *timestamp.Timestamp {
- if m != nil {
- return m.Time
- }
- return nil
-}
-
-type isSpan_TimeEvent_Value interface {
- isSpan_TimeEvent_Value()
-}
-
-type Span_TimeEvent_Annotation_ struct {
- Annotation *Span_TimeEvent_Annotation `protobuf:"bytes,2,opt,name=annotation,proto3,oneof"`
-}
-
-type Span_TimeEvent_MessageEvent_ struct {
- MessageEvent *Span_TimeEvent_MessageEvent `protobuf:"bytes,3,opt,name=message_event,json=messageEvent,proto3,oneof"`
-}
-
-func (*Span_TimeEvent_Annotation_) isSpan_TimeEvent_Value() {}
-
-func (*Span_TimeEvent_MessageEvent_) isSpan_TimeEvent_Value() {}
-
-func (m *Span_TimeEvent) GetValue() isSpan_TimeEvent_Value {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-func (m *Span_TimeEvent) GetAnnotation() *Span_TimeEvent_Annotation {
- if x, ok := m.GetValue().(*Span_TimeEvent_Annotation_); ok {
- return x.Annotation
- }
- return nil
-}
-
-func (m *Span_TimeEvent) GetMessageEvent() *Span_TimeEvent_MessageEvent {
- if x, ok := m.GetValue().(*Span_TimeEvent_MessageEvent_); ok {
- return x.MessageEvent
- }
- return nil
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*Span_TimeEvent) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _Span_TimeEvent_OneofMarshaler, _Span_TimeEvent_OneofUnmarshaler, _Span_TimeEvent_OneofSizer, []interface{}{
- (*Span_TimeEvent_Annotation_)(nil),
- (*Span_TimeEvent_MessageEvent_)(nil),
- }
-}
-
-func _Span_TimeEvent_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*Span_TimeEvent)
- // value
- switch x := m.Value.(type) {
- case *Span_TimeEvent_Annotation_:
- b.EncodeVarint(2<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Annotation); err != nil {
- return err
- }
- case *Span_TimeEvent_MessageEvent_:
- b.EncodeVarint(3<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.MessageEvent); err != nil {
- return err
- }
- case nil:
- default:
- return fmt.Errorf("Span_TimeEvent.Value has unexpected type %T", x)
- }
- return nil
-}
-
-func _Span_TimeEvent_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*Span_TimeEvent)
- switch tag {
- case 2: // value.annotation
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Span_TimeEvent_Annotation)
- err := b.DecodeMessage(msg)
- m.Value = &Span_TimeEvent_Annotation_{msg}
- return true, err
- case 3: // value.message_event
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Span_TimeEvent_MessageEvent)
- err := b.DecodeMessage(msg)
- m.Value = &Span_TimeEvent_MessageEvent_{msg}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _Span_TimeEvent_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*Span_TimeEvent)
- // value
- switch x := m.Value.(type) {
- case *Span_TimeEvent_Annotation_:
- s := proto.Size(x.Annotation)
- n += 1 // tag and wire
- n += proto.SizeVarint(uint64(s))
- n += s
- case *Span_TimeEvent_MessageEvent_:
- s := proto.Size(x.MessageEvent)
- n += 1 // tag and wire
- n += proto.SizeVarint(uint64(s))
- n += s
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-// A text annotation with a set of attributes.
-type Span_TimeEvent_Annotation struct {
- // A user-supplied message describing the event.
- Description *TruncatableString `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
- // A set of attributes on the annotation.
- Attributes *Span_Attributes `protobuf:"bytes,2,opt,name=attributes,proto3" json:"attributes,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Span_TimeEvent_Annotation) Reset() { *m = Span_TimeEvent_Annotation{} }
-func (m *Span_TimeEvent_Annotation) String() string { return proto.CompactTextString(m) }
-func (*Span_TimeEvent_Annotation) ProtoMessage() {}
-func (*Span_TimeEvent_Annotation) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{0, 2, 0}
-}
-func (m *Span_TimeEvent_Annotation) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Span_TimeEvent_Annotation.Unmarshal(m, b)
-}
-func (m *Span_TimeEvent_Annotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Span_TimeEvent_Annotation.Marshal(b, m, deterministic)
-}
-func (dst *Span_TimeEvent_Annotation) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Span_TimeEvent_Annotation.Merge(dst, src)
-}
-func (m *Span_TimeEvent_Annotation) XXX_Size() int {
- return xxx_messageInfo_Span_TimeEvent_Annotation.Size(m)
-}
-func (m *Span_TimeEvent_Annotation) XXX_DiscardUnknown() {
- xxx_messageInfo_Span_TimeEvent_Annotation.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Span_TimeEvent_Annotation proto.InternalMessageInfo
-
-func (m *Span_TimeEvent_Annotation) GetDescription() *TruncatableString {
- if m != nil {
- return m.Description
- }
- return nil
-}
-
-func (m *Span_TimeEvent_Annotation) GetAttributes() *Span_Attributes {
- if m != nil {
- return m.Attributes
- }
- return nil
-}
-
-// An event describing a message sent/received between Spans.
-type Span_TimeEvent_MessageEvent struct {
- // The type of MessageEvent. Indicates whether the message was sent or
- // received.
- Type Span_TimeEvent_MessageEvent_Type `protobuf:"varint,1,opt,name=type,proto3,enum=opencensus.proto.trace.v1.Span_TimeEvent_MessageEvent_Type" json:"type,omitempty"`
- // An identifier for the MessageEvent's message that can be used to match
- // SENT and RECEIVED MessageEvents. For example, this field could
- // represent a sequence ID for a streaming RPC. It is recommended to be
- // unique within a Span.
- Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
- // The number of uncompressed bytes sent or received.
- UncompressedSize uint64 `protobuf:"varint,3,opt,name=uncompressed_size,json=uncompressedSize,proto3" json:"uncompressed_size,omitempty"`
- // The number of compressed bytes sent or received. If zero, assumed to
- // be the same size as uncompressed.
- CompressedSize uint64 `protobuf:"varint,4,opt,name=compressed_size,json=compressedSize,proto3" json:"compressed_size,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Span_TimeEvent_MessageEvent) Reset() { *m = Span_TimeEvent_MessageEvent{} }
-func (m *Span_TimeEvent_MessageEvent) String() string { return proto.CompactTextString(m) }
-func (*Span_TimeEvent_MessageEvent) ProtoMessage() {}
-func (*Span_TimeEvent_MessageEvent) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{0, 2, 1}
-}
-func (m *Span_TimeEvent_MessageEvent) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Span_TimeEvent_MessageEvent.Unmarshal(m, b)
-}
-func (m *Span_TimeEvent_MessageEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Span_TimeEvent_MessageEvent.Marshal(b, m, deterministic)
-}
-func (dst *Span_TimeEvent_MessageEvent) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Span_TimeEvent_MessageEvent.Merge(dst, src)
-}
-func (m *Span_TimeEvent_MessageEvent) XXX_Size() int {
- return xxx_messageInfo_Span_TimeEvent_MessageEvent.Size(m)
-}
-func (m *Span_TimeEvent_MessageEvent) XXX_DiscardUnknown() {
- xxx_messageInfo_Span_TimeEvent_MessageEvent.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Span_TimeEvent_MessageEvent proto.InternalMessageInfo
-
-func (m *Span_TimeEvent_MessageEvent) GetType() Span_TimeEvent_MessageEvent_Type {
- if m != nil {
- return m.Type
- }
- return Span_TimeEvent_MessageEvent_TYPE_UNSPECIFIED
-}
-
-func (m *Span_TimeEvent_MessageEvent) GetId() uint64 {
- if m != nil {
- return m.Id
- }
- return 0
-}
-
-func (m *Span_TimeEvent_MessageEvent) GetUncompressedSize() uint64 {
- if m != nil {
- return m.UncompressedSize
- }
- return 0
-}
-
-func (m *Span_TimeEvent_MessageEvent) GetCompressedSize() uint64 {
- if m != nil {
- return m.CompressedSize
- }
- return 0
-}
-
-// A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
-// on the span, consisting of either user-supplied key-value pairs, or
-// details of a message sent/received between Spans.
-type Span_TimeEvents struct {
- // A collection of `TimeEvent`s.
- TimeEvent []*Span_TimeEvent `protobuf:"bytes,1,rep,name=time_event,json=timeEvent,proto3" json:"time_event,omitempty"`
- // The number of dropped annotations in all the included time events.
- // If the value is 0, then no annotations were dropped.
- DroppedAnnotationsCount int32 `protobuf:"varint,2,opt,name=dropped_annotations_count,json=droppedAnnotationsCount,proto3" json:"dropped_annotations_count,omitempty"`
- // The number of dropped message events in all the included time events.
- // If the value is 0, then no message events were dropped.
- DroppedMessageEventsCount int32 `protobuf:"varint,3,opt,name=dropped_message_events_count,json=droppedMessageEventsCount,proto3" json:"dropped_message_events_count,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Span_TimeEvents) Reset() { *m = Span_TimeEvents{} }
-func (m *Span_TimeEvents) String() string { return proto.CompactTextString(m) }
-func (*Span_TimeEvents) ProtoMessage() {}
-func (*Span_TimeEvents) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{0, 3}
-}
-func (m *Span_TimeEvents) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Span_TimeEvents.Unmarshal(m, b)
-}
-func (m *Span_TimeEvents) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Span_TimeEvents.Marshal(b, m, deterministic)
-}
-func (dst *Span_TimeEvents) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Span_TimeEvents.Merge(dst, src)
-}
-func (m *Span_TimeEvents) XXX_Size() int {
- return xxx_messageInfo_Span_TimeEvents.Size(m)
-}
-func (m *Span_TimeEvents) XXX_DiscardUnknown() {
- xxx_messageInfo_Span_TimeEvents.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Span_TimeEvents proto.InternalMessageInfo
-
-func (m *Span_TimeEvents) GetTimeEvent() []*Span_TimeEvent {
- if m != nil {
- return m.TimeEvent
- }
- return nil
-}
-
-func (m *Span_TimeEvents) GetDroppedAnnotationsCount() int32 {
- if m != nil {
- return m.DroppedAnnotationsCount
- }
- return 0
-}
-
-func (m *Span_TimeEvents) GetDroppedMessageEventsCount() int32 {
- if m != nil {
- return m.DroppedMessageEventsCount
- }
- return 0
-}
-
-// A pointer from the current span to another span in the same trace or in a
-// different trace. For example, this can be used in batching operations,
-// where a single batch handler processes multiple requests from different
-// traces or when the handler receives a request from a different project.
-type Span_Link struct {
- // A unique identifier for a trace. All spans from the same trace share
- // the same `trace_id`. The ID is a 16-byte array.
- TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
- // A unique identifier for a span within a trace, assigned when the span
- // is created. The ID is an 8-byte array.
- SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
- // The relationship of the current span relative to the linked span.
- Type Span_Link_Type `protobuf:"varint,3,opt,name=type,proto3,enum=opencensus.proto.trace.v1.Span_Link_Type" json:"type,omitempty"`
- // A set of attributes on the link.
- Attributes *Span_Attributes `protobuf:"bytes,4,opt,name=attributes,proto3" json:"attributes,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Span_Link) Reset() { *m = Span_Link{} }
-func (m *Span_Link) String() string { return proto.CompactTextString(m) }
-func (*Span_Link) ProtoMessage() {}
-func (*Span_Link) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{0, 4}
-}
-func (m *Span_Link) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Span_Link.Unmarshal(m, b)
-}
-func (m *Span_Link) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Span_Link.Marshal(b, m, deterministic)
-}
-func (dst *Span_Link) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Span_Link.Merge(dst, src)
-}
-func (m *Span_Link) XXX_Size() int {
- return xxx_messageInfo_Span_Link.Size(m)
-}
-func (m *Span_Link) XXX_DiscardUnknown() {
- xxx_messageInfo_Span_Link.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Span_Link proto.InternalMessageInfo
-
-func (m *Span_Link) GetTraceId() []byte {
- if m != nil {
- return m.TraceId
- }
- return nil
-}
-
-func (m *Span_Link) GetSpanId() []byte {
- if m != nil {
- return m.SpanId
- }
- return nil
-}
-
-func (m *Span_Link) GetType() Span_Link_Type {
- if m != nil {
- return m.Type
- }
- return Span_Link_TYPE_UNSPECIFIED
-}
-
-func (m *Span_Link) GetAttributes() *Span_Attributes {
- if m != nil {
- return m.Attributes
- }
- return nil
-}
-
-// A collection of links, which are references from this span to a span
-// in the same or different trace.
-type Span_Links struct {
- // A collection of links.
- Link []*Span_Link `protobuf:"bytes,1,rep,name=link,proto3" json:"link,omitempty"`
- // The number of dropped links after the maximum size was enforced. If
- // this value is 0, then no links were dropped.
- DroppedLinksCount int32 `protobuf:"varint,2,opt,name=dropped_links_count,json=droppedLinksCount,proto3" json:"dropped_links_count,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Span_Links) Reset() { *m = Span_Links{} }
-func (m *Span_Links) String() string { return proto.CompactTextString(m) }
-func (*Span_Links) ProtoMessage() {}
-func (*Span_Links) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{0, 5}
-}
-func (m *Span_Links) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Span_Links.Unmarshal(m, b)
-}
-func (m *Span_Links) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Span_Links.Marshal(b, m, deterministic)
-}
-func (dst *Span_Links) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Span_Links.Merge(dst, src)
-}
-func (m *Span_Links) XXX_Size() int {
- return xxx_messageInfo_Span_Links.Size(m)
-}
-func (m *Span_Links) XXX_DiscardUnknown() {
- xxx_messageInfo_Span_Links.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Span_Links proto.InternalMessageInfo
-
-func (m *Span_Links) GetLink() []*Span_Link {
- if m != nil {
- return m.Link
- }
- return nil
-}
-
-func (m *Span_Links) GetDroppedLinksCount() int32 {
- if m != nil {
- return m.DroppedLinksCount
- }
- return 0
-}
-
-// The `Status` type defines a logical error model that is suitable for different
-// programming environments, including REST APIs and RPC APIs. This proto's fields
-// are a subset of those of
-// [google.rpc.Status](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto),
-// which is used by [gRPC](https://github.com/grpc).
-type Status struct {
- // The status code.
- Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
- // A developer-facing error message, which should be in English.
- Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Status) Reset() { *m = Status{} }
-func (m *Status) String() string { return proto.CompactTextString(m) }
-func (*Status) ProtoMessage() {}
-func (*Status) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{1}
-}
-func (m *Status) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Status.Unmarshal(m, b)
-}
-func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Status.Marshal(b, m, deterministic)
-}
-func (dst *Status) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Status.Merge(dst, src)
-}
-func (m *Status) XXX_Size() int {
- return xxx_messageInfo_Status.Size(m)
-}
-func (m *Status) XXX_DiscardUnknown() {
- xxx_messageInfo_Status.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Status proto.InternalMessageInfo
-
-func (m *Status) GetCode() int32 {
- if m != nil {
- return m.Code
- }
- return 0
-}
-
-func (m *Status) GetMessage() string {
- if m != nil {
- return m.Message
- }
- return ""
-}
-
-// The value of an Attribute.
-type AttributeValue struct {
- // The type of the value.
- //
- // Types that are valid to be assigned to Value:
- // *AttributeValue_StringValue
- // *AttributeValue_IntValue
- // *AttributeValue_BoolValue
- // *AttributeValue_DoubleValue
- Value isAttributeValue_Value `protobuf_oneof:"value"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *AttributeValue) Reset() { *m = AttributeValue{} }
-func (m *AttributeValue) String() string { return proto.CompactTextString(m) }
-func (*AttributeValue) ProtoMessage() {}
-func (*AttributeValue) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{2}
-}
-func (m *AttributeValue) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_AttributeValue.Unmarshal(m, b)
-}
-func (m *AttributeValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_AttributeValue.Marshal(b, m, deterministic)
-}
-func (dst *AttributeValue) XXX_Merge(src proto.Message) {
- xxx_messageInfo_AttributeValue.Merge(dst, src)
-}
-func (m *AttributeValue) XXX_Size() int {
- return xxx_messageInfo_AttributeValue.Size(m)
-}
-func (m *AttributeValue) XXX_DiscardUnknown() {
- xxx_messageInfo_AttributeValue.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_AttributeValue proto.InternalMessageInfo
-
-type isAttributeValue_Value interface {
- isAttributeValue_Value()
-}
-
-type AttributeValue_StringValue struct {
- StringValue *TruncatableString `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"`
-}
-
-type AttributeValue_IntValue struct {
- IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"`
-}
-
-type AttributeValue_BoolValue struct {
- BoolValue bool `protobuf:"varint,3,opt,name=bool_value,json=boolValue,proto3,oneof"`
-}
-
-type AttributeValue_DoubleValue struct {
- DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof"`
-}
-
-func (*AttributeValue_StringValue) isAttributeValue_Value() {}
-
-func (*AttributeValue_IntValue) isAttributeValue_Value() {}
-
-func (*AttributeValue_BoolValue) isAttributeValue_Value() {}
-
-func (*AttributeValue_DoubleValue) isAttributeValue_Value() {}
-
-func (m *AttributeValue) GetValue() isAttributeValue_Value {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-func (m *AttributeValue) GetStringValue() *TruncatableString {
- if x, ok := m.GetValue().(*AttributeValue_StringValue); ok {
- return x.StringValue
- }
- return nil
-}
-
-func (m *AttributeValue) GetIntValue() int64 {
- if x, ok := m.GetValue().(*AttributeValue_IntValue); ok {
- return x.IntValue
- }
- return 0
-}
-
-func (m *AttributeValue) GetBoolValue() bool {
- if x, ok := m.GetValue().(*AttributeValue_BoolValue); ok {
- return x.BoolValue
- }
- return false
-}
-
-func (m *AttributeValue) GetDoubleValue() float64 {
- if x, ok := m.GetValue().(*AttributeValue_DoubleValue); ok {
- return x.DoubleValue
- }
- return 0
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*AttributeValue) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _AttributeValue_OneofMarshaler, _AttributeValue_OneofUnmarshaler, _AttributeValue_OneofSizer, []interface{}{
- (*AttributeValue_StringValue)(nil),
- (*AttributeValue_IntValue)(nil),
- (*AttributeValue_BoolValue)(nil),
- (*AttributeValue_DoubleValue)(nil),
- }
-}
-
-func _AttributeValue_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*AttributeValue)
- // value
- switch x := m.Value.(type) {
- case *AttributeValue_StringValue:
- b.EncodeVarint(1<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.StringValue); err != nil {
- return err
- }
- case *AttributeValue_IntValue:
- b.EncodeVarint(2<<3 | proto.WireVarint)
- b.EncodeVarint(uint64(x.IntValue))
- case *AttributeValue_BoolValue:
- t := uint64(0)
- if x.BoolValue {
- t = 1
- }
- b.EncodeVarint(3<<3 | proto.WireVarint)
- b.EncodeVarint(t)
- case *AttributeValue_DoubleValue:
- b.EncodeVarint(4<<3 | proto.WireFixed64)
- b.EncodeFixed64(math.Float64bits(x.DoubleValue))
- case nil:
- default:
- return fmt.Errorf("AttributeValue.Value has unexpected type %T", x)
- }
- return nil
-}
-
-func _AttributeValue_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*AttributeValue)
- switch tag {
- case 1: // value.string_value
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(TruncatableString)
- err := b.DecodeMessage(msg)
- m.Value = &AttributeValue_StringValue{msg}
- return true, err
- case 2: // value.int_value
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Value = &AttributeValue_IntValue{int64(x)}
- return true, err
- case 3: // value.bool_value
- if wire != proto.WireVarint {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeVarint()
- m.Value = &AttributeValue_BoolValue{x != 0}
- return true, err
- case 4: // value.double_value
- if wire != proto.WireFixed64 {
- return true, proto.ErrInternalBadWireType
- }
- x, err := b.DecodeFixed64()
- m.Value = &AttributeValue_DoubleValue{math.Float64frombits(x)}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _AttributeValue_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*AttributeValue)
- // value
- switch x := m.Value.(type) {
- case *AttributeValue_StringValue:
- s := proto.Size(x.StringValue)
- n += 1 // tag and wire
- n += proto.SizeVarint(uint64(s))
- n += s
- case *AttributeValue_IntValue:
- n += 1 // tag and wire
- n += proto.SizeVarint(uint64(x.IntValue))
- case *AttributeValue_BoolValue:
- n += 1 // tag and wire
- n += 1
- case *AttributeValue_DoubleValue:
- n += 1 // tag and wire
- n += 8
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-// The call stack which originated this span.
-type StackTrace struct {
- // Stack frames in this stack trace.
- StackFrames *StackTrace_StackFrames `protobuf:"bytes,1,opt,name=stack_frames,json=stackFrames,proto3" json:"stack_frames,omitempty"`
- // The hash ID is used to conserve network bandwidth for duplicate
- // stack traces within a single trace.
- //
- // Often multiple spans will have identical stack traces.
- // The first occurrence of a stack trace should contain both
- // `stack_frames` and a value in `stack_trace_hash_id`.
- //
- // Subsequent spans within the same request can refer
- // to that stack trace by setting only `stack_trace_hash_id`.
- //
- // TODO: describe how to deal with the case where stack_trace_hash_id is
- // zero because it was not set.
- StackTraceHashId uint64 `protobuf:"varint,2,opt,name=stack_trace_hash_id,json=stackTraceHashId,proto3" json:"stack_trace_hash_id,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *StackTrace) Reset() { *m = StackTrace{} }
-func (m *StackTrace) String() string { return proto.CompactTextString(m) }
-func (*StackTrace) ProtoMessage() {}
-func (*StackTrace) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{3}
-}
-func (m *StackTrace) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_StackTrace.Unmarshal(m, b)
-}
-func (m *StackTrace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_StackTrace.Marshal(b, m, deterministic)
-}
-func (dst *StackTrace) XXX_Merge(src proto.Message) {
- xxx_messageInfo_StackTrace.Merge(dst, src)
-}
-func (m *StackTrace) XXX_Size() int {
- return xxx_messageInfo_StackTrace.Size(m)
-}
-func (m *StackTrace) XXX_DiscardUnknown() {
- xxx_messageInfo_StackTrace.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_StackTrace proto.InternalMessageInfo
-
-func (m *StackTrace) GetStackFrames() *StackTrace_StackFrames {
- if m != nil {
- return m.StackFrames
- }
- return nil
-}
-
-func (m *StackTrace) GetStackTraceHashId() uint64 {
- if m != nil {
- return m.StackTraceHashId
- }
- return 0
-}
-
-// A single stack frame in a stack trace.
-type StackTrace_StackFrame struct {
- // The fully-qualified name that uniquely identifies the function or
- // method that is active in this frame.
- FunctionName *TruncatableString `protobuf:"bytes,1,opt,name=function_name,json=functionName,proto3" json:"function_name,omitempty"`
- // An un-mangled function name, if `function_name` is
- // [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can
- // be fully qualified.
- OriginalFunctionName *TruncatableString `protobuf:"bytes,2,opt,name=original_function_name,json=originalFunctionName,proto3" json:"original_function_name,omitempty"`
- // The name of the source file where the function call appears.
- FileName *TruncatableString `protobuf:"bytes,3,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
- // The line number in `file_name` where the function call appears.
- LineNumber int64 `protobuf:"varint,4,opt,name=line_number,json=lineNumber,proto3" json:"line_number,omitempty"`
- // The column number where the function call appears, if available.
- // This is important in JavaScript because of its anonymous functions.
- ColumnNumber int64 `protobuf:"varint,5,opt,name=column_number,json=columnNumber,proto3" json:"column_number,omitempty"`
- // The binary module from where the code was loaded.
- LoadModule *Module `protobuf:"bytes,6,opt,name=load_module,json=loadModule,proto3" json:"load_module,omitempty"`
- // The version of the deployed source code.
- SourceVersion *TruncatableString `protobuf:"bytes,7,opt,name=source_version,json=sourceVersion,proto3" json:"source_version,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *StackTrace_StackFrame) Reset() { *m = StackTrace_StackFrame{} }
-func (m *StackTrace_StackFrame) String() string { return proto.CompactTextString(m) }
-func (*StackTrace_StackFrame) ProtoMessage() {}
-func (*StackTrace_StackFrame) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{3, 0}
-}
-func (m *StackTrace_StackFrame) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_StackTrace_StackFrame.Unmarshal(m, b)
-}
-func (m *StackTrace_StackFrame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_StackTrace_StackFrame.Marshal(b, m, deterministic)
-}
-func (dst *StackTrace_StackFrame) XXX_Merge(src proto.Message) {
- xxx_messageInfo_StackTrace_StackFrame.Merge(dst, src)
-}
-func (m *StackTrace_StackFrame) XXX_Size() int {
- return xxx_messageInfo_StackTrace_StackFrame.Size(m)
-}
-func (m *StackTrace_StackFrame) XXX_DiscardUnknown() {
- xxx_messageInfo_StackTrace_StackFrame.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_StackTrace_StackFrame proto.InternalMessageInfo
-
-func (m *StackTrace_StackFrame) GetFunctionName() *TruncatableString {
- if m != nil {
- return m.FunctionName
- }
- return nil
-}
-
-func (m *StackTrace_StackFrame) GetOriginalFunctionName() *TruncatableString {
- if m != nil {
- return m.OriginalFunctionName
- }
- return nil
-}
-
-func (m *StackTrace_StackFrame) GetFileName() *TruncatableString {
- if m != nil {
- return m.FileName
- }
- return nil
-}
-
-func (m *StackTrace_StackFrame) GetLineNumber() int64 {
- if m != nil {
- return m.LineNumber
- }
- return 0
-}
-
-func (m *StackTrace_StackFrame) GetColumnNumber() int64 {
- if m != nil {
- return m.ColumnNumber
- }
- return 0
-}
-
-func (m *StackTrace_StackFrame) GetLoadModule() *Module {
- if m != nil {
- return m.LoadModule
- }
- return nil
-}
-
-func (m *StackTrace_StackFrame) GetSourceVersion() *TruncatableString {
- if m != nil {
- return m.SourceVersion
- }
- return nil
-}
-
-// A collection of stack frames, which can be truncated.
-type StackTrace_StackFrames struct {
- // Stack frames in this call stack.
- Frame []*StackTrace_StackFrame `protobuf:"bytes,1,rep,name=frame,proto3" json:"frame,omitempty"`
- // The number of stack frames that were dropped because there
- // were too many stack frames.
- // If this value is 0, then no stack frames were dropped.
- DroppedFramesCount int32 `protobuf:"varint,2,opt,name=dropped_frames_count,json=droppedFramesCount,proto3" json:"dropped_frames_count,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *StackTrace_StackFrames) Reset() { *m = StackTrace_StackFrames{} }
-func (m *StackTrace_StackFrames) String() string { return proto.CompactTextString(m) }
-func (*StackTrace_StackFrames) ProtoMessage() {}
-func (*StackTrace_StackFrames) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{3, 1}
-}
-func (m *StackTrace_StackFrames) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_StackTrace_StackFrames.Unmarshal(m, b)
-}
-func (m *StackTrace_StackFrames) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_StackTrace_StackFrames.Marshal(b, m, deterministic)
-}
-func (dst *StackTrace_StackFrames) XXX_Merge(src proto.Message) {
- xxx_messageInfo_StackTrace_StackFrames.Merge(dst, src)
-}
-func (m *StackTrace_StackFrames) XXX_Size() int {
- return xxx_messageInfo_StackTrace_StackFrames.Size(m)
-}
-func (m *StackTrace_StackFrames) XXX_DiscardUnknown() {
- xxx_messageInfo_StackTrace_StackFrames.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_StackTrace_StackFrames proto.InternalMessageInfo
-
-func (m *StackTrace_StackFrames) GetFrame() []*StackTrace_StackFrame {
- if m != nil {
- return m.Frame
- }
- return nil
-}
-
-func (m *StackTrace_StackFrames) GetDroppedFramesCount() int32 {
- if m != nil {
- return m.DroppedFramesCount
- }
- return 0
-}
-
-// A description of a binary module.
-type Module struct {
- // TODO: document the meaning of this field.
- // For example: main binary, kernel modules, and dynamic libraries
- // such as libc.so, sharedlib.so.
- Module *TruncatableString `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"`
- // A unique identifier for the module, usually a hash of its
- // contents.
- BuildId *TruncatableString `protobuf:"bytes,2,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Module) Reset() { *m = Module{} }
-func (m *Module) String() string { return proto.CompactTextString(m) }
-func (*Module) ProtoMessage() {}
-func (*Module) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{4}
-}
-func (m *Module) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Module.Unmarshal(m, b)
-}
-func (m *Module) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Module.Marshal(b, m, deterministic)
-}
-func (dst *Module) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Module.Merge(dst, src)
-}
-func (m *Module) XXX_Size() int {
- return xxx_messageInfo_Module.Size(m)
-}
-func (m *Module) XXX_DiscardUnknown() {
- xxx_messageInfo_Module.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Module proto.InternalMessageInfo
-
-func (m *Module) GetModule() *TruncatableString {
- if m != nil {
- return m.Module
- }
- return nil
-}
-
-func (m *Module) GetBuildId() *TruncatableString {
- if m != nil {
- return m.BuildId
- }
- return nil
-}
-
-// A string that might be shortened to a specified length.
-type TruncatableString struct {
- // The shortened string. For example, if the original string was 500 bytes long and
- // the limit of the string was 128 bytes, then this value contains the first 128
- // bytes of the 500-byte string. Note that truncation always happens on a
- // character boundary, to ensure that a truncated string is still valid UTF-8.
- // Because it may contain multi-byte characters, the size of the truncated string
- // may be less than the truncation limit.
- Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
- // The number of bytes removed from the original string. If this
- // value is 0, then the string was not shortened.
- TruncatedByteCount int32 `protobuf:"varint,2,opt,name=truncated_byte_count,json=truncatedByteCount,proto3" json:"truncated_byte_count,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *TruncatableString) Reset() { *m = TruncatableString{} }
-func (m *TruncatableString) String() string { return proto.CompactTextString(m) }
-func (*TruncatableString) ProtoMessage() {}
-func (*TruncatableString) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_7c01291585a72f8a, []int{5}
-}
-func (m *TruncatableString) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_TruncatableString.Unmarshal(m, b)
-}
-func (m *TruncatableString) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_TruncatableString.Marshal(b, m, deterministic)
-}
-func (dst *TruncatableString) XXX_Merge(src proto.Message) {
- xxx_messageInfo_TruncatableString.Merge(dst, src)
-}
-func (m *TruncatableString) XXX_Size() int {
- return xxx_messageInfo_TruncatableString.Size(m)
-}
-func (m *TruncatableString) XXX_DiscardUnknown() {
- xxx_messageInfo_TruncatableString.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_TruncatableString proto.InternalMessageInfo
-
-func (m *TruncatableString) GetValue() string {
- if m != nil {
- return m.Value
- }
- return ""
-}
-
-func (m *TruncatableString) GetTruncatedByteCount() int32 {
- if m != nil {
- return m.TruncatedByteCount
- }
- return 0
-}
-
-func init() {
- proto.RegisterType((*Span)(nil), "opencensus.proto.trace.v1.Span")
- proto.RegisterType((*Span_Tracestate)(nil), "opencensus.proto.trace.v1.Span.Tracestate")
- proto.RegisterType((*Span_Tracestate_Entry)(nil), "opencensus.proto.trace.v1.Span.Tracestate.Entry")
- proto.RegisterType((*Span_Attributes)(nil), "opencensus.proto.trace.v1.Span.Attributes")
- proto.RegisterMapType((map[string]*AttributeValue)(nil), "opencensus.proto.trace.v1.Span.Attributes.AttributeMapEntry")
- proto.RegisterType((*Span_TimeEvent)(nil), "opencensus.proto.trace.v1.Span.TimeEvent")
- proto.RegisterType((*Span_TimeEvent_Annotation)(nil), "opencensus.proto.trace.v1.Span.TimeEvent.Annotation")
- proto.RegisterType((*Span_TimeEvent_MessageEvent)(nil), "opencensus.proto.trace.v1.Span.TimeEvent.MessageEvent")
- proto.RegisterType((*Span_TimeEvents)(nil), "opencensus.proto.trace.v1.Span.TimeEvents")
- proto.RegisterType((*Span_Link)(nil), "opencensus.proto.trace.v1.Span.Link")
- proto.RegisterType((*Span_Links)(nil), "opencensus.proto.trace.v1.Span.Links")
- proto.RegisterType((*Status)(nil), "opencensus.proto.trace.v1.Status")
- proto.RegisterType((*AttributeValue)(nil), "opencensus.proto.trace.v1.AttributeValue")
- proto.RegisterType((*StackTrace)(nil), "opencensus.proto.trace.v1.StackTrace")
- proto.RegisterType((*StackTrace_StackFrame)(nil), "opencensus.proto.trace.v1.StackTrace.StackFrame")
- proto.RegisterType((*StackTrace_StackFrames)(nil), "opencensus.proto.trace.v1.StackTrace.StackFrames")
- proto.RegisterType((*Module)(nil), "opencensus.proto.trace.v1.Module")
- proto.RegisterType((*TruncatableString)(nil), "opencensus.proto.trace.v1.TruncatableString")
- proto.RegisterEnum("opencensus.proto.trace.v1.Span_SpanKind", Span_SpanKind_name, Span_SpanKind_value)
- proto.RegisterEnum("opencensus.proto.trace.v1.Span_TimeEvent_MessageEvent_Type", Span_TimeEvent_MessageEvent_Type_name, Span_TimeEvent_MessageEvent_Type_value)
- proto.RegisterEnum("opencensus.proto.trace.v1.Span_Link_Type", Span_Link_Type_name, Span_Link_Type_value)
-}
-
-func init() {
- proto.RegisterFile("opencensus/proto/trace/v1/trace.proto", fileDescriptor_trace_7c01291585a72f8a)
-}
-
-var fileDescriptor_trace_7c01291585a72f8a = []byte{
- // 1524 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0x5b, 0x6f, 0x1b, 0xb7,
- 0x12, 0xf6, 0xea, 0xae, 0x91, 0xac, 0xc8, 0x8c, 0x93, 0xc8, 0x3a, 0x39, 0x27, 0x3e, 0x4a, 0x82,
- 0xe3, 0x9c, 0xd6, 0x72, 0xe2, 0xa4, 0x41, 0xae, 0x48, 0x7d, 0x91, 0x2b, 0xc5, 0x8e, 0xaa, 0x50,
- 0x8a, 0xd1, 0x0b, 0x8a, 0xc5, 0x4a, 0x4b, 0xcb, 0x5b, 0x4b, 0xdc, 0xed, 0x92, 0xeb, 0xc2, 0x79,
- 0xeb, 0x53, 0x51, 0xf4, 0xad, 0x40, 0xd1, 0x3f, 0xd0, 0x87, 0xfe, 0x9d, 0xa2, 0xbf, 0xa3, 0xbf,
- 0xa0, 0x2f, 0x05, 0xc9, 0xbd, 0xc9, 0x49, 0x6c, 0x55, 0x79, 0x31, 0xb8, 0xe4, 0x7c, 0x1f, 0x39,
- 0x9c, 0x6f, 0x86, 0x63, 0xc1, 0x4d, 0xdb, 0x21, 0x74, 0x40, 0x28, 0xf3, 0xd8, 0x9a, 0xe3, 0xda,
- 0xdc, 0x5e, 0xe3, 0xae, 0x31, 0x20, 0x6b, 0xc7, 0x77, 0xd4, 0xa0, 0x2e, 0x27, 0xd1, 0x52, 0x64,
- 0xa6, 0x66, 0xea, 0x6a, 0xf5, 0xf8, 0x4e, 0xf5, 0xda, 0xd0, 0xb6, 0x87, 0x23, 0xa2, 0xd0, 0x7d,
- 0xef, 0x60, 0x8d, 0x5b, 0x63, 0xc2, 0xb8, 0x31, 0x76, 0x94, 0x65, 0xf5, 0x3f, 0xa7, 0x0d, 0xbe,
- 0x75, 0x0d, 0xc7, 0x21, 0xae, 0xcf, 0x54, 0xfb, 0xee, 0x12, 0xa4, 0xba, 0x8e, 0x41, 0xd1, 0x12,
- 0xe4, 0x24, 0xab, 0x6e, 0x99, 0x15, 0x6d, 0x59, 0x5b, 0x29, 0xe2, 0xac, 0xfc, 0x6e, 0x99, 0xe8,
- 0x0a, 0x64, 0x99, 0x63, 0x50, 0xb1, 0x92, 0x90, 0x2b, 0x19, 0xf1, 0xd9, 0x32, 0xd1, 0x73, 0x00,
- 0x69, 0xc3, 0xb8, 0xc1, 0x49, 0xe5, 0xc2, 0xb2, 0xb6, 0x52, 0x58, 0xff, 0x7f, 0xfd, 0x9d, 0xa7,
- 0xad, 0x8b, 0x8d, 0xea, 0xbd, 0x10, 0x81, 0x63, 0x68, 0x74, 0x03, 0x4a, 0x8e, 0xe1, 0x12, 0xca,
- 0xf5, 0x60, 0xaf, 0xa4, 0xdc, 0xab, 0xa8, 0x66, 0xbb, 0x6a, 0xc7, 0x8f, 0x21, 0x45, 0x8d, 0x31,
- 0xa9, 0xa4, 0xe4, 0x5e, 0x1f, 0x9e, 0xb1, 0x57, 0xcf, 0xf5, 0xe8, 0xc0, 0xe0, 0x46, 0x7f, 0x44,
- 0xba, 0xdc, 0xb5, 0xe8, 0x10, 0x4b, 0x24, 0x7a, 0x02, 0xa9, 0x23, 0x8b, 0x9a, 0x95, 0xd2, 0xb2,
- 0xb6, 0x52, 0x5a, 0x5f, 0x39, 0xef, 0xb4, 0xe2, 0xcf, 0xae, 0x45, 0x4d, 0x2c, 0x51, 0xe8, 0x21,
- 0x00, 0xe3, 0x86, 0xcb, 0x75, 0x71, 0xcf, 0x95, 0xb4, 0x3c, 0x45, 0xb5, 0xae, 0xee, 0xb8, 0x1e,
- 0xdc, 0x71, 0xbd, 0x17, 0x04, 0x01, 0xe7, 0xa5, 0xb5, 0xf8, 0x46, 0x1f, 0x41, 0x8e, 0x50, 0x53,
- 0x01, 0x33, 0xe7, 0x02, 0xb3, 0x84, 0x9a, 0x12, 0xf6, 0x1c, 0xc0, 0xe0, 0xdc, 0xb5, 0xfa, 0x1e,
- 0x27, 0xac, 0x92, 0x9d, 0xee, 0x8e, 0x37, 0x42, 0x04, 0x8e, 0xa1, 0xd1, 0x0e, 0x14, 0x18, 0x37,
- 0x06, 0x47, 0xba, 0xb4, 0xae, 0xe4, 0x24, 0xd9, 0xcd, 0xb3, 0xc8, 0x84, 0xb5, 0x0c, 0x18, 0x06,
- 0x16, 0x8e, 0xd1, 0x2e, 0x14, 0x84, 0x1b, 0x3a, 0x39, 0x26, 0x94, 0xb3, 0x4a, 0x7e, 0xca, 0xc0,
- 0x5b, 0x63, 0xd2, 0x90, 0x08, 0x0c, 0x3c, 0x1c, 0xa3, 0xc7, 0x90, 0x1e, 0x59, 0xf4, 0x88, 0x55,
- 0xe0, 0xfc, 0xe3, 0x08, 0x9a, 0x3d, 0x61, 0x8c, 0x15, 0x06, 0x3d, 0x84, 0x8c, 0x90, 0x8f, 0xc7,
- 0x2a, 0x05, 0x89, 0xfe, 0xef, 0xd9, 0xce, 0x70, 0x8f, 0x61, 0x1f, 0x80, 0x3e, 0x83, 0x7f, 0x31,
- 0x63, 0x4c, 0x74, 0xc7, 0xb5, 0x07, 0x84, 0x31, 0xdd, 0x60, 0x7a, 0x4c, 0x80, 0x95, 0xe2, 0x3b,
- 0x42, 0xb4, 0x69, 0xdb, 0xa3, 0x7d, 0x63, 0xe4, 0x11, 0x7c, 0x45, 0xc0, 0x3b, 0x0a, 0xbd, 0xc1,
- 0x3a, 0xa1, 0x4c, 0xd1, 0x0e, 0x94, 0x07, 0x87, 0xd6, 0xc8, 0x54, 0x4a, 0x1e, 0xd8, 0x1e, 0xe5,
- 0x95, 0x79, 0x49, 0x77, 0xf5, 0x0d, 0xba, 0x57, 0x2d, 0xca, 0xef, 0xae, 0x2b, 0xc2, 0x92, 0x44,
- 0x09, 0x8a, 0x2d, 0x81, 0xa9, 0xfe, 0xa0, 0x01, 0x44, 0xd9, 0x82, 0x9e, 0x43, 0x96, 0x50, 0xee,
- 0x5a, 0x84, 0x55, 0xb4, 0xe5, 0xe4, 0x4a, 0x61, 0xfd, 0xf6, 0xf4, 0xa9, 0x56, 0x6f, 0x50, 0xee,
- 0x9e, 0xe0, 0x80, 0xa0, 0xba, 0x06, 0x69, 0x39, 0x83, 0xca, 0x90, 0x3c, 0x22, 0x27, 0x32, 0xe3,
- 0xf3, 0x58, 0x0c, 0xd1, 0x22, 0xa4, 0x8f, 0xc5, 0x71, 0x64, 0xae, 0xe7, 0xb1, 0xfa, 0xa8, 0xfe,
- 0x9c, 0x00, 0x88, 0x54, 0x85, 0x0c, 0x98, 0x0f, 0x75, 0xa5, 0x8f, 0x0d, 0xc7, 0x3f, 0xd1, 0x93,
- 0xe9, 0x85, 0x19, 0x0d, 0x5f, 0x18, 0x8e, 0x3a, 0x5d, 0xd1, 0x88, 0x4d, 0xa1, 0x07, 0x50, 0x31,
- 0x5d, 0xdb, 0x71, 0x88, 0xa9, 0x47, 0x12, 0xf6, 0x6f, 0x53, 0x1c, 0x2d, 0x8d, 0x2f, 0xfb, 0xeb,
- 0x11, 0xa9, 0xba, 0xb7, 0xaf, 0x61, 0xe1, 0x0d, 0xf2, 0xb7, 0x38, 0xfa, 0x2c, 0xee, 0x68, 0x61,
- 0xfd, 0xd6, 0x19, 0x67, 0x0f, 0xe9, 0x54, 0xa0, 0x14, 0xee, 0x51, 0xe2, 0x81, 0x56, 0xfd, 0x35,
- 0x0d, 0xf9, 0x50, 0xd8, 0xa8, 0x0e, 0x29, 0x99, 0xdf, 0xda, 0xb9, 0xf9, 0x2d, 0xed, 0xd0, 0x3e,
- 0x80, 0x41, 0xa9, 0xcd, 0x0d, 0x6e, 0xd9, 0xd4, 0x3f, 0xc7, 0xbd, 0xa9, 0xf3, 0xa8, 0xbe, 0x11,
- 0x62, 0x9b, 0x73, 0x38, 0xc6, 0x84, 0xbe, 0x82, 0xf9, 0x31, 0x61, 0xcc, 0x18, 0xfa, 0x39, 0x2a,
- 0x6b, 0x69, 0x61, 0xfd, 0xfe, 0xf4, 0xd4, 0x2f, 0x14, 0x5c, 0x7e, 0x34, 0xe7, 0x70, 0x71, 0x1c,
- 0xfb, 0xae, 0xfe, 0xa6, 0x01, 0x44, 0x7b, 0xa3, 0x36, 0x14, 0x4c, 0xc2, 0x06, 0xae, 0xe5, 0x48,
- 0x37, 0xb4, 0x19, 0x6a, 0x73, 0x9c, 0xe0, 0x54, 0xc9, 0x4b, 0xbc, 0x4f, 0xc9, 0xab, 0xfe, 0xa5,
- 0x41, 0x31, 0xee, 0x0b, 0xfa, 0x14, 0x52, 0xfc, 0xc4, 0x51, 0x21, 0x2a, 0xad, 0x3f, 0x9e, 0xed,
- 0x46, 0xea, 0xbd, 0x13, 0x87, 0x60, 0x49, 0x84, 0x4a, 0x90, 0xf0, 0x1f, 0xc6, 0x14, 0x4e, 0x58,
- 0x26, 0xfa, 0x00, 0x16, 0x3c, 0x3a, 0xb0, 0xc7, 0x8e, 0x4b, 0x18, 0x23, 0xa6, 0xce, 0xac, 0xd7,
- 0x44, 0xde, 0x7f, 0x0a, 0x97, 0xe3, 0x0b, 0x5d, 0xeb, 0x35, 0x41, 0xff, 0x83, 0x0b, 0xa7, 0x4d,
- 0x53, 0xd2, 0xb4, 0x34, 0x69, 0x58, 0xbb, 0x07, 0x29, 0xb1, 0x27, 0x5a, 0x84, 0x72, 0xef, 0xf3,
- 0x4e, 0x43, 0x7f, 0xd5, 0xee, 0x76, 0x1a, 0x5b, 0xad, 0x9d, 0x56, 0x63, 0xbb, 0x3c, 0x87, 0x72,
- 0x90, 0xea, 0x36, 0xda, 0xbd, 0xb2, 0x86, 0x8a, 0x90, 0xc3, 0x8d, 0xad, 0x46, 0x6b, 0xbf, 0xb1,
- 0x5d, 0x4e, 0x6c, 0x66, 0x7d, 0x89, 0x57, 0xff, 0x10, 0xa5, 0x24, 0xaa, 0xb9, 0x4d, 0x80, 0xa8,
- 0x80, 0xfb, 0xb9, 0x7b, 0x6b, 0xea, 0xab, 0xc0, 0xf9, 0xb0, 0x7c, 0xa3, 0x47, 0xb0, 0x14, 0x66,
- 0x69, 0xa8, 0x88, 0xc9, 0x34, 0xbd, 0x12, 0xa4, 0x69, 0xb4, 0x2e, 0xf3, 0x14, 0x3d, 0x83, 0xab,
- 0x01, 0x76, 0x42, 0xad, 0x01, 0x3c, 0x29, 0xe1, 0x01, 0x7f, 0xfc, 0xfe, 0xfd, 0x44, 0xff, 0x29,
- 0x01, 0x29, 0xf1, 0x1c, 0xcc, 0xd4, 0xbc, 0x3c, 0xf5, 0x85, 0x90, 0x94, 0x42, 0xb8, 0x35, 0xcd,
- 0xb3, 0x13, 0x0f, 0xfb, 0xa4, 0x48, 0x53, 0xef, 0x23, 0xd2, 0xda, 0xee, 0x99, 0xc1, 0xbd, 0x04,
- 0x0b, 0x5b, 0xcd, 0xd6, 0xde, 0xb6, 0xbe, 0xd7, 0x6a, 0xef, 0x36, 0xb6, 0xf5, 0x6e, 0x67, 0xa3,
- 0x5d, 0xd6, 0xd0, 0x65, 0x40, 0x9d, 0x0d, 0xdc, 0x68, 0xf7, 0x26, 0xe6, 0x13, 0xd5, 0x6f, 0x20,
- 0x2d, 0x9f, 0x48, 0xf4, 0x00, 0x52, 0xe2, 0x91, 0xf4, 0xc3, 0x7b, 0x63, 0x1a, 0x07, 0xb1, 0x44,
- 0xa0, 0x3a, 0x5c, 0x0c, 0x02, 0x23, 0x9f, 0xd9, 0x89, 0x70, 0x2e, 0xf8, 0x4b, 0x72, 0x13, 0x19,
- 0x87, 0xda, 0x53, 0xc8, 0x05, 0x7d, 0x12, 0x5a, 0x82, 0x4b, 0xe2, 0x20, 0xfa, 0x6e, 0xab, 0xbd,
- 0x7d, 0xca, 0x11, 0x80, 0x4c, 0xb7, 0x81, 0xf7, 0x1b, 0xb8, 0xac, 0x89, 0xf1, 0xd6, 0x5e, 0x4b,
- 0x68, 0x36, 0x51, 0xbb, 0x0f, 0x19, 0xf5, 0x36, 0x23, 0x04, 0xa9, 0x81, 0x6d, 0xaa, 0xe4, 0x4c,
- 0x63, 0x39, 0x46, 0x15, 0xc8, 0xfa, 0xea, 0xf0, 0x5f, 0xa4, 0xe0, 0xb3, 0xf6, 0xbb, 0x06, 0xa5,
- 0xc9, 0xca, 0x8c, 0x5e, 0x42, 0x91, 0xc9, 0x8a, 0xa2, 0xab, 0xd2, 0x3e, 0x43, 0x2d, 0x6a, 0xce,
- 0xe1, 0x82, 0xe2, 0x50, 0x94, 0xff, 0x86, 0xbc, 0x45, 0xb9, 0x1e, 0x3d, 0x15, 0xc9, 0xe6, 0x1c,
- 0xce, 0x59, 0x94, 0xab, 0xe5, 0x6b, 0x00, 0x7d, 0xdb, 0x1e, 0xf9, 0xeb, 0x42, 0x4c, 0xb9, 0xe6,
- 0x1c, 0xce, 0xf7, 0x83, 0x36, 0x01, 0x5d, 0x87, 0xa2, 0x69, 0x7b, 0xfd, 0x11, 0xf1, 0x4d, 0x84,
- 0x54, 0x34, 0xb1, 0x89, 0x9a, 0x95, 0x46, 0x61, 0xa2, 0xd6, 0x7e, 0xcc, 0x00, 0x44, 0x5d, 0x17,
- 0xea, 0x09, 0x7f, 0x44, 0xc7, 0x76, 0xe0, 0x1a, 0x63, 0xf9, 0xf0, 0x0b, 0x7f, 0xee, 0x4c, 0xd5,
- 0xb2, 0xa9, 0xe1, 0x8e, 0x04, 0x62, 0xd5, 0xf8, 0xa9, 0x0f, 0xb4, 0x0a, 0x17, 0x63, 0x7d, 0xa0,
- 0x7e, 0x68, 0xb0, 0x43, 0x3d, 0xac, 0x61, 0xe5, 0xa8, 0xd1, 0x6b, 0x1a, 0xec, 0xb0, 0x65, 0x56,
- 0xff, 0x4c, 0xfa, 0x67, 0x92, 0x70, 0xf4, 0x12, 0xe6, 0x0f, 0x3c, 0x3a, 0x10, 0x89, 0xac, 0xcb,
- 0x66, 0x7c, 0x96, 0x82, 0x5f, 0x0c, 0x28, 0xda, 0x82, 0xb2, 0x0f, 0x97, 0x6d, 0xd7, 0x1a, 0x5a,
- 0xd4, 0x18, 0xe9, 0x93, 0xdc, 0x89, 0x19, 0xb8, 0x17, 0x03, 0xae, 0x9d, 0xf8, 0x1e, 0x2d, 0xc8,
- 0x1f, 0x58, 0x23, 0xa2, 0x68, 0x93, 0x33, 0xd0, 0xe6, 0x04, 0x5c, 0x52, 0x5d, 0x83, 0xc2, 0xc8,
- 0xa2, 0x44, 0xa7, 0xde, 0xb8, 0x4f, 0x5c, 0x19, 0xd1, 0x24, 0x06, 0x31, 0xd5, 0x96, 0x33, 0xe8,
- 0x3a, 0xcc, 0x0f, 0xec, 0x91, 0x37, 0xa6, 0x81, 0x49, 0x5a, 0x9a, 0x14, 0xd5, 0xa4, 0x6f, 0xb4,
- 0x09, 0x85, 0x91, 0x6d, 0x98, 0xfa, 0xd8, 0x36, 0xbd, 0x51, 0xf0, 0x3f, 0xc1, 0x59, 0x0d, 0xec,
- 0x0b, 0x69, 0x88, 0x41, 0xa0, 0xd4, 0x18, 0x75, 0xa1, 0xc4, 0x6c, 0xcf, 0x1d, 0x10, 0xfd, 0x98,
- 0xb8, 0x4c, 0xbc, 0xbe, 0xd9, 0x19, 0x3c, 0x9b, 0x57, 0x1c, 0xfb, 0x8a, 0xa2, 0xfa, 0xbd, 0x06,
- 0x85, 0x98, 0x76, 0xd0, 0x0e, 0xa4, 0xa5, 0xfc, 0xa6, 0x69, 0x3b, 0xdf, 0xa6, 0x3e, 0xac, 0xe0,
- 0xe8, 0x36, 0x2c, 0x06, 0x65, 0x45, 0xc9, 0x79, 0xa2, 0xae, 0x20, 0x7f, 0x4d, 0x6d, 0xaa, 0x0a,
- 0xcb, 0x2f, 0x1a, 0x64, 0x7c, 0x4f, 0xb7, 0x21, 0xe3, 0x5f, 0xd4, 0x2c, 0x72, 0xf3, 0xb1, 0xe8,
- 0x13, 0xc8, 0xf5, 0x3d, 0xd1, 0x9a, 0xfb, 0x72, 0xff, 0xa7, 0x3c, 0x59, 0x89, 0x6e, 0x99, 0xb5,
- 0x2f, 0x61, 0xe1, 0x8d, 0xd5, 0xa8, 0x75, 0xd6, 0x62, 0xad, 0xb3, 0x70, 0x9b, 0x2b, 0x53, 0x62,
- 0xea, 0xfd, 0x13, 0x4e, 0x26, 0xdd, 0x0e, 0xd7, 0x36, 0x4f, 0x38, 0x91, 0x6e, 0x6f, 0x3a, 0x70,
- 0xd5, 0xb2, 0xdf, 0x7d, 0xae, 0x4d, 0xf5, 0x5f, 0x41, 0x47, 0x4c, 0x76, 0xb4, 0x2f, 0x36, 0x87,
- 0x16, 0x3f, 0xf4, 0xfa, 0xf5, 0x81, 0x3d, 0x5e, 0x53, 0xf6, 0xab, 0x16, 0x65, 0xdc, 0xf5, 0xc6,
- 0x84, 0xaa, 0xf7, 0x76, 0x2d, 0xa2, 0x5a, 0x55, 0xbf, 0x33, 0x0c, 0x09, 0x5d, 0x1d, 0x46, 0x3f,
- 0x37, 0xf4, 0x33, 0x72, 0xfa, 0xee, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x5e, 0xa6, 0x6a,
- 0x92, 0x10, 0x00, 0x00,
-}
diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace_config.pb.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace_config.pb.go
deleted file mode 100644
index 435bf52d57..0000000000
--- a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace_config.pb.go
+++ /dev/null
@@ -1,400 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: opencensus/proto/trace/v1/trace_config.proto
-
-package v1 // import "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1"
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-// Global configuration of the trace service.
-type TraceConfig struct {
- // The global default sampler used to make decisions on span sampling.
- //
- // Types that are valid to be assigned to Sampler:
- // *TraceConfig_ProbabilitySampler
- // *TraceConfig_ConstantSampler
- // *TraceConfig_RateLimitingSampler
- Sampler isTraceConfig_Sampler `protobuf_oneof:"sampler"`
- // The global default max number of attributes per span.
- MaxNumberOfAttributes int64 `protobuf:"varint,4,opt,name=max_number_of_attributes,json=maxNumberOfAttributes,proto3" json:"max_number_of_attributes,omitempty"`
- // The global default max number of annotation events per span.
- MaxNumberOfAnnotations int64 `protobuf:"varint,5,opt,name=max_number_of_annotations,json=maxNumberOfAnnotations,proto3" json:"max_number_of_annotations,omitempty"`
- // The global default max number of message events per span.
- MaxNumberOfMessageEvents int64 `protobuf:"varint,6,opt,name=max_number_of_message_events,json=maxNumberOfMessageEvents,proto3" json:"max_number_of_message_events,omitempty"`
- // The global default max number of link entries per span.
- MaxNumberOfLinks int64 `protobuf:"varint,7,opt,name=max_number_of_links,json=maxNumberOfLinks,proto3" json:"max_number_of_links,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *TraceConfig) Reset() { *m = TraceConfig{} }
-func (m *TraceConfig) String() string { return proto.CompactTextString(m) }
-func (*TraceConfig) ProtoMessage() {}
-func (*TraceConfig) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_config_2f6d4a0dc67515b2, []int{0}
-}
-func (m *TraceConfig) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_TraceConfig.Unmarshal(m, b)
-}
-func (m *TraceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_TraceConfig.Marshal(b, m, deterministic)
-}
-func (dst *TraceConfig) XXX_Merge(src proto.Message) {
- xxx_messageInfo_TraceConfig.Merge(dst, src)
-}
-func (m *TraceConfig) XXX_Size() int {
- return xxx_messageInfo_TraceConfig.Size(m)
-}
-func (m *TraceConfig) XXX_DiscardUnknown() {
- xxx_messageInfo_TraceConfig.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_TraceConfig proto.InternalMessageInfo
-
-type isTraceConfig_Sampler interface {
- isTraceConfig_Sampler()
-}
-
-type TraceConfig_ProbabilitySampler struct {
- ProbabilitySampler *ProbabilitySampler `protobuf:"bytes,1,opt,name=probability_sampler,json=probabilitySampler,proto3,oneof"`
-}
-
-type TraceConfig_ConstantSampler struct {
- ConstantSampler *ConstantSampler `protobuf:"bytes,2,opt,name=constant_sampler,json=constantSampler,proto3,oneof"`
-}
-
-type TraceConfig_RateLimitingSampler struct {
- RateLimitingSampler *RateLimitingSampler `protobuf:"bytes,3,opt,name=rate_limiting_sampler,json=rateLimitingSampler,proto3,oneof"`
-}
-
-func (*TraceConfig_ProbabilitySampler) isTraceConfig_Sampler() {}
-
-func (*TraceConfig_ConstantSampler) isTraceConfig_Sampler() {}
-
-func (*TraceConfig_RateLimitingSampler) isTraceConfig_Sampler() {}
-
-func (m *TraceConfig) GetSampler() isTraceConfig_Sampler {
- if m != nil {
- return m.Sampler
- }
- return nil
-}
-
-func (m *TraceConfig) GetProbabilitySampler() *ProbabilitySampler {
- if x, ok := m.GetSampler().(*TraceConfig_ProbabilitySampler); ok {
- return x.ProbabilitySampler
- }
- return nil
-}
-
-func (m *TraceConfig) GetConstantSampler() *ConstantSampler {
- if x, ok := m.GetSampler().(*TraceConfig_ConstantSampler); ok {
- return x.ConstantSampler
- }
- return nil
-}
-
-func (m *TraceConfig) GetRateLimitingSampler() *RateLimitingSampler {
- if x, ok := m.GetSampler().(*TraceConfig_RateLimitingSampler); ok {
- return x.RateLimitingSampler
- }
- return nil
-}
-
-func (m *TraceConfig) GetMaxNumberOfAttributes() int64 {
- if m != nil {
- return m.MaxNumberOfAttributes
- }
- return 0
-}
-
-func (m *TraceConfig) GetMaxNumberOfAnnotations() int64 {
- if m != nil {
- return m.MaxNumberOfAnnotations
- }
- return 0
-}
-
-func (m *TraceConfig) GetMaxNumberOfMessageEvents() int64 {
- if m != nil {
- return m.MaxNumberOfMessageEvents
- }
- return 0
-}
-
-func (m *TraceConfig) GetMaxNumberOfLinks() int64 {
- if m != nil {
- return m.MaxNumberOfLinks
- }
- return 0
-}
-
-// XXX_OneofFuncs is for the internal use of the proto package.
-func (*TraceConfig) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _TraceConfig_OneofMarshaler, _TraceConfig_OneofUnmarshaler, _TraceConfig_OneofSizer, []interface{}{
- (*TraceConfig_ProbabilitySampler)(nil),
- (*TraceConfig_ConstantSampler)(nil),
- (*TraceConfig_RateLimitingSampler)(nil),
- }
-}
-
-func _TraceConfig_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*TraceConfig)
- // sampler
- switch x := m.Sampler.(type) {
- case *TraceConfig_ProbabilitySampler:
- b.EncodeVarint(1<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.ProbabilitySampler); err != nil {
- return err
- }
- case *TraceConfig_ConstantSampler:
- b.EncodeVarint(2<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.ConstantSampler); err != nil {
- return err
- }
- case *TraceConfig_RateLimitingSampler:
- b.EncodeVarint(3<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.RateLimitingSampler); err != nil {
- return err
- }
- case nil:
- default:
- return fmt.Errorf("TraceConfig.Sampler has unexpected type %T", x)
- }
- return nil
-}
-
-func _TraceConfig_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*TraceConfig)
- switch tag {
- case 1: // sampler.probability_sampler
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(ProbabilitySampler)
- err := b.DecodeMessage(msg)
- m.Sampler = &TraceConfig_ProbabilitySampler{msg}
- return true, err
- case 2: // sampler.constant_sampler
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(ConstantSampler)
- err := b.DecodeMessage(msg)
- m.Sampler = &TraceConfig_ConstantSampler{msg}
- return true, err
- case 3: // sampler.rate_limiting_sampler
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(RateLimitingSampler)
- err := b.DecodeMessage(msg)
- m.Sampler = &TraceConfig_RateLimitingSampler{msg}
- return true, err
- default:
- return false, nil
- }
-}
-
-func _TraceConfig_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*TraceConfig)
- // sampler
- switch x := m.Sampler.(type) {
- case *TraceConfig_ProbabilitySampler:
- s := proto.Size(x.ProbabilitySampler)
- n += 1 // tag and wire
- n += proto.SizeVarint(uint64(s))
- n += s
- case *TraceConfig_ConstantSampler:
- s := proto.Size(x.ConstantSampler)
- n += 1 // tag and wire
- n += proto.SizeVarint(uint64(s))
- n += s
- case *TraceConfig_RateLimitingSampler:
- s := proto.Size(x.RateLimitingSampler)
- n += 1 // tag and wire
- n += proto.SizeVarint(uint64(s))
- n += s
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
-}
-
-// Sampler that tries to uniformly sample traces with a given probability.
-// The probability of sampling a trace is equal to that of the specified probability.
-type ProbabilitySampler struct {
- // The desired probability of sampling. Must be within [0.0, 1.0].
- SamplingProbability float64 `protobuf:"fixed64,1,opt,name=samplingProbability,proto3" json:"samplingProbability,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *ProbabilitySampler) Reset() { *m = ProbabilitySampler{} }
-func (m *ProbabilitySampler) String() string { return proto.CompactTextString(m) }
-func (*ProbabilitySampler) ProtoMessage() {}
-func (*ProbabilitySampler) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_config_2f6d4a0dc67515b2, []int{1}
-}
-func (m *ProbabilitySampler) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ProbabilitySampler.Unmarshal(m, b)
-}
-func (m *ProbabilitySampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ProbabilitySampler.Marshal(b, m, deterministic)
-}
-func (dst *ProbabilitySampler) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ProbabilitySampler.Merge(dst, src)
-}
-func (m *ProbabilitySampler) XXX_Size() int {
- return xxx_messageInfo_ProbabilitySampler.Size(m)
-}
-func (m *ProbabilitySampler) XXX_DiscardUnknown() {
- xxx_messageInfo_ProbabilitySampler.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ProbabilitySampler proto.InternalMessageInfo
-
-func (m *ProbabilitySampler) GetSamplingProbability() float64 {
- if m != nil {
- return m.SamplingProbability
- }
- return 0
-}
-
-// Sampler that makes a constant decision (either always "yes" or always "no")
-// on span sampling.
-type ConstantSampler struct {
- // Whether spans should be always sampled, or never sampled.
- Decision bool `protobuf:"varint,1,opt,name=decision,proto3" json:"decision,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *ConstantSampler) Reset() { *m = ConstantSampler{} }
-func (m *ConstantSampler) String() string { return proto.CompactTextString(m) }
-func (*ConstantSampler) ProtoMessage() {}
-func (*ConstantSampler) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_config_2f6d4a0dc67515b2, []int{2}
-}
-func (m *ConstantSampler) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ConstantSampler.Unmarshal(m, b)
-}
-func (m *ConstantSampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ConstantSampler.Marshal(b, m, deterministic)
-}
-func (dst *ConstantSampler) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ConstantSampler.Merge(dst, src)
-}
-func (m *ConstantSampler) XXX_Size() int {
- return xxx_messageInfo_ConstantSampler.Size(m)
-}
-func (m *ConstantSampler) XXX_DiscardUnknown() {
- xxx_messageInfo_ConstantSampler.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ConstantSampler proto.InternalMessageInfo
-
-func (m *ConstantSampler) GetDecision() bool {
- if m != nil {
- return m.Decision
- }
- return false
-}
-
-// Sampler that tries to sample with a rate per time window.
-type RateLimitingSampler struct {
- // Rate per second.
- Qps int64 `protobuf:"varint,1,opt,name=qps,proto3" json:"qps,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *RateLimitingSampler) Reset() { *m = RateLimitingSampler{} }
-func (m *RateLimitingSampler) String() string { return proto.CompactTextString(m) }
-func (*RateLimitingSampler) ProtoMessage() {}
-func (*RateLimitingSampler) Descriptor() ([]byte, []int) {
- return fileDescriptor_trace_config_2f6d4a0dc67515b2, []int{3}
-}
-func (m *RateLimitingSampler) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_RateLimitingSampler.Unmarshal(m, b)
-}
-func (m *RateLimitingSampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_RateLimitingSampler.Marshal(b, m, deterministic)
-}
-func (dst *RateLimitingSampler) XXX_Merge(src proto.Message) {
- xxx_messageInfo_RateLimitingSampler.Merge(dst, src)
-}
-func (m *RateLimitingSampler) XXX_Size() int {
- return xxx_messageInfo_RateLimitingSampler.Size(m)
-}
-func (m *RateLimitingSampler) XXX_DiscardUnknown() {
- xxx_messageInfo_RateLimitingSampler.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_RateLimitingSampler proto.InternalMessageInfo
-
-func (m *RateLimitingSampler) GetQps() int64 {
- if m != nil {
- return m.Qps
- }
- return 0
-}
-
-func init() {
- proto.RegisterType((*TraceConfig)(nil), "opencensus.proto.trace.v1.TraceConfig")
- proto.RegisterType((*ProbabilitySampler)(nil), "opencensus.proto.trace.v1.ProbabilitySampler")
- proto.RegisterType((*ConstantSampler)(nil), "opencensus.proto.trace.v1.ConstantSampler")
- proto.RegisterType((*RateLimitingSampler)(nil), "opencensus.proto.trace.v1.RateLimitingSampler")
-}
-
-func init() {
- proto.RegisterFile("opencensus/proto/trace/v1/trace_config.proto", fileDescriptor_trace_config_2f6d4a0dc67515b2)
-}
-
-var fileDescriptor_trace_config_2f6d4a0dc67515b2 = []byte{
- // 431 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x41, 0x6f, 0xd4, 0x30,
- 0x10, 0x85, 0x09, 0x5b, 0xda, 0x32, 0x3d, 0x74, 0xe5, 0xa8, 0x28, 0x45, 0x3d, 0x54, 0x7b, 0xa1,
- 0x42, 0x24, 0xa1, 0x70, 0x40, 0x5c, 0x90, 0xd8, 0x0a, 0xc4, 0xa1, 0xc0, 0x2a, 0x20, 0x21, 0x71,
- 0x09, 0x4e, 0xea, 0x0d, 0x16, 0xf1, 0x38, 0xd8, 0x93, 0xa8, 0xfc, 0x17, 0x7e, 0x6c, 0x15, 0x67,
- 0x95, 0x64, 0xbb, 0xed, 0xde, 0xec, 0xf7, 0xde, 0xf7, 0x2c, 0x79, 0x6c, 0x78, 0xa1, 0x2b, 0x81,
- 0xb9, 0x40, 0x5b, 0xdb, 0xb8, 0x32, 0x9a, 0x74, 0x4c, 0x86, 0xe7, 0x22, 0x6e, 0xce, 0xbb, 0x45,
- 0x9a, 0x6b, 0x5c, 0xca, 0x22, 0x72, 0x1e, 0x3b, 0x1e, 0xd2, 0x9d, 0x12, 0xb9, 0x50, 0xd4, 0x9c,
- 0xcf, 0xfe, 0xef, 0xc0, 0xc1, 0xf7, 0x76, 0x73, 0xe1, 0x00, 0xf6, 0x0b, 0xfc, 0xca, 0xe8, 0x8c,
- 0x67, 0xb2, 0x94, 0xf4, 0x2f, 0xb5, 0x5c, 0x55, 0xa5, 0x30, 0x81, 0x77, 0xea, 0x9d, 0x1d, 0xbc,
- 0x0a, 0xa3, 0x7b, 0x8b, 0xa2, 0xc5, 0x40, 0x7d, 0xeb, 0xa0, 0x4f, 0x0f, 0x12, 0x56, 0x6d, 0xa8,
- 0xec, 0x07, 0x4c, 0x73, 0x8d, 0x96, 0x38, 0x52, 0x5f, 0xff, 0xd0, 0xd5, 0x3f, 0xdf, 0x52, 0x7f,
- 0xb1, 0x42, 0x86, 0xee, 0xc3, 0x7c, 0x5d, 0x62, 0x57, 0x70, 0x64, 0x38, 0x89, 0xb4, 0x94, 0x4a,
- 0x92, 0xc4, 0xa2, 0x6f, 0x9f, 0xb8, 0xf6, 0x68, 0x4b, 0x7b, 0xc2, 0x49, 0x5c, 0xae, 0xb0, 0xe1,
- 0x04, 0xdf, 0x6c, 0xca, 0xec, 0x0d, 0x04, 0x8a, 0x5f, 0xa7, 0x58, 0xab, 0x4c, 0x98, 0x54, 0x2f,
- 0x53, 0x4e, 0x64, 0x64, 0x56, 0x93, 0xb0, 0xc1, 0xce, 0xa9, 0x77, 0x36, 0x49, 0x8e, 0x14, 0xbf,
- 0xfe, 0xe2, 0xec, 0xaf, 0xcb, 0xf7, 0xbd, 0xc9, 0xde, 0xc2, 0xf1, 0x2d, 0x10, 0x51, 0x13, 0x27,
- 0xa9, 0xd1, 0x06, 0x8f, 0x1c, 0xf9, 0x64, 0x4c, 0x0e, 0x2e, 0x7b, 0x07, 0x27, 0xeb, 0xa8, 0x12,
- 0xd6, 0xf2, 0x42, 0xa4, 0xa2, 0x11, 0x48, 0x36, 0xd8, 0x75, 0x74, 0x30, 0xa2, 0x3f, 0x77, 0x81,
- 0x0f, 0xce, 0x67, 0x21, 0xf8, 0xeb, 0x7c, 0x29, 0xf1, 0x8f, 0x0d, 0xf6, 0x1c, 0x36, 0x1d, 0x61,
- 0x97, 0xad, 0x3e, 0x7f, 0x0c, 0x7b, 0xab, 0xab, 0x9b, 0x7d, 0x04, 0xb6, 0x39, 0x58, 0xf6, 0x12,
- 0x7c, 0x17, 0x90, 0x58, 0x8c, 0x5c, 0xf7, 0x48, 0xbc, 0xe4, 0x2e, 0x6b, 0x16, 0xc2, 0xe1, 0xad,
- 0x09, 0xb2, 0xa7, 0xb0, 0x7f, 0x25, 0x72, 0x69, 0xa5, 0x46, 0x47, 0xee, 0x27, 0xfd, 0x7e, 0xf6,
- 0x0c, 0xfc, 0x3b, 0x46, 0xc2, 0xa6, 0x30, 0xf9, 0x5b, 0x59, 0x97, 0x9e, 0x24, 0xed, 0x72, 0xde,
- 0xc0, 0x89, 0xd4, 0xf7, 0x0f, 0x76, 0x3e, 0x1d, 0xbd, 0xed, 0x45, 0x6b, 0x2d, 0xbc, 0x9f, 0xf3,
- 0x42, 0xd2, 0xef, 0x3a, 0x8b, 0x72, 0xad, 0xe2, 0x8e, 0x0a, 0x25, 0x5a, 0x32, 0xb5, 0x12, 0xd8,
- 0xdd, 0x78, 0x3c, 0x14, 0x86, 0xdd, 0xef, 0x2a, 0x04, 0x86, 0xc5, 0xf0, 0xc9, 0xb2, 0x5d, 0x27,
- 0xbf, 0xbe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x98, 0xa1, 0x9e, 0x88, 0x03, 0x00, 0x00,
-}
diff --git a/vendor/github.com/dimchansky/utfbom/.travis.yml b/vendor/github.com/dimchansky/utfbom/.travis.yml
index df88e37b26..3512c85190 100644
--- a/vendor/github.com/dimchansky/utfbom/.travis.yml
+++ b/vendor/github.com/dimchansky/utfbom/.travis.yml
@@ -1,8 +1,8 @@
language: go
go:
- - 1.7
- - tip
+ - '1.10'
+ - '1.11'
# sudo=false makes the build run using a container
sudo: false
@@ -15,4 +15,4 @@ before_install:
script:
- gofiles=$(find ./ -name '*.go') && [ -z "$gofiles" ] || unformatted=$(goimports -l $gofiles) && [ -z "$unformatted" ] || (echo >&2 "Go files must be formatted with gofmt. Following files has problem:\n $unformatted" && false)
- golint ./... # This won't break the build, just show warnings
- - $HOME/gopath/bin/goveralls -service=travis-ci
\ No newline at end of file
+ - $HOME/gopath/bin/goveralls -service=travis-ci
diff --git a/vendor/github.com/dimchansky/utfbom/README.md b/vendor/github.com/dimchansky/utfbom/README.md
index 2f06ecacd0..8ece280089 100644
--- a/vendor/github.com/dimchansky/utfbom/README.md
+++ b/vendor/github.com/dimchansky/utfbom/README.md
@@ -37,22 +37,7 @@ func trySkip(byteData []byte) {
// skip BOM and detect encoding
sr, enc := utfbom.Skip(bytes.NewReader(byteData))
- var encStr string
- switch enc {
- case utfbom.UTF8:
- encStr = "UTF8"
- case utfbom.UTF16BigEndian:
- encStr = "UTF16 big endian"
- case utfbom.UTF16LittleEndian:
- encStr = "UTF16 little endian"
- case utfbom.UTF32BigEndian:
- encStr = "UTF32 big endian"
- case utfbom.UTF32LittleEndian:
- encStr = "UTF32 little endian"
- default:
- encStr = "Unknown, no byte-order mark found"
- }
- fmt.Println("Detected encoding:", encStr)
+ fmt.Printf("Detected encoding: %s\n", enc)
output, err = ioutil.ReadAll(sr)
if err != nil {
fmt.Println(err)
@@ -74,7 +59,7 @@ ReadAll with BOM detection and skipping [104 101 108 108 111]
Input: [104 101 108 108 111]
ReadAll with BOM skipping [104 101 108 108 111]
-Detected encoding: Unknown, no byte-order mark found
+Detected encoding: Unknown
ReadAll with BOM detection and skipping [104 101 108 108 111]
```
diff --git a/vendor/github.com/dimchansky/utfbom/utfbom.go b/vendor/github.com/dimchansky/utfbom/utfbom.go
index 648184a12d..77a303e564 100644
--- a/vendor/github.com/dimchansky/utfbom/utfbom.go
+++ b/vendor/github.com/dimchansky/utfbom/utfbom.go
@@ -32,6 +32,24 @@ const (
UTF32LittleEndian
)
+// String returns a user-friendly string representation of the encoding. Satisfies fmt.Stringer interface.
+func (e Encoding) String() string {
+ switch e {
+ case UTF8:
+ return "UTF8"
+ case UTF16BigEndian:
+ return "UTF16BigEndian"
+ case UTF16LittleEndian:
+ return "UTF16LittleEndian"
+ case UTF32BigEndian:
+ return "UTF32BigEndian"
+ case UTF32LittleEndian:
+ return "UTF32LittleEndian"
+ default:
+ return "Unknown"
+ }
+}
+
const maxConsecutiveEmptyReads = 100
// Skip creates Reader which automatically detects BOM (Unicode Byte Order Mark) and removes it as necessary.
diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go
deleted file mode 100644
index ada2b78e89..0000000000
--- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go
+++ /dev/null
@@ -1,1271 +0,0 @@
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2015 The Go Authors. All rights reserved.
-// https://github.com/golang/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-/*
-Package jsonpb provides marshaling and unmarshaling between protocol buffers and JSON.
-It follows the specification at https://developers.google.com/protocol-buffers/docs/proto3#json.
-
-This package produces a different output than the standard "encoding/json" package,
-which does not operate correctly on protocol buffers.
-*/
-package jsonpb
-
-import (
- "bytes"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "math"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "github.com/golang/protobuf/proto"
-
- stpb "github.com/golang/protobuf/ptypes/struct"
-)
-
-const secondInNanos = int64(time.Second / time.Nanosecond)
-
-// Marshaler is a configurable object for converting between
-// protocol buffer objects and a JSON representation for them.
-type Marshaler struct {
- // Whether to render enum values as integers, as opposed to string values.
- EnumsAsInts bool
-
- // Whether to render fields with zero values.
- EmitDefaults bool
-
- // A string to indent each level by. The presence of this field will
- // also cause a space to appear between the field separator and
- // value, and for newlines to be appear between fields and array
- // elements.
- Indent string
-
- // Whether to use the original (.proto) name for fields.
- OrigName bool
-
- // A custom URL resolver to use when marshaling Any messages to JSON.
- // If unset, the default resolution strategy is to extract the
- // fully-qualified type name from the type URL and pass that to
- // proto.MessageType(string).
- AnyResolver AnyResolver
-}
-
-// AnyResolver takes a type URL, present in an Any message, and resolves it into
-// an instance of the associated message.
-type AnyResolver interface {
- Resolve(typeUrl string) (proto.Message, error)
-}
-
-func defaultResolveAny(typeUrl string) (proto.Message, error) {
- // Only the part of typeUrl after the last slash is relevant.
- mname := typeUrl
- if slash := strings.LastIndex(mname, "/"); slash >= 0 {
- mname = mname[slash+1:]
- }
- mt := proto.MessageType(mname)
- if mt == nil {
- return nil, fmt.Errorf("unknown message type %q", mname)
- }
- return reflect.New(mt.Elem()).Interface().(proto.Message), nil
-}
-
-// JSONPBMarshaler is implemented by protobuf messages that customize the
-// way they are marshaled to JSON. Messages that implement this should
-// also implement JSONPBUnmarshaler so that the custom format can be
-// parsed.
-//
-// The JSON marshaling must follow the proto to JSON specification:
-// https://developers.google.com/protocol-buffers/docs/proto3#json
-type JSONPBMarshaler interface {
- MarshalJSONPB(*Marshaler) ([]byte, error)
-}
-
-// JSONPBUnmarshaler is implemented by protobuf messages that customize
-// the way they are unmarshaled from JSON. Messages that implement this
-// should also implement JSONPBMarshaler so that the custom format can be
-// produced.
-//
-// The JSON unmarshaling must follow the JSON to proto specification:
-// https://developers.google.com/protocol-buffers/docs/proto3#json
-type JSONPBUnmarshaler interface {
- UnmarshalJSONPB(*Unmarshaler, []byte) error
-}
-
-// Marshal marshals a protocol buffer into JSON.
-func (m *Marshaler) Marshal(out io.Writer, pb proto.Message) error {
- v := reflect.ValueOf(pb)
- if pb == nil || (v.Kind() == reflect.Ptr && v.IsNil()) {
- return errors.New("Marshal called with nil")
- }
- // Check for unset required fields first.
- if err := checkRequiredFields(pb); err != nil {
- return err
- }
- writer := &errWriter{writer: out}
- return m.marshalObject(writer, pb, "", "")
-}
-
-// MarshalToString converts a protocol buffer object to JSON string.
-func (m *Marshaler) MarshalToString(pb proto.Message) (string, error) {
- var buf bytes.Buffer
- if err := m.Marshal(&buf, pb); err != nil {
- return "", err
- }
- return buf.String(), nil
-}
-
-type int32Slice []int32
-
-var nonFinite = map[string]float64{
- `"NaN"`: math.NaN(),
- `"Infinity"`: math.Inf(1),
- `"-Infinity"`: math.Inf(-1),
-}
-
-// For sorting extensions ids to ensure stable output.
-func (s int32Slice) Len() int { return len(s) }
-func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] }
-func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-
-type wkt interface {
- XXX_WellKnownType() string
-}
-
-// marshalObject writes a struct to the Writer.
-func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent, typeURL string) error {
- if jsm, ok := v.(JSONPBMarshaler); ok {
- b, err := jsm.MarshalJSONPB(m)
- if err != nil {
- return err
- }
- if typeURL != "" {
- // we are marshaling this object to an Any type
- var js map[string]*json.RawMessage
- if err = json.Unmarshal(b, &js); err != nil {
- return fmt.Errorf("type %T produced invalid JSON: %v", v, err)
- }
- turl, err := json.Marshal(typeURL)
- if err != nil {
- return fmt.Errorf("failed to marshal type URL %q to JSON: %v", typeURL, err)
- }
- js["@type"] = (*json.RawMessage)(&turl)
- if b, err = json.Marshal(js); err != nil {
- return err
- }
- }
-
- out.write(string(b))
- return out.err
- }
-
- s := reflect.ValueOf(v).Elem()
-
- // Handle well-known types.
- if wkt, ok := v.(wkt); ok {
- switch wkt.XXX_WellKnownType() {
- case "DoubleValue", "FloatValue", "Int64Value", "UInt64Value",
- "Int32Value", "UInt32Value", "BoolValue", "StringValue", "BytesValue":
- // "Wrappers use the same representation in JSON
- // as the wrapped primitive type, ..."
- sprop := proto.GetProperties(s.Type())
- return m.marshalValue(out, sprop.Prop[0], s.Field(0), indent)
- case "Any":
- // Any is a bit more involved.
- return m.marshalAny(out, v, indent)
- case "Duration":
- // "Generated output always contains 0, 3, 6, or 9 fractional digits,
- // depending on required precision."
- s, ns := s.Field(0).Int(), s.Field(1).Int()
- if ns <= -secondInNanos || ns >= secondInNanos {
- return fmt.Errorf("ns out of range (%v, %v)", -secondInNanos, secondInNanos)
- }
- if (s > 0 && ns < 0) || (s < 0 && ns > 0) {
- return errors.New("signs of seconds and nanos do not match")
- }
- if s < 0 {
- ns = -ns
- }
- x := fmt.Sprintf("%d.%09d", s, ns)
- x = strings.TrimSuffix(x, "000")
- x = strings.TrimSuffix(x, "000")
- x = strings.TrimSuffix(x, ".000")
- out.write(`"`)
- out.write(x)
- out.write(`s"`)
- return out.err
- case "Struct", "ListValue":
- // Let marshalValue handle the `Struct.fields` map or the `ListValue.values` slice.
- // TODO: pass the correct Properties if needed.
- return m.marshalValue(out, &proto.Properties{}, s.Field(0), indent)
- case "Timestamp":
- // "RFC 3339, where generated output will always be Z-normalized
- // and uses 0, 3, 6 or 9 fractional digits."
- s, ns := s.Field(0).Int(), s.Field(1).Int()
- if ns < 0 || ns >= secondInNanos {
- return fmt.Errorf("ns out of range [0, %v)", secondInNanos)
- }
- t := time.Unix(s, ns).UTC()
- // time.RFC3339Nano isn't exactly right (we need to get 3/6/9 fractional digits).
- x := t.Format("2006-01-02T15:04:05.000000000")
- x = strings.TrimSuffix(x, "000")
- x = strings.TrimSuffix(x, "000")
- x = strings.TrimSuffix(x, ".000")
- out.write(`"`)
- out.write(x)
- out.write(`Z"`)
- return out.err
- case "Value":
- // Value has a single oneof.
- kind := s.Field(0)
- if kind.IsNil() {
- // "absence of any variant indicates an error"
- return errors.New("nil Value")
- }
- // oneof -> *T -> T -> T.F
- x := kind.Elem().Elem().Field(0)
- // TODO: pass the correct Properties if needed.
- return m.marshalValue(out, &proto.Properties{}, x, indent)
- }
- }
-
- out.write("{")
- if m.Indent != "" {
- out.write("\n")
- }
-
- firstField := true
-
- if typeURL != "" {
- if err := m.marshalTypeURL(out, indent, typeURL); err != nil {
- return err
- }
- firstField = false
- }
-
- for i := 0; i < s.NumField(); i++ {
- value := s.Field(i)
- valueField := s.Type().Field(i)
- if strings.HasPrefix(valueField.Name, "XXX_") {
- continue
- }
-
- // IsNil will panic on most value kinds.
- switch value.Kind() {
- case reflect.Chan, reflect.Func, reflect.Interface:
- if value.IsNil() {
- continue
- }
- }
-
- if !m.EmitDefaults {
- switch value.Kind() {
- case reflect.Bool:
- if !value.Bool() {
- continue
- }
- case reflect.Int32, reflect.Int64:
- if value.Int() == 0 {
- continue
- }
- case reflect.Uint32, reflect.Uint64:
- if value.Uint() == 0 {
- continue
- }
- case reflect.Float32, reflect.Float64:
- if value.Float() == 0 {
- continue
- }
- case reflect.String:
- if value.Len() == 0 {
- continue
- }
- case reflect.Map, reflect.Ptr, reflect.Slice:
- if value.IsNil() {
- continue
- }
- }
- }
-
- // Oneof fields need special handling.
- if valueField.Tag.Get("protobuf_oneof") != "" {
- // value is an interface containing &T{real_value}.
- sv := value.Elem().Elem() // interface -> *T -> T
- value = sv.Field(0)
- valueField = sv.Type().Field(0)
- }
- prop := jsonProperties(valueField, m.OrigName)
- if !firstField {
- m.writeSep(out)
- }
- if err := m.marshalField(out, prop, value, indent); err != nil {
- return err
- }
- firstField = false
- }
-
- // Handle proto2 extensions.
- if ep, ok := v.(proto.Message); ok {
- extensions := proto.RegisteredExtensions(v)
- // Sort extensions for stable output.
- ids := make([]int32, 0, len(extensions))
- for id, desc := range extensions {
- if !proto.HasExtension(ep, desc) {
- continue
- }
- ids = append(ids, id)
- }
- sort.Sort(int32Slice(ids))
- for _, id := range ids {
- desc := extensions[id]
- if desc == nil {
- // unknown extension
- continue
- }
- ext, extErr := proto.GetExtension(ep, desc)
- if extErr != nil {
- return extErr
- }
- value := reflect.ValueOf(ext)
- var prop proto.Properties
- prop.Parse(desc.Tag)
- prop.JSONName = fmt.Sprintf("[%s]", desc.Name)
- if !firstField {
- m.writeSep(out)
- }
- if err := m.marshalField(out, &prop, value, indent); err != nil {
- return err
- }
- firstField = false
- }
-
- }
-
- if m.Indent != "" {
- out.write("\n")
- out.write(indent)
- }
- out.write("}")
- return out.err
-}
-
-func (m *Marshaler) writeSep(out *errWriter) {
- if m.Indent != "" {
- out.write(",\n")
- } else {
- out.write(",")
- }
-}
-
-func (m *Marshaler) marshalAny(out *errWriter, any proto.Message, indent string) error {
- // "If the Any contains a value that has a special JSON mapping,
- // it will be converted as follows: {"@type": xxx, "value": yyy}.
- // Otherwise, the value will be converted into a JSON object,
- // and the "@type" field will be inserted to indicate the actual data type."
- v := reflect.ValueOf(any).Elem()
- turl := v.Field(0).String()
- val := v.Field(1).Bytes()
-
- var msg proto.Message
- var err error
- if m.AnyResolver != nil {
- msg, err = m.AnyResolver.Resolve(turl)
- } else {
- msg, err = defaultResolveAny(turl)
- }
- if err != nil {
- return err
- }
-
- if err := proto.Unmarshal(val, msg); err != nil {
- return err
- }
-
- if _, ok := msg.(wkt); ok {
- out.write("{")
- if m.Indent != "" {
- out.write("\n")
- }
- if err := m.marshalTypeURL(out, indent, turl); err != nil {
- return err
- }
- m.writeSep(out)
- if m.Indent != "" {
- out.write(indent)
- out.write(m.Indent)
- out.write(`"value": `)
- } else {
- out.write(`"value":`)
- }
- if err := m.marshalObject(out, msg, indent+m.Indent, ""); err != nil {
- return err
- }
- if m.Indent != "" {
- out.write("\n")
- out.write(indent)
- }
- out.write("}")
- return out.err
- }
-
- return m.marshalObject(out, msg, indent, turl)
-}
-
-func (m *Marshaler) marshalTypeURL(out *errWriter, indent, typeURL string) error {
- if m.Indent != "" {
- out.write(indent)
- out.write(m.Indent)
- }
- out.write(`"@type":`)
- if m.Indent != "" {
- out.write(" ")
- }
- b, err := json.Marshal(typeURL)
- if err != nil {
- return err
- }
- out.write(string(b))
- return out.err
-}
-
-// marshalField writes field description and value to the Writer.
-func (m *Marshaler) marshalField(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error {
- if m.Indent != "" {
- out.write(indent)
- out.write(m.Indent)
- }
- out.write(`"`)
- out.write(prop.JSONName)
- out.write(`":`)
- if m.Indent != "" {
- out.write(" ")
- }
- if err := m.marshalValue(out, prop, v, indent); err != nil {
- return err
- }
- return nil
-}
-
-// marshalValue writes the value to the Writer.
-func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error {
- var err error
- v = reflect.Indirect(v)
-
- // Handle nil pointer
- if v.Kind() == reflect.Invalid {
- out.write("null")
- return out.err
- }
-
- // Handle repeated elements.
- if v.Kind() == reflect.Slice && v.Type().Elem().Kind() != reflect.Uint8 {
- out.write("[")
- comma := ""
- for i := 0; i < v.Len(); i++ {
- sliceVal := v.Index(i)
- out.write(comma)
- if m.Indent != "" {
- out.write("\n")
- out.write(indent)
- out.write(m.Indent)
- out.write(m.Indent)
- }
- if err := m.marshalValue(out, prop, sliceVal, indent+m.Indent); err != nil {
- return err
- }
- comma = ","
- }
- if m.Indent != "" {
- out.write("\n")
- out.write(indent)
- out.write(m.Indent)
- }
- out.write("]")
- return out.err
- }
-
- // Handle well-known types.
- // Most are handled up in marshalObject (because 99% are messages).
- if wkt, ok := v.Interface().(wkt); ok {
- switch wkt.XXX_WellKnownType() {
- case "NullValue":
- out.write("null")
- return out.err
- }
- }
-
- // Handle enumerations.
- if !m.EnumsAsInts && prop.Enum != "" {
- // Unknown enum values will are stringified by the proto library as their
- // value. Such values should _not_ be quoted or they will be interpreted
- // as an enum string instead of their value.
- enumStr := v.Interface().(fmt.Stringer).String()
- var valStr string
- if v.Kind() == reflect.Ptr {
- valStr = strconv.Itoa(int(v.Elem().Int()))
- } else {
- valStr = strconv.Itoa(int(v.Int()))
- }
- isKnownEnum := enumStr != valStr
- if isKnownEnum {
- out.write(`"`)
- }
- out.write(enumStr)
- if isKnownEnum {
- out.write(`"`)
- }
- return out.err
- }
-
- // Handle nested messages.
- if v.Kind() == reflect.Struct {
- return m.marshalObject(out, v.Addr().Interface().(proto.Message), indent+m.Indent, "")
- }
-
- // Handle maps.
- // Since Go randomizes map iteration, we sort keys for stable output.
- if v.Kind() == reflect.Map {
- out.write(`{`)
- keys := v.MapKeys()
- sort.Sort(mapKeys(keys))
- for i, k := range keys {
- if i > 0 {
- out.write(`,`)
- }
- if m.Indent != "" {
- out.write("\n")
- out.write(indent)
- out.write(m.Indent)
- out.write(m.Indent)
- }
-
- // TODO handle map key prop properly
- b, err := json.Marshal(k.Interface())
- if err != nil {
- return err
- }
- s := string(b)
-
- // If the JSON is not a string value, encode it again to make it one.
- if !strings.HasPrefix(s, `"`) {
- b, err := json.Marshal(s)
- if err != nil {
- return err
- }
- s = string(b)
- }
-
- out.write(s)
- out.write(`:`)
- if m.Indent != "" {
- out.write(` `)
- }
-
- vprop := prop
- if prop != nil && prop.MapValProp != nil {
- vprop = prop.MapValProp
- }
- if err := m.marshalValue(out, vprop, v.MapIndex(k), indent+m.Indent); err != nil {
- return err
- }
- }
- if m.Indent != "" {
- out.write("\n")
- out.write(indent)
- out.write(m.Indent)
- }
- out.write(`}`)
- return out.err
- }
-
- // Handle non-finite floats, e.g. NaN, Infinity and -Infinity.
- if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 {
- f := v.Float()
- var sval string
- switch {
- case math.IsInf(f, 1):
- sval = `"Infinity"`
- case math.IsInf(f, -1):
- sval = `"-Infinity"`
- case math.IsNaN(f):
- sval = `"NaN"`
- }
- if sval != "" {
- out.write(sval)
- return out.err
- }
- }
-
- // Default handling defers to the encoding/json library.
- b, err := json.Marshal(v.Interface())
- if err != nil {
- return err
- }
- needToQuote := string(b[0]) != `"` && (v.Kind() == reflect.Int64 || v.Kind() == reflect.Uint64)
- if needToQuote {
- out.write(`"`)
- }
- out.write(string(b))
- if needToQuote {
- out.write(`"`)
- }
- return out.err
-}
-
-// Unmarshaler is a configurable object for converting from a JSON
-// representation to a protocol buffer object.
-type Unmarshaler struct {
- // Whether to allow messages to contain unknown fields, as opposed to
- // failing to unmarshal.
- AllowUnknownFields bool
-
- // A custom URL resolver to use when unmarshaling Any messages from JSON.
- // If unset, the default resolution strategy is to extract the
- // fully-qualified type name from the type URL and pass that to
- // proto.MessageType(string).
- AnyResolver AnyResolver
-}
-
-// UnmarshalNext unmarshals the next protocol buffer from a JSON object stream.
-// This function is lenient and will decode any options permutations of the
-// related Marshaler.
-func (u *Unmarshaler) UnmarshalNext(dec *json.Decoder, pb proto.Message) error {
- inputValue := json.RawMessage{}
- if err := dec.Decode(&inputValue); err != nil {
- return err
- }
- if err := u.unmarshalValue(reflect.ValueOf(pb).Elem(), inputValue, nil); err != nil {
- return err
- }
- return checkRequiredFields(pb)
-}
-
-// Unmarshal unmarshals a JSON object stream into a protocol
-// buffer. This function is lenient and will decode any options
-// permutations of the related Marshaler.
-func (u *Unmarshaler) Unmarshal(r io.Reader, pb proto.Message) error {
- dec := json.NewDecoder(r)
- return u.UnmarshalNext(dec, pb)
-}
-
-// UnmarshalNext unmarshals the next protocol buffer from a JSON object stream.
-// This function is lenient and will decode any options permutations of the
-// related Marshaler.
-func UnmarshalNext(dec *json.Decoder, pb proto.Message) error {
- return new(Unmarshaler).UnmarshalNext(dec, pb)
-}
-
-// Unmarshal unmarshals a JSON object stream into a protocol
-// buffer. This function is lenient and will decode any options
-// permutations of the related Marshaler.
-func Unmarshal(r io.Reader, pb proto.Message) error {
- return new(Unmarshaler).Unmarshal(r, pb)
-}
-
-// UnmarshalString will populate the fields of a protocol buffer based
-// on a JSON string. This function is lenient and will decode any options
-// permutations of the related Marshaler.
-func UnmarshalString(str string, pb proto.Message) error {
- return new(Unmarshaler).Unmarshal(strings.NewReader(str), pb)
-}
-
-// unmarshalValue converts/copies a value into the target.
-// prop may be nil.
-func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMessage, prop *proto.Properties) error {
- targetType := target.Type()
-
- // Allocate memory for pointer fields.
- if targetType.Kind() == reflect.Ptr {
- // If input value is "null" and target is a pointer type, then the field should be treated as not set
- // UNLESS the target is structpb.Value, in which case it should be set to structpb.NullValue.
- _, isJSONPBUnmarshaler := target.Interface().(JSONPBUnmarshaler)
- if string(inputValue) == "null" && targetType != reflect.TypeOf(&stpb.Value{}) && !isJSONPBUnmarshaler {
- return nil
- }
- target.Set(reflect.New(targetType.Elem()))
-
- return u.unmarshalValue(target.Elem(), inputValue, prop)
- }
-
- if jsu, ok := target.Addr().Interface().(JSONPBUnmarshaler); ok {
- return jsu.UnmarshalJSONPB(u, []byte(inputValue))
- }
-
- // Handle well-known types that are not pointers.
- if w, ok := target.Addr().Interface().(wkt); ok {
- switch w.XXX_WellKnownType() {
- case "DoubleValue", "FloatValue", "Int64Value", "UInt64Value",
- "Int32Value", "UInt32Value", "BoolValue", "StringValue", "BytesValue":
- return u.unmarshalValue(target.Field(0), inputValue, prop)
- case "Any":
- // Use json.RawMessage pointer type instead of value to support pre-1.8 version.
- // 1.8 changed RawMessage.MarshalJSON from pointer type to value type, see
- // https://github.com/golang/go/issues/14493
- var jsonFields map[string]*json.RawMessage
- if err := json.Unmarshal(inputValue, &jsonFields); err != nil {
- return err
- }
-
- val, ok := jsonFields["@type"]
- if !ok || val == nil {
- return errors.New("Any JSON doesn't have '@type'")
- }
-
- var turl string
- if err := json.Unmarshal([]byte(*val), &turl); err != nil {
- return fmt.Errorf("can't unmarshal Any's '@type': %q", *val)
- }
- target.Field(0).SetString(turl)
-
- var m proto.Message
- var err error
- if u.AnyResolver != nil {
- m, err = u.AnyResolver.Resolve(turl)
- } else {
- m, err = defaultResolveAny(turl)
- }
- if err != nil {
- return err
- }
-
- if _, ok := m.(wkt); ok {
- val, ok := jsonFields["value"]
- if !ok {
- return errors.New("Any JSON doesn't have 'value'")
- }
-
- if err := u.unmarshalValue(reflect.ValueOf(m).Elem(), *val, nil); err != nil {
- return fmt.Errorf("can't unmarshal Any nested proto %T: %v", m, err)
- }
- } else {
- delete(jsonFields, "@type")
- nestedProto, err := json.Marshal(jsonFields)
- if err != nil {
- return fmt.Errorf("can't generate JSON for Any's nested proto to be unmarshaled: %v", err)
- }
-
- if err = u.unmarshalValue(reflect.ValueOf(m).Elem(), nestedProto, nil); err != nil {
- return fmt.Errorf("can't unmarshal Any nested proto %T: %v", m, err)
- }
- }
-
- b, err := proto.Marshal(m)
- if err != nil {
- return fmt.Errorf("can't marshal proto %T into Any.Value: %v", m, err)
- }
- target.Field(1).SetBytes(b)
-
- return nil
- case "Duration":
- unq, err := unquote(string(inputValue))
- if err != nil {
- return err
- }
-
- d, err := time.ParseDuration(unq)
- if err != nil {
- return fmt.Errorf("bad Duration: %v", err)
- }
-
- ns := d.Nanoseconds()
- s := ns / 1e9
- ns %= 1e9
- target.Field(0).SetInt(s)
- target.Field(1).SetInt(ns)
- return nil
- case "Timestamp":
- unq, err := unquote(string(inputValue))
- if err != nil {
- return err
- }
-
- t, err := time.Parse(time.RFC3339Nano, unq)
- if err != nil {
- return fmt.Errorf("bad Timestamp: %v", err)
- }
-
- target.Field(0).SetInt(t.Unix())
- target.Field(1).SetInt(int64(t.Nanosecond()))
- return nil
- case "Struct":
- var m map[string]json.RawMessage
- if err := json.Unmarshal(inputValue, &m); err != nil {
- return fmt.Errorf("bad StructValue: %v", err)
- }
-
- target.Field(0).Set(reflect.ValueOf(map[string]*stpb.Value{}))
- for k, jv := range m {
- pv := &stpb.Value{}
- if err := u.unmarshalValue(reflect.ValueOf(pv).Elem(), jv, prop); err != nil {
- return fmt.Errorf("bad value in StructValue for key %q: %v", k, err)
- }
- target.Field(0).SetMapIndex(reflect.ValueOf(k), reflect.ValueOf(pv))
- }
- return nil
- case "ListValue":
- var s []json.RawMessage
- if err := json.Unmarshal(inputValue, &s); err != nil {
- return fmt.Errorf("bad ListValue: %v", err)
- }
-
- target.Field(0).Set(reflect.ValueOf(make([]*stpb.Value, len(s))))
- for i, sv := range s {
- if err := u.unmarshalValue(target.Field(0).Index(i), sv, prop); err != nil {
- return err
- }
- }
- return nil
- case "Value":
- ivStr := string(inputValue)
- if ivStr == "null" {
- target.Field(0).Set(reflect.ValueOf(&stpb.Value_NullValue{}))
- } else if v, err := strconv.ParseFloat(ivStr, 0); err == nil {
- target.Field(0).Set(reflect.ValueOf(&stpb.Value_NumberValue{v}))
- } else if v, err := unquote(ivStr); err == nil {
- target.Field(0).Set(reflect.ValueOf(&stpb.Value_StringValue{v}))
- } else if v, err := strconv.ParseBool(ivStr); err == nil {
- target.Field(0).Set(reflect.ValueOf(&stpb.Value_BoolValue{v}))
- } else if err := json.Unmarshal(inputValue, &[]json.RawMessage{}); err == nil {
- lv := &stpb.ListValue{}
- target.Field(0).Set(reflect.ValueOf(&stpb.Value_ListValue{lv}))
- return u.unmarshalValue(reflect.ValueOf(lv).Elem(), inputValue, prop)
- } else if err := json.Unmarshal(inputValue, &map[string]json.RawMessage{}); err == nil {
- sv := &stpb.Struct{}
- target.Field(0).Set(reflect.ValueOf(&stpb.Value_StructValue{sv}))
- return u.unmarshalValue(reflect.ValueOf(sv).Elem(), inputValue, prop)
- } else {
- return fmt.Errorf("unrecognized type for Value %q", ivStr)
- }
- return nil
- }
- }
-
- // Handle enums, which have an underlying type of int32,
- // and may appear as strings.
- // The case of an enum appearing as a number is handled
- // at the bottom of this function.
- if inputValue[0] == '"' && prop != nil && prop.Enum != "" {
- vmap := proto.EnumValueMap(prop.Enum)
- // Don't need to do unquoting; valid enum names
- // are from a limited character set.
- s := inputValue[1 : len(inputValue)-1]
- n, ok := vmap[string(s)]
- if !ok {
- return fmt.Errorf("unknown value %q for enum %s", s, prop.Enum)
- }
- if target.Kind() == reflect.Ptr { // proto2
- target.Set(reflect.New(targetType.Elem()))
- target = target.Elem()
- }
- if targetType.Kind() != reflect.Int32 {
- return fmt.Errorf("invalid target %q for enum %s", targetType.Kind(), prop.Enum)
- }
- target.SetInt(int64(n))
- return nil
- }
-
- // Handle nested messages.
- if targetType.Kind() == reflect.Struct {
- var jsonFields map[string]json.RawMessage
- if err := json.Unmarshal(inputValue, &jsonFields); err != nil {
- return err
- }
-
- consumeField := func(prop *proto.Properties) (json.RawMessage, bool) {
- // Be liberal in what names we accept; both orig_name and camelName are okay.
- fieldNames := acceptedJSONFieldNames(prop)
-
- vOrig, okOrig := jsonFields[fieldNames.orig]
- vCamel, okCamel := jsonFields[fieldNames.camel]
- if !okOrig && !okCamel {
- return nil, false
- }
- // If, for some reason, both are present in the data, favour the camelName.
- var raw json.RawMessage
- if okOrig {
- raw = vOrig
- delete(jsonFields, fieldNames.orig)
- }
- if okCamel {
- raw = vCamel
- delete(jsonFields, fieldNames.camel)
- }
- return raw, true
- }
-
- sprops := proto.GetProperties(targetType)
- for i := 0; i < target.NumField(); i++ {
- ft := target.Type().Field(i)
- if strings.HasPrefix(ft.Name, "XXX_") {
- continue
- }
-
- valueForField, ok := consumeField(sprops.Prop[i])
- if !ok {
- continue
- }
-
- if err := u.unmarshalValue(target.Field(i), valueForField, sprops.Prop[i]); err != nil {
- return err
- }
- }
- // Check for any oneof fields.
- if len(jsonFields) > 0 {
- for _, oop := range sprops.OneofTypes {
- raw, ok := consumeField(oop.Prop)
- if !ok {
- continue
- }
- nv := reflect.New(oop.Type.Elem())
- target.Field(oop.Field).Set(nv)
- if err := u.unmarshalValue(nv.Elem().Field(0), raw, oop.Prop); err != nil {
- return err
- }
- }
- }
- // Handle proto2 extensions.
- if len(jsonFields) > 0 {
- if ep, ok := target.Addr().Interface().(proto.Message); ok {
- for _, ext := range proto.RegisteredExtensions(ep) {
- name := fmt.Sprintf("[%s]", ext.Name)
- raw, ok := jsonFields[name]
- if !ok {
- continue
- }
- delete(jsonFields, name)
- nv := reflect.New(reflect.TypeOf(ext.ExtensionType).Elem())
- if err := u.unmarshalValue(nv.Elem(), raw, nil); err != nil {
- return err
- }
- if err := proto.SetExtension(ep, ext, nv.Interface()); err != nil {
- return err
- }
- }
- }
- }
- if !u.AllowUnknownFields && len(jsonFields) > 0 {
- // Pick any field to be the scapegoat.
- var f string
- for fname := range jsonFields {
- f = fname
- break
- }
- return fmt.Errorf("unknown field %q in %v", f, targetType)
- }
- return nil
- }
-
- // Handle arrays (which aren't encoded bytes)
- if targetType.Kind() == reflect.Slice && targetType.Elem().Kind() != reflect.Uint8 {
- var slc []json.RawMessage
- if err := json.Unmarshal(inputValue, &slc); err != nil {
- return err
- }
- if slc != nil {
- l := len(slc)
- target.Set(reflect.MakeSlice(targetType, l, l))
- for i := 0; i < l; i++ {
- if err := u.unmarshalValue(target.Index(i), slc[i], prop); err != nil {
- return err
- }
- }
- }
- return nil
- }
-
- // Handle maps (whose keys are always strings)
- if targetType.Kind() == reflect.Map {
- var mp map[string]json.RawMessage
- if err := json.Unmarshal(inputValue, &mp); err != nil {
- return err
- }
- if mp != nil {
- target.Set(reflect.MakeMap(targetType))
- for ks, raw := range mp {
- // Unmarshal map key. The core json library already decoded the key into a
- // string, so we handle that specially. Other types were quoted post-serialization.
- var k reflect.Value
- if targetType.Key().Kind() == reflect.String {
- k = reflect.ValueOf(ks)
- } else {
- k = reflect.New(targetType.Key()).Elem()
- var kprop *proto.Properties
- if prop != nil && prop.MapKeyProp != nil {
- kprop = prop.MapKeyProp
- }
- if err := u.unmarshalValue(k, json.RawMessage(ks), kprop); err != nil {
- return err
- }
- }
-
- // Unmarshal map value.
- v := reflect.New(targetType.Elem()).Elem()
- var vprop *proto.Properties
- if prop != nil && prop.MapValProp != nil {
- vprop = prop.MapValProp
- }
- if err := u.unmarshalValue(v, raw, vprop); err != nil {
- return err
- }
- target.SetMapIndex(k, v)
- }
- }
- return nil
- }
-
- // Non-finite numbers can be encoded as strings.
- isFloat := targetType.Kind() == reflect.Float32 || targetType.Kind() == reflect.Float64
- if isFloat {
- if num, ok := nonFinite[string(inputValue)]; ok {
- target.SetFloat(num)
- return nil
- }
- }
-
- // integers & floats can be encoded as strings. In this case we drop
- // the quotes and proceed as normal.
- isNum := targetType.Kind() == reflect.Int64 || targetType.Kind() == reflect.Uint64 ||
- targetType.Kind() == reflect.Int32 || targetType.Kind() == reflect.Uint32 ||
- targetType.Kind() == reflect.Float32 || targetType.Kind() == reflect.Float64
- if isNum && strings.HasPrefix(string(inputValue), `"`) {
- inputValue = inputValue[1 : len(inputValue)-1]
- }
-
- // Use the encoding/json for parsing other value types.
- return json.Unmarshal(inputValue, target.Addr().Interface())
-}
-
-func unquote(s string) (string, error) {
- var ret string
- err := json.Unmarshal([]byte(s), &ret)
- return ret, err
-}
-
-// jsonProperties returns parsed proto.Properties for the field and corrects JSONName attribute.
-func jsonProperties(f reflect.StructField, origName bool) *proto.Properties {
- var prop proto.Properties
- prop.Init(f.Type, f.Name, f.Tag.Get("protobuf"), &f)
- if origName || prop.JSONName == "" {
- prop.JSONName = prop.OrigName
- }
- return &prop
-}
-
-type fieldNames struct {
- orig, camel string
-}
-
-func acceptedJSONFieldNames(prop *proto.Properties) fieldNames {
- opts := fieldNames{orig: prop.OrigName, camel: prop.OrigName}
- if prop.JSONName != "" {
- opts.camel = prop.JSONName
- }
- return opts
-}
-
-// Writer wrapper inspired by https://blog.golang.org/errors-are-values
-type errWriter struct {
- writer io.Writer
- err error
-}
-
-func (w *errWriter) write(str string) {
- if w.err != nil {
- return
- }
- _, w.err = w.writer.Write([]byte(str))
-}
-
-// Map fields may have key types of non-float scalars, strings and enums.
-// The easiest way to sort them in some deterministic order is to use fmt.
-// If this turns out to be inefficient we can always consider other options,
-// such as doing a Schwartzian transform.
-//
-// Numeric keys are sorted in numeric order per
-// https://developers.google.com/protocol-buffers/docs/proto#maps.
-type mapKeys []reflect.Value
-
-func (s mapKeys) Len() int { return len(s) }
-func (s mapKeys) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-func (s mapKeys) Less(i, j int) bool {
- if k := s[i].Kind(); k == s[j].Kind() {
- switch k {
- case reflect.String:
- return s[i].String() < s[j].String()
- case reflect.Int32, reflect.Int64:
- return s[i].Int() < s[j].Int()
- case reflect.Uint32, reflect.Uint64:
- return s[i].Uint() < s[j].Uint()
- }
- }
- return fmt.Sprint(s[i].Interface()) < fmt.Sprint(s[j].Interface())
-}
-
-// checkRequiredFields returns an error if any required field in the given proto message is not set.
-// This function is used by both Marshal and Unmarshal. While required fields only exist in a
-// proto2 message, a proto3 message can contain proto2 message(s).
-func checkRequiredFields(pb proto.Message) error {
- // Most well-known type messages do not contain required fields. The "Any" type may contain
- // a message that has required fields.
- //
- // When an Any message is being marshaled, the code will invoked proto.Unmarshal on Any.Value
- // field in order to transform that into JSON, and that should have returned an error if a
- // required field is not set in the embedded message.
- //
- // When an Any message is being unmarshaled, the code will have invoked proto.Marshal on the
- // embedded message to store the serialized message in Any.Value field, and that should have
- // returned an error if a required field is not set.
- if _, ok := pb.(wkt); ok {
- return nil
- }
-
- v := reflect.ValueOf(pb)
- // Skip message if it is not a struct pointer.
- if v.Kind() != reflect.Ptr {
- return nil
- }
- v = v.Elem()
- if v.Kind() != reflect.Struct {
- return nil
- }
-
- for i := 0; i < v.NumField(); i++ {
- field := v.Field(i)
- sfield := v.Type().Field(i)
-
- if sfield.PkgPath != "" {
- // blank PkgPath means the field is exported; skip if not exported
- continue
- }
-
- if strings.HasPrefix(sfield.Name, "XXX_") {
- continue
- }
-
- // Oneof field is an interface implemented by wrapper structs containing the actual oneof
- // field, i.e. an interface containing &T{real_value}.
- if sfield.Tag.Get("protobuf_oneof") != "" {
- if field.Kind() != reflect.Interface {
- continue
- }
- v := field.Elem()
- if v.Kind() != reflect.Ptr || v.IsNil() {
- continue
- }
- v = v.Elem()
- if v.Kind() != reflect.Struct || v.NumField() < 1 {
- continue
- }
- field = v.Field(0)
- sfield = v.Type().Field(0)
- }
-
- protoTag := sfield.Tag.Get("protobuf")
- if protoTag == "" {
- continue
- }
- var prop proto.Properties
- prop.Init(sfield.Type, sfield.Name, protoTag, &sfield)
-
- switch field.Kind() {
- case reflect.Map:
- if field.IsNil() {
- continue
- }
- // Check each map value.
- keys := field.MapKeys()
- for _, k := range keys {
- v := field.MapIndex(k)
- if err := checkRequiredFieldsInValue(v); err != nil {
- return err
- }
- }
- case reflect.Slice:
- // Handle non-repeated type, e.g. bytes.
- if !prop.Repeated {
- if prop.Required && field.IsNil() {
- return fmt.Errorf("required field %q is not set", prop.Name)
- }
- continue
- }
-
- // Handle repeated type.
- if field.IsNil() {
- continue
- }
- // Check each slice item.
- for i := 0; i < field.Len(); i++ {
- v := field.Index(i)
- if err := checkRequiredFieldsInValue(v); err != nil {
- return err
- }
- }
- case reflect.Ptr:
- if field.IsNil() {
- if prop.Required {
- return fmt.Errorf("required field %q is not set", prop.Name)
- }
- continue
- }
- if err := checkRequiredFieldsInValue(field); err != nil {
- return err
- }
- }
- }
-
- // Handle proto2 extensions.
- for _, ext := range proto.RegisteredExtensions(pb) {
- if !proto.HasExtension(pb, ext) {
- continue
- }
- ep, err := proto.GetExtension(pb, ext)
- if err != nil {
- return err
- }
- err = checkRequiredFieldsInValue(reflect.ValueOf(ep))
- if err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func checkRequiredFieldsInValue(v reflect.Value) error {
- if pm, ok := v.Interface().(proto.Message); ok {
- return checkRequiredFields(pm)
- }
- return nil
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go b/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go
deleted file mode 100644
index 33daa73dd2..0000000000
--- a/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go
+++ /dev/null
@@ -1,336 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google/protobuf/struct.proto
-
-package structpb
-
-import (
- fmt "fmt"
- proto "github.com/golang/protobuf/proto"
- math "math"
-)
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
-
-// `NullValue` is a singleton enumeration to represent the null value for the
-// `Value` type union.
-//
-// The JSON representation for `NullValue` is JSON `null`.
-type NullValue int32
-
-const (
- // Null value.
- NullValue_NULL_VALUE NullValue = 0
-)
-
-var NullValue_name = map[int32]string{
- 0: "NULL_VALUE",
-}
-
-var NullValue_value = map[string]int32{
- "NULL_VALUE": 0,
-}
-
-func (x NullValue) String() string {
- return proto.EnumName(NullValue_name, int32(x))
-}
-
-func (NullValue) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_df322afd6c9fb402, []int{0}
-}
-
-func (NullValue) XXX_WellKnownType() string { return "NullValue" }
-
-// `Struct` represents a structured data value, consisting of fields
-// which map to dynamically typed values. In some languages, `Struct`
-// might be supported by a native representation. For example, in
-// scripting languages like JS a struct is represented as an
-// object. The details of that representation are described together
-// with the proto support for the language.
-//
-// The JSON representation for `Struct` is JSON object.
-type Struct struct {
- // Unordered map of dynamically typed values.
- Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Struct) Reset() { *m = Struct{} }
-func (m *Struct) String() string { return proto.CompactTextString(m) }
-func (*Struct) ProtoMessage() {}
-func (*Struct) Descriptor() ([]byte, []int) {
- return fileDescriptor_df322afd6c9fb402, []int{0}
-}
-
-func (*Struct) XXX_WellKnownType() string { return "Struct" }
-
-func (m *Struct) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Struct.Unmarshal(m, b)
-}
-func (m *Struct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Struct.Marshal(b, m, deterministic)
-}
-func (m *Struct) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Struct.Merge(m, src)
-}
-func (m *Struct) XXX_Size() int {
- return xxx_messageInfo_Struct.Size(m)
-}
-func (m *Struct) XXX_DiscardUnknown() {
- xxx_messageInfo_Struct.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Struct proto.InternalMessageInfo
-
-func (m *Struct) GetFields() map[string]*Value {
- if m != nil {
- return m.Fields
- }
- return nil
-}
-
-// `Value` represents a dynamically typed value which can be either
-// null, a number, a string, a boolean, a recursive struct value, or a
-// list of values. A producer of value is expected to set one of that
-// variants, absence of any variant indicates an error.
-//
-// The JSON representation for `Value` is JSON value.
-type Value struct {
- // The kind of value.
- //
- // Types that are valid to be assigned to Kind:
- // *Value_NullValue
- // *Value_NumberValue
- // *Value_StringValue
- // *Value_BoolValue
- // *Value_StructValue
- // *Value_ListValue
- Kind isValue_Kind `protobuf_oneof:"kind"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Value) Reset() { *m = Value{} }
-func (m *Value) String() string { return proto.CompactTextString(m) }
-func (*Value) ProtoMessage() {}
-func (*Value) Descriptor() ([]byte, []int) {
- return fileDescriptor_df322afd6c9fb402, []int{1}
-}
-
-func (*Value) XXX_WellKnownType() string { return "Value" }
-
-func (m *Value) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Value.Unmarshal(m, b)
-}
-func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Value.Marshal(b, m, deterministic)
-}
-func (m *Value) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Value.Merge(m, src)
-}
-func (m *Value) XXX_Size() int {
- return xxx_messageInfo_Value.Size(m)
-}
-func (m *Value) XXX_DiscardUnknown() {
- xxx_messageInfo_Value.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Value proto.InternalMessageInfo
-
-type isValue_Kind interface {
- isValue_Kind()
-}
-
-type Value_NullValue struct {
- NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof"`
-}
-
-type Value_NumberValue struct {
- NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,proto3,oneof"`
-}
-
-type Value_StringValue struct {
- StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof"`
-}
-
-type Value_BoolValue struct {
- BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"`
-}
-
-type Value_StructValue struct {
- StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,proto3,oneof"`
-}
-
-type Value_ListValue struct {
- ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,proto3,oneof"`
-}
-
-func (*Value_NullValue) isValue_Kind() {}
-
-func (*Value_NumberValue) isValue_Kind() {}
-
-func (*Value_StringValue) isValue_Kind() {}
-
-func (*Value_BoolValue) isValue_Kind() {}
-
-func (*Value_StructValue) isValue_Kind() {}
-
-func (*Value_ListValue) isValue_Kind() {}
-
-func (m *Value) GetKind() isValue_Kind {
- if m != nil {
- return m.Kind
- }
- return nil
-}
-
-func (m *Value) GetNullValue() NullValue {
- if x, ok := m.GetKind().(*Value_NullValue); ok {
- return x.NullValue
- }
- return NullValue_NULL_VALUE
-}
-
-func (m *Value) GetNumberValue() float64 {
- if x, ok := m.GetKind().(*Value_NumberValue); ok {
- return x.NumberValue
- }
- return 0
-}
-
-func (m *Value) GetStringValue() string {
- if x, ok := m.GetKind().(*Value_StringValue); ok {
- return x.StringValue
- }
- return ""
-}
-
-func (m *Value) GetBoolValue() bool {
- if x, ok := m.GetKind().(*Value_BoolValue); ok {
- return x.BoolValue
- }
- return false
-}
-
-func (m *Value) GetStructValue() *Struct {
- if x, ok := m.GetKind().(*Value_StructValue); ok {
- return x.StructValue
- }
- return nil
-}
-
-func (m *Value) GetListValue() *ListValue {
- if x, ok := m.GetKind().(*Value_ListValue); ok {
- return x.ListValue
- }
- return nil
-}
-
-// XXX_OneofWrappers is for the internal use of the proto package.
-func (*Value) XXX_OneofWrappers() []interface{} {
- return []interface{}{
- (*Value_NullValue)(nil),
- (*Value_NumberValue)(nil),
- (*Value_StringValue)(nil),
- (*Value_BoolValue)(nil),
- (*Value_StructValue)(nil),
- (*Value_ListValue)(nil),
- }
-}
-
-// `ListValue` is a wrapper around a repeated field of values.
-//
-// The JSON representation for `ListValue` is JSON array.
-type ListValue struct {
- // Repeated field of dynamically typed values.
- Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *ListValue) Reset() { *m = ListValue{} }
-func (m *ListValue) String() string { return proto.CompactTextString(m) }
-func (*ListValue) ProtoMessage() {}
-func (*ListValue) Descriptor() ([]byte, []int) {
- return fileDescriptor_df322afd6c9fb402, []int{2}
-}
-
-func (*ListValue) XXX_WellKnownType() string { return "ListValue" }
-
-func (m *ListValue) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_ListValue.Unmarshal(m, b)
-}
-func (m *ListValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_ListValue.Marshal(b, m, deterministic)
-}
-func (m *ListValue) XXX_Merge(src proto.Message) {
- xxx_messageInfo_ListValue.Merge(m, src)
-}
-func (m *ListValue) XXX_Size() int {
- return xxx_messageInfo_ListValue.Size(m)
-}
-func (m *ListValue) XXX_DiscardUnknown() {
- xxx_messageInfo_ListValue.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ListValue proto.InternalMessageInfo
-
-func (m *ListValue) GetValues() []*Value {
- if m != nil {
- return m.Values
- }
- return nil
-}
-
-func init() {
- proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value)
- proto.RegisterType((*Struct)(nil), "google.protobuf.Struct")
- proto.RegisterMapType((map[string]*Value)(nil), "google.protobuf.Struct.FieldsEntry")
- proto.RegisterType((*Value)(nil), "google.protobuf.Value")
- proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue")
-}
-
-func init() { proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor_df322afd6c9fb402) }
-
-var fileDescriptor_df322afd6c9fb402 = []byte{
- // 417 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x41, 0x8b, 0xd3, 0x40,
- 0x14, 0xc7, 0x3b, 0xc9, 0x36, 0x98, 0x17, 0x59, 0x97, 0x11, 0xb4, 0xac, 0xa2, 0xa1, 0x7b, 0x09,
- 0x22, 0x29, 0xd6, 0x8b, 0x18, 0x2f, 0x06, 0xd6, 0x5d, 0x30, 0x2c, 0x31, 0xba, 0x15, 0xbc, 0x94,
- 0x26, 0x4d, 0x63, 0xe8, 0x74, 0x26, 0x24, 0x33, 0x4a, 0x8f, 0x7e, 0x0b, 0xcf, 0x1e, 0x3d, 0xfa,
- 0xe9, 0x3c, 0xca, 0xcc, 0x24, 0xa9, 0xb4, 0xf4, 0x94, 0xbc, 0xf7, 0x7e, 0xef, 0x3f, 0xef, 0xff,
- 0x66, 0xe0, 0x71, 0xc1, 0x58, 0x41, 0xf2, 0x49, 0x55, 0x33, 0xce, 0x52, 0xb1, 0x9a, 0x34, 0xbc,
- 0x16, 0x19, 0xf7, 0x55, 0x8c, 0xef, 0xe9, 0xaa, 0xdf, 0x55, 0xc7, 0x3f, 0x11, 0x58, 0x1f, 0x15,
- 0x81, 0x03, 0xb0, 0x56, 0x65, 0x4e, 0x96, 0xcd, 0x08, 0xb9, 0xa6, 0xe7, 0x4c, 0x2f, 0xfc, 0x3d,
- 0xd8, 0xd7, 0xa0, 0xff, 0x4e, 0x51, 0x97, 0x94, 0xd7, 0xdb, 0xa4, 0x6d, 0x39, 0xff, 0x00, 0xce,
- 0x7f, 0x69, 0x7c, 0x06, 0xe6, 0x3a, 0xdf, 0x8e, 0x90, 0x8b, 0x3c, 0x3b, 0x91, 0xbf, 0xf8, 0x39,
- 0x0c, 0xbf, 0x2d, 0x88, 0xc8, 0x47, 0x86, 0x8b, 0x3c, 0x67, 0xfa, 0xe0, 0x40, 0x7c, 0x26, 0xab,
- 0x89, 0x86, 0x5e, 0x1b, 0xaf, 0xd0, 0xf8, 0x8f, 0x01, 0x43, 0x95, 0xc4, 0x01, 0x00, 0x15, 0x84,
- 0xcc, 0xb5, 0x80, 0x14, 0x3d, 0x9d, 0x9e, 0x1f, 0x08, 0xdc, 0x08, 0x42, 0x14, 0x7f, 0x3d, 0x48,
- 0x6c, 0xda, 0x05, 0xf8, 0x02, 0xee, 0x52, 0xb1, 0x49, 0xf3, 0x7a, 0xbe, 0x3b, 0x1f, 0x5d, 0x0f,
- 0x12, 0x47, 0x67, 0x7b, 0xa8, 0xe1, 0x75, 0x49, 0x8b, 0x16, 0x32, 0xe5, 0xe0, 0x12, 0xd2, 0x59,
- 0x0d, 0x3d, 0x05, 0x48, 0x19, 0xeb, 0xc6, 0x38, 0x71, 0x91, 0x77, 0x47, 0x1e, 0x25, 0x73, 0x1a,
- 0x78, 0xa3, 0x54, 0x44, 0xc6, 0x5b, 0x64, 0xa8, 0xac, 0x3e, 0x3c, 0xb2, 0xc7, 0x56, 0x5e, 0x64,
- 0xbc, 0x77, 0x49, 0xca, 0xa6, 0xeb, 0xb5, 0x54, 0xef, 0xa1, 0xcb, 0xa8, 0x6c, 0x78, 0xef, 0x92,
- 0x74, 0x41, 0x68, 0xc1, 0xc9, 0xba, 0xa4, 0xcb, 0x71, 0x00, 0x76, 0x4f, 0x60, 0x1f, 0x2c, 0x25,
- 0xd6, 0xdd, 0xe8, 0xb1, 0xa5, 0xb7, 0xd4, 0xb3, 0x47, 0x60, 0xf7, 0x4b, 0xc4, 0xa7, 0x00, 0x37,
- 0xb7, 0x51, 0x34, 0x9f, 0xbd, 0x8d, 0x6e, 0x2f, 0xcf, 0x06, 0xe1, 0x0f, 0x04, 0xf7, 0x33, 0xb6,
- 0xd9, 0x97, 0x08, 0x1d, 0xed, 0x26, 0x96, 0x71, 0x8c, 0xbe, 0xbc, 0x28, 0x4a, 0xfe, 0x55, 0xa4,
- 0x7e, 0xc6, 0x36, 0x93, 0x82, 0x91, 0x05, 0x2d, 0x76, 0x4f, 0xb1, 0xe2, 0xdb, 0x2a, 0x6f, 0xda,
- 0x17, 0x19, 0xe8, 0x4f, 0x95, 0xfe, 0x45, 0xe8, 0x97, 0x61, 0x5e, 0xc5, 0xe1, 0x6f, 0xe3, 0xc9,
- 0x95, 0x16, 0x8f, 0xbb, 0xf9, 0x3e, 0xe7, 0x84, 0xbc, 0xa7, 0xec, 0x3b, 0xfd, 0x24, 0x3b, 0x53,
- 0x4b, 0x49, 0xbd, 0xfc, 0x17, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x1b, 0x59, 0xf8, 0xe5, 0x02, 0x00,
- 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto b/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto
deleted file mode 100644
index 7d7808e7fb..0000000000
--- a/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto
+++ /dev/null
@@ -1,96 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-syntax = "proto3";
-
-package google.protobuf;
-
-option csharp_namespace = "Google.Protobuf.WellKnownTypes";
-option cc_enable_arenas = true;
-option go_package = "github.com/golang/protobuf/ptypes/struct;structpb";
-option java_package = "com.google.protobuf";
-option java_outer_classname = "StructProto";
-option java_multiple_files = true;
-option objc_class_prefix = "GPB";
-
-
-// `Struct` represents a structured data value, consisting of fields
-// which map to dynamically typed values. In some languages, `Struct`
-// might be supported by a native representation. For example, in
-// scripting languages like JS a struct is represented as an
-// object. The details of that representation are described together
-// with the proto support for the language.
-//
-// The JSON representation for `Struct` is JSON object.
-message Struct {
- // Unordered map of dynamically typed values.
- map fields = 1;
-}
-
-// `Value` represents a dynamically typed value which can be either
-// null, a number, a string, a boolean, a recursive struct value, or a
-// list of values. A producer of value is expected to set one of that
-// variants, absence of any variant indicates an error.
-//
-// The JSON representation for `Value` is JSON value.
-message Value {
- // The kind of value.
- oneof kind {
- // Represents a null value.
- NullValue null_value = 1;
- // Represents a double value.
- double number_value = 2;
- // Represents a string value.
- string string_value = 3;
- // Represents a boolean value.
- bool bool_value = 4;
- // Represents a structured value.
- Struct struct_value = 5;
- // Represents a repeated `Value`.
- ListValue list_value = 6;
- }
-}
-
-// `NullValue` is a singleton enumeration to represent the null value for the
-// `Value` type union.
-//
-// The JSON representation for `NullValue` is JSON `null`.
-enum NullValue {
- // Null value.
- NULL_VALUE = 0;
-}
-
-// `ListValue` is a wrapper around a repeated field of values.
-//
-// The JSON representation for `ListValue` is JSON array.
-message ListValue {
- // Repeated field of dynamically typed values.
- repeated Value values = 1;
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go
deleted file mode 100644
index add19a1adb..0000000000
--- a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go
+++ /dev/null
@@ -1,461 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google/protobuf/wrappers.proto
-
-package wrappers
-
-import (
- fmt "fmt"
- proto "github.com/golang/protobuf/proto"
- math "math"
-)
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
-
-// Wrapper message for `double`.
-//
-// The JSON representation for `DoubleValue` is JSON number.
-type DoubleValue struct {
- // The double value.
- Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *DoubleValue) Reset() { *m = DoubleValue{} }
-func (m *DoubleValue) String() string { return proto.CompactTextString(m) }
-func (*DoubleValue) ProtoMessage() {}
-func (*DoubleValue) Descriptor() ([]byte, []int) {
- return fileDescriptor_5377b62bda767935, []int{0}
-}
-
-func (*DoubleValue) XXX_WellKnownType() string { return "DoubleValue" }
-
-func (m *DoubleValue) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DoubleValue.Unmarshal(m, b)
-}
-func (m *DoubleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DoubleValue.Marshal(b, m, deterministic)
-}
-func (m *DoubleValue) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DoubleValue.Merge(m, src)
-}
-func (m *DoubleValue) XXX_Size() int {
- return xxx_messageInfo_DoubleValue.Size(m)
-}
-func (m *DoubleValue) XXX_DiscardUnknown() {
- xxx_messageInfo_DoubleValue.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DoubleValue proto.InternalMessageInfo
-
-func (m *DoubleValue) GetValue() float64 {
- if m != nil {
- return m.Value
- }
- return 0
-}
-
-// Wrapper message for `float`.
-//
-// The JSON representation for `FloatValue` is JSON number.
-type FloatValue struct {
- // The float value.
- Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *FloatValue) Reset() { *m = FloatValue{} }
-func (m *FloatValue) String() string { return proto.CompactTextString(m) }
-func (*FloatValue) ProtoMessage() {}
-func (*FloatValue) Descriptor() ([]byte, []int) {
- return fileDescriptor_5377b62bda767935, []int{1}
-}
-
-func (*FloatValue) XXX_WellKnownType() string { return "FloatValue" }
-
-func (m *FloatValue) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_FloatValue.Unmarshal(m, b)
-}
-func (m *FloatValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_FloatValue.Marshal(b, m, deterministic)
-}
-func (m *FloatValue) XXX_Merge(src proto.Message) {
- xxx_messageInfo_FloatValue.Merge(m, src)
-}
-func (m *FloatValue) XXX_Size() int {
- return xxx_messageInfo_FloatValue.Size(m)
-}
-func (m *FloatValue) XXX_DiscardUnknown() {
- xxx_messageInfo_FloatValue.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_FloatValue proto.InternalMessageInfo
-
-func (m *FloatValue) GetValue() float32 {
- if m != nil {
- return m.Value
- }
- return 0
-}
-
-// Wrapper message for `int64`.
-//
-// The JSON representation for `Int64Value` is JSON string.
-type Int64Value struct {
- // The int64 value.
- Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Int64Value) Reset() { *m = Int64Value{} }
-func (m *Int64Value) String() string { return proto.CompactTextString(m) }
-func (*Int64Value) ProtoMessage() {}
-func (*Int64Value) Descriptor() ([]byte, []int) {
- return fileDescriptor_5377b62bda767935, []int{2}
-}
-
-func (*Int64Value) XXX_WellKnownType() string { return "Int64Value" }
-
-func (m *Int64Value) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Int64Value.Unmarshal(m, b)
-}
-func (m *Int64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Int64Value.Marshal(b, m, deterministic)
-}
-func (m *Int64Value) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Int64Value.Merge(m, src)
-}
-func (m *Int64Value) XXX_Size() int {
- return xxx_messageInfo_Int64Value.Size(m)
-}
-func (m *Int64Value) XXX_DiscardUnknown() {
- xxx_messageInfo_Int64Value.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Int64Value proto.InternalMessageInfo
-
-func (m *Int64Value) GetValue() int64 {
- if m != nil {
- return m.Value
- }
- return 0
-}
-
-// Wrapper message for `uint64`.
-//
-// The JSON representation for `UInt64Value` is JSON string.
-type UInt64Value struct {
- // The uint64 value.
- Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *UInt64Value) Reset() { *m = UInt64Value{} }
-func (m *UInt64Value) String() string { return proto.CompactTextString(m) }
-func (*UInt64Value) ProtoMessage() {}
-func (*UInt64Value) Descriptor() ([]byte, []int) {
- return fileDescriptor_5377b62bda767935, []int{3}
-}
-
-func (*UInt64Value) XXX_WellKnownType() string { return "UInt64Value" }
-
-func (m *UInt64Value) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_UInt64Value.Unmarshal(m, b)
-}
-func (m *UInt64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_UInt64Value.Marshal(b, m, deterministic)
-}
-func (m *UInt64Value) XXX_Merge(src proto.Message) {
- xxx_messageInfo_UInt64Value.Merge(m, src)
-}
-func (m *UInt64Value) XXX_Size() int {
- return xxx_messageInfo_UInt64Value.Size(m)
-}
-func (m *UInt64Value) XXX_DiscardUnknown() {
- xxx_messageInfo_UInt64Value.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_UInt64Value proto.InternalMessageInfo
-
-func (m *UInt64Value) GetValue() uint64 {
- if m != nil {
- return m.Value
- }
- return 0
-}
-
-// Wrapper message for `int32`.
-//
-// The JSON representation for `Int32Value` is JSON number.
-type Int32Value struct {
- // The int32 value.
- Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *Int32Value) Reset() { *m = Int32Value{} }
-func (m *Int32Value) String() string { return proto.CompactTextString(m) }
-func (*Int32Value) ProtoMessage() {}
-func (*Int32Value) Descriptor() ([]byte, []int) {
- return fileDescriptor_5377b62bda767935, []int{4}
-}
-
-func (*Int32Value) XXX_WellKnownType() string { return "Int32Value" }
-
-func (m *Int32Value) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_Int32Value.Unmarshal(m, b)
-}
-func (m *Int32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_Int32Value.Marshal(b, m, deterministic)
-}
-func (m *Int32Value) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Int32Value.Merge(m, src)
-}
-func (m *Int32Value) XXX_Size() int {
- return xxx_messageInfo_Int32Value.Size(m)
-}
-func (m *Int32Value) XXX_DiscardUnknown() {
- xxx_messageInfo_Int32Value.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Int32Value proto.InternalMessageInfo
-
-func (m *Int32Value) GetValue() int32 {
- if m != nil {
- return m.Value
- }
- return 0
-}
-
-// Wrapper message for `uint32`.
-//
-// The JSON representation for `UInt32Value` is JSON number.
-type UInt32Value struct {
- // The uint32 value.
- Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *UInt32Value) Reset() { *m = UInt32Value{} }
-func (m *UInt32Value) String() string { return proto.CompactTextString(m) }
-func (*UInt32Value) ProtoMessage() {}
-func (*UInt32Value) Descriptor() ([]byte, []int) {
- return fileDescriptor_5377b62bda767935, []int{5}
-}
-
-func (*UInt32Value) XXX_WellKnownType() string { return "UInt32Value" }
-
-func (m *UInt32Value) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_UInt32Value.Unmarshal(m, b)
-}
-func (m *UInt32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_UInt32Value.Marshal(b, m, deterministic)
-}
-func (m *UInt32Value) XXX_Merge(src proto.Message) {
- xxx_messageInfo_UInt32Value.Merge(m, src)
-}
-func (m *UInt32Value) XXX_Size() int {
- return xxx_messageInfo_UInt32Value.Size(m)
-}
-func (m *UInt32Value) XXX_DiscardUnknown() {
- xxx_messageInfo_UInt32Value.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_UInt32Value proto.InternalMessageInfo
-
-func (m *UInt32Value) GetValue() uint32 {
- if m != nil {
- return m.Value
- }
- return 0
-}
-
-// Wrapper message for `bool`.
-//
-// The JSON representation for `BoolValue` is JSON `true` and `false`.
-type BoolValue struct {
- // The bool value.
- Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *BoolValue) Reset() { *m = BoolValue{} }
-func (m *BoolValue) String() string { return proto.CompactTextString(m) }
-func (*BoolValue) ProtoMessage() {}
-func (*BoolValue) Descriptor() ([]byte, []int) {
- return fileDescriptor_5377b62bda767935, []int{6}
-}
-
-func (*BoolValue) XXX_WellKnownType() string { return "BoolValue" }
-
-func (m *BoolValue) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_BoolValue.Unmarshal(m, b)
-}
-func (m *BoolValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_BoolValue.Marshal(b, m, deterministic)
-}
-func (m *BoolValue) XXX_Merge(src proto.Message) {
- xxx_messageInfo_BoolValue.Merge(m, src)
-}
-func (m *BoolValue) XXX_Size() int {
- return xxx_messageInfo_BoolValue.Size(m)
-}
-func (m *BoolValue) XXX_DiscardUnknown() {
- xxx_messageInfo_BoolValue.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_BoolValue proto.InternalMessageInfo
-
-func (m *BoolValue) GetValue() bool {
- if m != nil {
- return m.Value
- }
- return false
-}
-
-// Wrapper message for `string`.
-//
-// The JSON representation for `StringValue` is JSON string.
-type StringValue struct {
- // The string value.
- Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *StringValue) Reset() { *m = StringValue{} }
-func (m *StringValue) String() string { return proto.CompactTextString(m) }
-func (*StringValue) ProtoMessage() {}
-func (*StringValue) Descriptor() ([]byte, []int) {
- return fileDescriptor_5377b62bda767935, []int{7}
-}
-
-func (*StringValue) XXX_WellKnownType() string { return "StringValue" }
-
-func (m *StringValue) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_StringValue.Unmarshal(m, b)
-}
-func (m *StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_StringValue.Marshal(b, m, deterministic)
-}
-func (m *StringValue) XXX_Merge(src proto.Message) {
- xxx_messageInfo_StringValue.Merge(m, src)
-}
-func (m *StringValue) XXX_Size() int {
- return xxx_messageInfo_StringValue.Size(m)
-}
-func (m *StringValue) XXX_DiscardUnknown() {
- xxx_messageInfo_StringValue.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_StringValue proto.InternalMessageInfo
-
-func (m *StringValue) GetValue() string {
- if m != nil {
- return m.Value
- }
- return ""
-}
-
-// Wrapper message for `bytes`.
-//
-// The JSON representation for `BytesValue` is JSON string.
-type BytesValue struct {
- // The bytes value.
- Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *BytesValue) Reset() { *m = BytesValue{} }
-func (m *BytesValue) String() string { return proto.CompactTextString(m) }
-func (*BytesValue) ProtoMessage() {}
-func (*BytesValue) Descriptor() ([]byte, []int) {
- return fileDescriptor_5377b62bda767935, []int{8}
-}
-
-func (*BytesValue) XXX_WellKnownType() string { return "BytesValue" }
-
-func (m *BytesValue) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_BytesValue.Unmarshal(m, b)
-}
-func (m *BytesValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_BytesValue.Marshal(b, m, deterministic)
-}
-func (m *BytesValue) XXX_Merge(src proto.Message) {
- xxx_messageInfo_BytesValue.Merge(m, src)
-}
-func (m *BytesValue) XXX_Size() int {
- return xxx_messageInfo_BytesValue.Size(m)
-}
-func (m *BytesValue) XXX_DiscardUnknown() {
- xxx_messageInfo_BytesValue.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_BytesValue proto.InternalMessageInfo
-
-func (m *BytesValue) GetValue() []byte {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-func init() {
- proto.RegisterType((*DoubleValue)(nil), "google.protobuf.DoubleValue")
- proto.RegisterType((*FloatValue)(nil), "google.protobuf.FloatValue")
- proto.RegisterType((*Int64Value)(nil), "google.protobuf.Int64Value")
- proto.RegisterType((*UInt64Value)(nil), "google.protobuf.UInt64Value")
- proto.RegisterType((*Int32Value)(nil), "google.protobuf.Int32Value")
- proto.RegisterType((*UInt32Value)(nil), "google.protobuf.UInt32Value")
- proto.RegisterType((*BoolValue)(nil), "google.protobuf.BoolValue")
- proto.RegisterType((*StringValue)(nil), "google.protobuf.StringValue")
- proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue")
-}
-
-func init() { proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor_5377b62bda767935) }
-
-var fileDescriptor_5377b62bda767935 = []byte{
- // 259 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f,
- 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x2f, 0x4a, 0x2c,
- 0x28, 0x48, 0x2d, 0x2a, 0xd6, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0xca,
- 0x5c, 0xdc, 0x2e, 0xf9, 0xa5, 0x49, 0x39, 0xa9, 0x61, 0x89, 0x39, 0xa5, 0xa9, 0x42, 0x22, 0x5c,
- 0xac, 0x65, 0x20, 0x86, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x63, 0x10, 0x84, 0xa3, 0xa4, 0xc4, 0xc5,
- 0xe5, 0x96, 0x93, 0x9f, 0x58, 0x82, 0x45, 0x0d, 0x13, 0x92, 0x1a, 0xcf, 0xbc, 0x12, 0x33, 0x13,
- 0x2c, 0x6a, 0x98, 0x61, 0x6a, 0x94, 0xb9, 0xb8, 0x43, 0x71, 0x29, 0x62, 0x41, 0x35, 0xc8, 0xd8,
- 0x08, 0x8b, 0x1a, 0x56, 0x34, 0x83, 0xb0, 0x2a, 0xe2, 0x85, 0x29, 0x52, 0xe4, 0xe2, 0x74, 0xca,
- 0xcf, 0xcf, 0xc1, 0xa2, 0x84, 0x03, 0xc9, 0x9c, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0x74, 0x2c, 0x8a,
- 0x38, 0x91, 0x1c, 0xe4, 0x54, 0x59, 0x92, 0x5a, 0x8c, 0x45, 0x0d, 0x0f, 0x54, 0x8d, 0x53, 0x0d,
- 0x97, 0x70, 0x72, 0x7e, 0xae, 0x1e, 0x5a, 0xe8, 0x3a, 0xf1, 0x86, 0x43, 0x83, 0x3f, 0x00, 0x24,
- 0x12, 0xc0, 0x18, 0xa5, 0x95, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f,
- 0x9e, 0x9f, 0x93, 0x98, 0x97, 0x8e, 0x88, 0xaa, 0x82, 0x92, 0xca, 0x82, 0xd4, 0x62, 0x78, 0x8c,
- 0xfd, 0x60, 0x64, 0x5c, 0xc4, 0xc4, 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0x62, 0x6e,
- 0x00, 0x54, 0xa9, 0x5e, 0x78, 0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0x48, 0x4b,
- 0x12, 0x1b, 0xd8, 0x0c, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x19, 0x6c, 0xb9, 0xb8, 0xfe,
- 0x01, 0x00, 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto
deleted file mode 100644
index 01947639ac..0000000000
--- a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto
+++ /dev/null
@@ -1,118 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Wrappers for primitive (non-message) types. These types are useful
-// for embedding primitives in the `google.protobuf.Any` type and for places
-// where we need to distinguish between the absence of a primitive
-// typed field and its default value.
-
-syntax = "proto3";
-
-package google.protobuf;
-
-option csharp_namespace = "Google.Protobuf.WellKnownTypes";
-option cc_enable_arenas = true;
-option go_package = "github.com/golang/protobuf/ptypes/wrappers";
-option java_package = "com.google.protobuf";
-option java_outer_classname = "WrappersProto";
-option java_multiple_files = true;
-option objc_class_prefix = "GPB";
-
-// Wrapper message for `double`.
-//
-// The JSON representation for `DoubleValue` is JSON number.
-message DoubleValue {
- // The double value.
- double value = 1;
-}
-
-// Wrapper message for `float`.
-//
-// The JSON representation for `FloatValue` is JSON number.
-message FloatValue {
- // The float value.
- float value = 1;
-}
-
-// Wrapper message for `int64`.
-//
-// The JSON representation for `Int64Value` is JSON string.
-message Int64Value {
- // The int64 value.
- int64 value = 1;
-}
-
-// Wrapper message for `uint64`.
-//
-// The JSON representation for `UInt64Value` is JSON string.
-message UInt64Value {
- // The uint64 value.
- uint64 value = 1;
-}
-
-// Wrapper message for `int32`.
-//
-// The JSON representation for `Int32Value` is JSON number.
-message Int32Value {
- // The int32 value.
- int32 value = 1;
-}
-
-// Wrapper message for `uint32`.
-//
-// The JSON representation for `UInt32Value` is JSON number.
-message UInt32Value {
- // The uint32 value.
- uint32 value = 1;
-}
-
-// Wrapper message for `bool`.
-//
-// The JSON representation for `BoolValue` is JSON `true` and `false`.
-message BoolValue {
- // The bool value.
- bool value = 1;
-}
-
-// Wrapper message for `string`.
-//
-// The JSON representation for `StringValue` is JSON string.
-message StringValue {
- // The string value.
- string value = 1;
-}
-
-// Wrapper message for `bytes`.
-//
-// The JSON representation for `BytesValue` is JSON string.
-message BytesValue {
- // The bytes value.
- bytes value = 1;
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/LICENSE.txt b/vendor/github.com/grpc-ecosystem/grpc-gateway/LICENSE.txt
deleted file mode 100644
index 364516251b..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/LICENSE.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2015, Gengo, Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- * Neither the name of Gengo, Inc. nor the names of its
- contributors may be used to endorse or promote products derived from this
- software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/BUILD.bazel b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/BUILD.bazel
deleted file mode 100644
index 9fce044716..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/BUILD.bazel
+++ /dev/null
@@ -1,83 +0,0 @@
-load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
-
-package(default_visibility = ["//visibility:public"])
-
-go_library(
- name = "go_default_library",
- srcs = [
- "context.go",
- "convert.go",
- "doc.go",
- "errors.go",
- "handler.go",
- "marshal_json.go",
- "marshal_jsonpb.go",
- "marshal_proto.go",
- "marshaler.go",
- "marshaler_registry.go",
- "mux.go",
- "pattern.go",
- "proto2_convert.go",
- "proto_errors.go",
- "query.go",
- ],
- importpath = "github.com/grpc-ecosystem/grpc-gateway/runtime",
- deps = [
- "//runtime/internal:go_default_library",
- "//utilities:go_default_library",
- "@com_github_golang_protobuf//jsonpb:go_default_library",
- "@com_github_golang_protobuf//proto:go_default_library",
- "@com_github_golang_protobuf//ptypes:go_default_library",
- "@com_github_golang_protobuf//ptypes/any:go_default_library",
- "@com_github_golang_protobuf//ptypes/duration:go_default_library",
- "@com_github_golang_protobuf//ptypes/timestamp:go_default_library",
- "@org_golang_google_grpc//codes:go_default_library",
- "@org_golang_google_grpc//grpclog:go_default_library",
- "@org_golang_google_grpc//metadata:go_default_library",
- "@org_golang_google_grpc//status:go_default_library",
- ],
-)
-
-go_test(
- name = "go_default_test",
- size = "small",
- srcs = ["pattern_test.go"],
- embed = [":go_default_library"],
- deps = ["//utilities:go_default_library"],
-)
-
-go_test(
- name = "go_default_xtest",
- size = "small",
- srcs = [
- "context_test.go",
- "errors_test.go",
- "handler_test.go",
- "marshal_json_test.go",
- "marshal_jsonpb_test.go",
- "marshal_proto_test.go",
- "marshaler_registry_test.go",
- "mux_test.go",
- "query_test.go",
- ],
- deps = [
- ":go_default_library",
- "//examples/proto/examplepb:go_default_library",
- "//runtime/internal:go_default_library",
- "//utilities:go_default_library",
- "@com_github_golang_protobuf//jsonpb:go_default_library",
- "@com_github_golang_protobuf//proto:go_default_library",
- "@com_github_golang_protobuf//ptypes:go_default_library",
- "@com_github_golang_protobuf//ptypes/duration:go_default_library",
- "@com_github_golang_protobuf//ptypes/empty:go_default_library",
- "@com_github_golang_protobuf//ptypes/struct:go_default_library",
- "@com_github_golang_protobuf//ptypes/timestamp:go_default_library",
- "@com_github_golang_protobuf//ptypes/wrappers:go_default_library",
- "@org_golang_google_genproto//protobuf/field_mask:go_default_library",
- "@org_golang_google_genproto//googleapis/rpc/errdetails:go_default_library",
- "@org_golang_google_grpc//:go_default_library",
- "@org_golang_google_grpc//codes:go_default_library",
- "@org_golang_google_grpc//metadata:go_default_library",
- "@org_golang_google_grpc//status:go_default_library",
- ],
-)
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/context.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/context.go
deleted file mode 100644
index 896057e1e1..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/context.go
+++ /dev/null
@@ -1,210 +0,0 @@
-package runtime
-
-import (
- "context"
- "encoding/base64"
- "fmt"
- "net"
- "net/http"
- "net/textproto"
- "strconv"
- "strings"
- "time"
-
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/grpclog"
- "google.golang.org/grpc/metadata"
- "google.golang.org/grpc/status"
-)
-
-// MetadataHeaderPrefix is the http prefix that represents custom metadata
-// parameters to or from a gRPC call.
-const MetadataHeaderPrefix = "Grpc-Metadata-"
-
-// MetadataPrefix is prepended to permanent HTTP header keys (as specified
-// by the IANA) when added to the gRPC context.
-const MetadataPrefix = "grpcgateway-"
-
-// MetadataTrailerPrefix is prepended to gRPC metadata as it is converted to
-// HTTP headers in a response handled by grpc-gateway
-const MetadataTrailerPrefix = "Grpc-Trailer-"
-
-const metadataGrpcTimeout = "Grpc-Timeout"
-const metadataHeaderBinarySuffix = "-Bin"
-
-const xForwardedFor = "X-Forwarded-For"
-const xForwardedHost = "X-Forwarded-Host"
-
-var (
- // DefaultContextTimeout is used for gRPC call context.WithTimeout whenever a Grpc-Timeout inbound
- // header isn't present. If the value is 0 the sent `context` will not have a timeout.
- DefaultContextTimeout = 0 * time.Second
-)
-
-func decodeBinHeader(v string) ([]byte, error) {
- if len(v)%4 == 0 {
- // Input was padded, or padding was not necessary.
- return base64.StdEncoding.DecodeString(v)
- }
- return base64.RawStdEncoding.DecodeString(v)
-}
-
-/*
-AnnotateContext adds context information such as metadata from the request.
-
-At a minimum, the RemoteAddr is included in the fashion of "X-Forwarded-For",
-except that the forwarded destination is not another HTTP service but rather
-a gRPC service.
-*/
-func AnnotateContext(ctx context.Context, mux *ServeMux, req *http.Request) (context.Context, error) {
- var pairs []string
- timeout := DefaultContextTimeout
- if tm := req.Header.Get(metadataGrpcTimeout); tm != "" {
- var err error
- timeout, err = timeoutDecode(tm)
- if err != nil {
- return nil, status.Errorf(codes.InvalidArgument, "invalid grpc-timeout: %s", tm)
- }
- }
-
- for key, vals := range req.Header {
- for _, val := range vals {
- key = textproto.CanonicalMIMEHeaderKey(key)
- // For backwards-compatibility, pass through 'authorization' header with no prefix.
- if key == "Authorization" {
- pairs = append(pairs, "authorization", val)
- }
- if h, ok := mux.incomingHeaderMatcher(key); ok {
- // Handles "-bin" metadata in grpc, since grpc will do another base64
- // encode before sending to server, we need to decode it first.
- if strings.HasSuffix(key, metadataHeaderBinarySuffix) {
- b, err := decodeBinHeader(val)
- if err != nil {
- return nil, status.Errorf(codes.InvalidArgument, "invalid binary header %s: %s", key, err)
- }
-
- val = string(b)
- }
- pairs = append(pairs, h, val)
- }
- }
- }
- if host := req.Header.Get(xForwardedHost); host != "" {
- pairs = append(pairs, strings.ToLower(xForwardedHost), host)
- } else if req.Host != "" {
- pairs = append(pairs, strings.ToLower(xForwardedHost), req.Host)
- }
-
- if addr := req.RemoteAddr; addr != "" {
- if remoteIP, _, err := net.SplitHostPort(addr); err == nil {
- if fwd := req.Header.Get(xForwardedFor); fwd == "" {
- pairs = append(pairs, strings.ToLower(xForwardedFor), remoteIP)
- } else {
- pairs = append(pairs, strings.ToLower(xForwardedFor), fmt.Sprintf("%s, %s", fwd, remoteIP))
- }
- } else {
- grpclog.Infof("invalid remote addr: %s", addr)
- }
- }
-
- if timeout != 0 {
- ctx, _ = context.WithTimeout(ctx, timeout)
- }
- if len(pairs) == 0 {
- return ctx, nil
- }
- md := metadata.Pairs(pairs...)
- for _, mda := range mux.metadataAnnotators {
- md = metadata.Join(md, mda(ctx, req))
- }
- return metadata.NewOutgoingContext(ctx, md), nil
-}
-
-// ServerMetadata consists of metadata sent from gRPC server.
-type ServerMetadata struct {
- HeaderMD metadata.MD
- TrailerMD metadata.MD
-}
-
-type serverMetadataKey struct{}
-
-// NewServerMetadataContext creates a new context with ServerMetadata
-func NewServerMetadataContext(ctx context.Context, md ServerMetadata) context.Context {
- return context.WithValue(ctx, serverMetadataKey{}, md)
-}
-
-// ServerMetadataFromContext returns the ServerMetadata in ctx
-func ServerMetadataFromContext(ctx context.Context) (md ServerMetadata, ok bool) {
- md, ok = ctx.Value(serverMetadataKey{}).(ServerMetadata)
- return
-}
-
-func timeoutDecode(s string) (time.Duration, error) {
- size := len(s)
- if size < 2 {
- return 0, fmt.Errorf("timeout string is too short: %q", s)
- }
- d, ok := timeoutUnitToDuration(s[size-1])
- if !ok {
- return 0, fmt.Errorf("timeout unit is not recognized: %q", s)
- }
- t, err := strconv.ParseInt(s[:size-1], 10, 64)
- if err != nil {
- return 0, err
- }
- return d * time.Duration(t), nil
-}
-
-func timeoutUnitToDuration(u uint8) (d time.Duration, ok bool) {
- switch u {
- case 'H':
- return time.Hour, true
- case 'M':
- return time.Minute, true
- case 'S':
- return time.Second, true
- case 'm':
- return time.Millisecond, true
- case 'u':
- return time.Microsecond, true
- case 'n':
- return time.Nanosecond, true
- default:
- }
- return
-}
-
-// isPermanentHTTPHeader checks whether hdr belongs to the list of
-// permenant request headers maintained by IANA.
-// http://www.iana.org/assignments/message-headers/message-headers.xml
-func isPermanentHTTPHeader(hdr string) bool {
- switch hdr {
- case
- "Accept",
- "Accept-Charset",
- "Accept-Language",
- "Accept-Ranges",
- "Authorization",
- "Cache-Control",
- "Content-Type",
- "Cookie",
- "Date",
- "Expect",
- "From",
- "Host",
- "If-Match",
- "If-Modified-Since",
- "If-None-Match",
- "If-Schedule-Tag-Match",
- "If-Unmodified-Since",
- "Max-Forwards",
- "Origin",
- "Pragma",
- "Referer",
- "User-Agent",
- "Via",
- "Warning":
- return true
- }
- return false
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/convert.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/convert.go
deleted file mode 100644
index bd54ba12be..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/convert.go
+++ /dev/null
@@ -1,254 +0,0 @@
-package runtime
-
-import (
- "encoding/base64"
- "fmt"
- "strconv"
- "strings"
-
- "github.com/golang/protobuf/jsonpb"
- "github.com/golang/protobuf/ptypes/duration"
- "github.com/golang/protobuf/ptypes/timestamp"
-)
-
-// String just returns the given string.
-// It is just for compatibility to other types.
-func String(val string) (string, error) {
- return val, nil
-}
-
-// StringSlice converts 'val' where individual strings are separated by
-// 'sep' into a string slice.
-func StringSlice(val, sep string) ([]string, error) {
- return strings.Split(val, sep), nil
-}
-
-// Bool converts the given string representation of a boolean value into bool.
-func Bool(val string) (bool, error) {
- return strconv.ParseBool(val)
-}
-
-// BoolSlice converts 'val' where individual booleans are separated by
-// 'sep' into a bool slice.
-func BoolSlice(val, sep string) ([]bool, error) {
- s := strings.Split(val, sep)
- values := make([]bool, len(s))
- for i, v := range s {
- value, err := Bool(v)
- if err != nil {
- return values, err
- }
- values[i] = value
- }
- return values, nil
-}
-
-// Float64 converts the given string representation into representation of a floating point number into float64.
-func Float64(val string) (float64, error) {
- return strconv.ParseFloat(val, 64)
-}
-
-// Float64Slice converts 'val' where individual floating point numbers are separated by
-// 'sep' into a float64 slice.
-func Float64Slice(val, sep string) ([]float64, error) {
- s := strings.Split(val, sep)
- values := make([]float64, len(s))
- for i, v := range s {
- value, err := Float64(v)
- if err != nil {
- return values, err
- }
- values[i] = value
- }
- return values, nil
-}
-
-// Float32 converts the given string representation of a floating point number into float32.
-func Float32(val string) (float32, error) {
- f, err := strconv.ParseFloat(val, 32)
- if err != nil {
- return 0, err
- }
- return float32(f), nil
-}
-
-// Float32Slice converts 'val' where individual floating point numbers are separated by
-// 'sep' into a float32 slice.
-func Float32Slice(val, sep string) ([]float32, error) {
- s := strings.Split(val, sep)
- values := make([]float32, len(s))
- for i, v := range s {
- value, err := Float32(v)
- if err != nil {
- return values, err
- }
- values[i] = value
- }
- return values, nil
-}
-
-// Int64 converts the given string representation of an integer into int64.
-func Int64(val string) (int64, error) {
- return strconv.ParseInt(val, 0, 64)
-}
-
-// Int64Slice converts 'val' where individual integers are separated by
-// 'sep' into a int64 slice.
-func Int64Slice(val, sep string) ([]int64, error) {
- s := strings.Split(val, sep)
- values := make([]int64, len(s))
- for i, v := range s {
- value, err := Int64(v)
- if err != nil {
- return values, err
- }
- values[i] = value
- }
- return values, nil
-}
-
-// Int32 converts the given string representation of an integer into int32.
-func Int32(val string) (int32, error) {
- i, err := strconv.ParseInt(val, 0, 32)
- if err != nil {
- return 0, err
- }
- return int32(i), nil
-}
-
-// Int32Slice converts 'val' where individual integers are separated by
-// 'sep' into a int32 slice.
-func Int32Slice(val, sep string) ([]int32, error) {
- s := strings.Split(val, sep)
- values := make([]int32, len(s))
- for i, v := range s {
- value, err := Int32(v)
- if err != nil {
- return values, err
- }
- values[i] = value
- }
- return values, nil
-}
-
-// Uint64 converts the given string representation of an integer into uint64.
-func Uint64(val string) (uint64, error) {
- return strconv.ParseUint(val, 0, 64)
-}
-
-// Uint64Slice converts 'val' where individual integers are separated by
-// 'sep' into a uint64 slice.
-func Uint64Slice(val, sep string) ([]uint64, error) {
- s := strings.Split(val, sep)
- values := make([]uint64, len(s))
- for i, v := range s {
- value, err := Uint64(v)
- if err != nil {
- return values, err
- }
- values[i] = value
- }
- return values, nil
-}
-
-// Uint32 converts the given string representation of an integer into uint32.
-func Uint32(val string) (uint32, error) {
- i, err := strconv.ParseUint(val, 0, 32)
- if err != nil {
- return 0, err
- }
- return uint32(i), nil
-}
-
-// Uint32Slice converts 'val' where individual integers are separated by
-// 'sep' into a uint32 slice.
-func Uint32Slice(val, sep string) ([]uint32, error) {
- s := strings.Split(val, sep)
- values := make([]uint32, len(s))
- for i, v := range s {
- value, err := Uint32(v)
- if err != nil {
- return values, err
- }
- values[i] = value
- }
- return values, nil
-}
-
-// Bytes converts the given string representation of a byte sequence into a slice of bytes
-// A bytes sequence is encoded in URL-safe base64 without padding
-func Bytes(val string) ([]byte, error) {
- b, err := base64.StdEncoding.DecodeString(val)
- if err != nil {
- b, err = base64.URLEncoding.DecodeString(val)
- if err != nil {
- return nil, err
- }
- }
- return b, nil
-}
-
-// BytesSlice converts 'val' where individual bytes sequences, encoded in URL-safe
-// base64 without padding, are separated by 'sep' into a slice of bytes slices slice.
-func BytesSlice(val, sep string) ([][]byte, error) {
- s := strings.Split(val, sep)
- values := make([][]byte, len(s))
- for i, v := range s {
- value, err := Bytes(v)
- if err != nil {
- return values, err
- }
- values[i] = value
- }
- return values, nil
-}
-
-// Timestamp converts the given RFC3339 formatted string into a timestamp.Timestamp.
-func Timestamp(val string) (*timestamp.Timestamp, error) {
- var r *timestamp.Timestamp
- err := jsonpb.UnmarshalString(val, r)
- return r, err
-}
-
-// Duration converts the given string into a timestamp.Duration.
-func Duration(val string) (*duration.Duration, error) {
- var r *duration.Duration
- err := jsonpb.UnmarshalString(val, r)
- return r, err
-}
-
-// Enum converts the given string into an int32 that should be type casted into the
-// correct enum proto type.
-func Enum(val string, enumValMap map[string]int32) (int32, error) {
- e, ok := enumValMap[val]
- if ok {
- return e, nil
- }
-
- i, err := Int32(val)
- if err != nil {
- return 0, fmt.Errorf("%s is not valid", val)
- }
- for _, v := range enumValMap {
- if v == i {
- return i, nil
- }
- }
- return 0, fmt.Errorf("%s is not valid", val)
-}
-
-// EnumSlice converts 'val' where individual enums are separated by 'sep'
-// into a int32 slice. Each individual int32 should be type casted into the
-// correct enum proto type.
-func EnumSlice(val, sep string, enumValMap map[string]int32) ([]int32, error) {
- s := strings.Split(val, sep)
- values := make([]int32, len(s))
- for i, v := range s {
- value, err := Enum(v, enumValMap)
- if err != nil {
- return values, err
- }
- values[i] = value
- }
- return values, nil
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/doc.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/doc.go
deleted file mode 100644
index b6e5ddf7a9..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/doc.go
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
-Package runtime contains runtime helper functions used by
-servers which protoc-gen-grpc-gateway generates.
-*/
-package runtime
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/errors.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/errors.go
deleted file mode 100644
index b39f55ea82..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/errors.go
+++ /dev/null
@@ -1,136 +0,0 @@
-package runtime
-
-import (
- "context"
- "io"
- "net/http"
-
- "github.com/golang/protobuf/proto"
- "github.com/golang/protobuf/ptypes/any"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/grpclog"
- "google.golang.org/grpc/status"
-)
-
-// HTTPStatusFromCode converts a gRPC error code into the corresponding HTTP response status.
-// See: https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto
-func HTTPStatusFromCode(code codes.Code) int {
- switch code {
- case codes.OK:
- return http.StatusOK
- case codes.Canceled:
- return http.StatusRequestTimeout
- case codes.Unknown:
- return http.StatusInternalServerError
- case codes.InvalidArgument:
- return http.StatusBadRequest
- case codes.DeadlineExceeded:
- return http.StatusGatewayTimeout
- case codes.NotFound:
- return http.StatusNotFound
- case codes.AlreadyExists:
- return http.StatusConflict
- case codes.PermissionDenied:
- return http.StatusForbidden
- case codes.Unauthenticated:
- return http.StatusUnauthorized
- case codes.ResourceExhausted:
- return http.StatusTooManyRequests
- case codes.FailedPrecondition:
- return http.StatusPreconditionFailed
- case codes.Aborted:
- return http.StatusConflict
- case codes.OutOfRange:
- return http.StatusBadRequest
- case codes.Unimplemented:
- return http.StatusNotImplemented
- case codes.Internal:
- return http.StatusInternalServerError
- case codes.Unavailable:
- return http.StatusServiceUnavailable
- case codes.DataLoss:
- return http.StatusInternalServerError
- }
-
- grpclog.Infof("Unknown gRPC error code: %v", code)
- return http.StatusInternalServerError
-}
-
-var (
- // HTTPError replies to the request with the error.
- // You can set a custom function to this variable to customize error format.
- HTTPError = DefaultHTTPError
- // OtherErrorHandler handles the following error used by the gateway: StatusMethodNotAllowed StatusNotFound and StatusBadRequest
- OtherErrorHandler = DefaultOtherErrorHandler
-)
-
-type errorBody struct {
- Error string `protobuf:"bytes,1,name=error" json:"error"`
- // This is to make the error more compatible with users that expect errors to be Status objects:
- // https://github.com/grpc/grpc/blob/master/src/proto/grpc/status/status.proto
- // It should be the exact same message as the Error field.
- Message string `protobuf:"bytes,1,name=message" json:"message"`
- Code int32 `protobuf:"varint,2,name=code" json:"code"`
- Details []*any.Any `protobuf:"bytes,3,rep,name=details" json:"details,omitempty"`
-}
-
-// Make this also conform to proto.Message for builtin JSONPb Marshaler
-func (e *errorBody) Reset() { *e = errorBody{} }
-func (e *errorBody) String() string { return proto.CompactTextString(e) }
-func (*errorBody) ProtoMessage() {}
-
-// DefaultHTTPError is the default implementation of HTTPError.
-// If "err" is an error from gRPC system, the function replies with the status code mapped by HTTPStatusFromCode.
-// If otherwise, it replies with http.StatusInternalServerError.
-//
-// The response body returned by this function is a JSON object,
-// which contains a member whose key is "error" and whose value is err.Error().
-func DefaultHTTPError(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, _ *http.Request, err error) {
- const fallback = `{"error": "failed to marshal error message"}`
-
- w.Header().Del("Trailer")
- w.Header().Set("Content-Type", marshaler.ContentType())
-
- s, ok := status.FromError(err)
- if !ok {
- s = status.New(codes.Unknown, err.Error())
- }
-
- body := &errorBody{
- Error: s.Message(),
- Message: s.Message(),
- Code: int32(s.Code()),
- Details: s.Proto().GetDetails(),
- }
-
- buf, merr := marshaler.Marshal(body)
- if merr != nil {
- grpclog.Infof("Failed to marshal error message %q: %v", body, merr)
- w.WriteHeader(http.StatusInternalServerError)
- if _, err := io.WriteString(w, fallback); err != nil {
- grpclog.Infof("Failed to write response: %v", err)
- }
- return
- }
-
- md, ok := ServerMetadataFromContext(ctx)
- if !ok {
- grpclog.Infof("Failed to extract ServerMetadata from context")
- }
-
- handleForwardResponseServerMetadata(w, mux, md)
- handleForwardResponseTrailerHeader(w, md)
- st := HTTPStatusFromCode(s.Code())
- w.WriteHeader(st)
- if _, err := w.Write(buf); err != nil {
- grpclog.Infof("Failed to write response: %v", err)
- }
-
- handleForwardResponseTrailer(w, md)
-}
-
-// DefaultOtherErrorHandler is the default implementation of OtherErrorHandler.
-// It simply writes a string representation of the given error into "w".
-func DefaultOtherErrorHandler(w http.ResponseWriter, _ *http.Request, msg string, code int) {
- http.Error(w, msg, code)
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/handler.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/handler.go
deleted file mode 100644
index 8ad9d766e1..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/handler.go
+++ /dev/null
@@ -1,206 +0,0 @@
-package runtime
-
-import (
- "fmt"
- "io"
- "net/http"
- "net/textproto"
-
- "context"
- "github.com/golang/protobuf/proto"
- "github.com/golang/protobuf/ptypes/any"
- "github.com/grpc-ecosystem/grpc-gateway/runtime/internal"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/grpclog"
- "google.golang.org/grpc/status"
-)
-
-// ForwardResponseStream forwards the stream from gRPC server to REST client.
-func ForwardResponseStream(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, req *http.Request, recv func() (proto.Message, error), opts ...func(context.Context, http.ResponseWriter, proto.Message) error) {
- f, ok := w.(http.Flusher)
- if !ok {
- grpclog.Infof("Flush not supported in %T", w)
- http.Error(w, "unexpected type of web server", http.StatusInternalServerError)
- return
- }
-
- md, ok := ServerMetadataFromContext(ctx)
- if !ok {
- grpclog.Infof("Failed to extract ServerMetadata from context")
- http.Error(w, "unexpected error", http.StatusInternalServerError)
- return
- }
- handleForwardResponseServerMetadata(w, mux, md)
-
- w.Header().Set("Transfer-Encoding", "chunked")
- w.Header().Set("Content-Type", marshaler.ContentType())
- if err := handleForwardResponseOptions(ctx, w, nil, opts); err != nil {
- HTTPError(ctx, mux, marshaler, w, req, err)
- return
- }
-
- var delimiter []byte
- if d, ok := marshaler.(Delimited); ok {
- delimiter = d.Delimiter()
- } else {
- delimiter = []byte("\n")
- }
-
- var wroteHeader bool
- for {
- resp, err := recv()
- if err == io.EOF {
- return
- }
- if err != nil {
- handleForwardResponseStreamError(wroteHeader, marshaler, w, err)
- return
- }
- if err := handleForwardResponseOptions(ctx, w, resp, opts); err != nil {
- handleForwardResponseStreamError(wroteHeader, marshaler, w, err)
- return
- }
-
- buf, err := marshaler.Marshal(streamChunk(resp, nil))
- if err != nil {
- grpclog.Infof("Failed to marshal response chunk: %v", err)
- handleForwardResponseStreamError(wroteHeader, marshaler, w, err)
- return
- }
- if _, err = w.Write(buf); err != nil {
- grpclog.Infof("Failed to send response chunk: %v", err)
- return
- }
- wroteHeader = true
- if _, err = w.Write(delimiter); err != nil {
- grpclog.Infof("Failed to send delimiter chunk: %v", err)
- return
- }
- f.Flush()
- }
-}
-
-func handleForwardResponseServerMetadata(w http.ResponseWriter, mux *ServeMux, md ServerMetadata) {
- for k, vs := range md.HeaderMD {
- if h, ok := mux.outgoingHeaderMatcher(k); ok {
- for _, v := range vs {
- w.Header().Add(h, v)
- }
- }
- }
-}
-
-func handleForwardResponseTrailerHeader(w http.ResponseWriter, md ServerMetadata) {
- for k := range md.TrailerMD {
- tKey := textproto.CanonicalMIMEHeaderKey(fmt.Sprintf("%s%s", MetadataTrailerPrefix, k))
- w.Header().Add("Trailer", tKey)
- }
-}
-
-func handleForwardResponseTrailer(w http.ResponseWriter, md ServerMetadata) {
- for k, vs := range md.TrailerMD {
- tKey := fmt.Sprintf("%s%s", MetadataTrailerPrefix, k)
- for _, v := range vs {
- w.Header().Add(tKey, v)
- }
- }
-}
-
-// responseBody interface contains method for getting field for marshaling to the response body
-// this method is generated for response struct from the value of `response_body` in the `google.api.HttpRule`
-type responseBody interface {
- XXX_ResponseBody() interface{}
-}
-
-// ForwardResponseMessage forwards the message "resp" from gRPC server to REST client.
-func ForwardResponseMessage(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, req *http.Request, resp proto.Message, opts ...func(context.Context, http.ResponseWriter, proto.Message) error) {
- md, ok := ServerMetadataFromContext(ctx)
- if !ok {
- grpclog.Infof("Failed to extract ServerMetadata from context")
- }
-
- handleForwardResponseServerMetadata(w, mux, md)
- handleForwardResponseTrailerHeader(w, md)
- w.Header().Set("Content-Type", marshaler.ContentType())
- if err := handleForwardResponseOptions(ctx, w, resp, opts); err != nil {
- HTTPError(ctx, mux, marshaler, w, req, err)
- return
- }
- var buf []byte
- var err error
- if rb, ok := resp.(responseBody); ok {
- buf, err = marshaler.Marshal(rb.XXX_ResponseBody())
- } else {
- buf, err = marshaler.Marshal(resp)
- }
- if err != nil {
- grpclog.Infof("Marshal error: %v", err)
- HTTPError(ctx, mux, marshaler, w, req, err)
- return
- }
-
- if _, err = w.Write(buf); err != nil {
- grpclog.Infof("Failed to write response: %v", err)
- }
-
- handleForwardResponseTrailer(w, md)
-}
-
-func handleForwardResponseOptions(ctx context.Context, w http.ResponseWriter, resp proto.Message, opts []func(context.Context, http.ResponseWriter, proto.Message) error) error {
- if len(opts) == 0 {
- return nil
- }
- for _, opt := range opts {
- if err := opt(ctx, w, resp); err != nil {
- grpclog.Infof("Error handling ForwardResponseOptions: %v", err)
- return err
- }
- }
- return nil
-}
-
-func handleForwardResponseStreamError(wroteHeader bool, marshaler Marshaler, w http.ResponseWriter, err error) {
- buf, merr := marshaler.Marshal(streamChunk(nil, err))
- if merr != nil {
- grpclog.Infof("Failed to marshal an error: %v", merr)
- return
- }
- if !wroteHeader {
- s, ok := status.FromError(err)
- if !ok {
- s = status.New(codes.Unknown, err.Error())
- }
- w.WriteHeader(HTTPStatusFromCode(s.Code()))
- }
- if _, werr := w.Write(buf); werr != nil {
- grpclog.Infof("Failed to notify error to client: %v", werr)
- return
- }
-}
-
-func streamChunk(result proto.Message, err error) map[string]proto.Message {
- if err != nil {
- grpcCode := codes.Unknown
- grpcMessage := err.Error()
- var grpcDetails []*any.Any
- if s, ok := status.FromError(err); ok {
- grpcCode = s.Code()
- grpcMessage = s.Message()
- grpcDetails = s.Proto().GetDetails()
- }
- httpCode := HTTPStatusFromCode(grpcCode)
- return map[string]proto.Message{
- "error": &internal.StreamError{
- GrpcCode: int32(grpcCode),
- HttpCode: int32(httpCode),
- Message: grpcMessage,
- HttpStatus: http.StatusText(httpCode),
- Details: grpcDetails,
- },
- }
- }
- if result == nil {
- return streamChunk(nil, fmt.Errorf("empty response"))
- }
- return map[string]proto.Message{"result": result}
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/BUILD.bazel b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/BUILD.bazel
deleted file mode 100644
index 937e66089e..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/BUILD.bazel
+++ /dev/null
@@ -1,23 +0,0 @@
-load("@io_bazel_rules_go//go:def.bzl", "go_library")
-load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
-
-package(default_visibility = ["//runtime:__subpackages__"])
-
-proto_library(
- name = "internal_proto",
- srcs = ["stream_chunk.proto"],
- deps = ["@com_google_protobuf//:any_proto"],
-)
-
-go_proto_library(
- name = "internal_go_proto",
- importpath = "github.com/grpc-ecosystem/grpc-gateway/runtime/internal",
- proto = ":internal_proto",
- deps = ["@com_github_golang_protobuf//ptypes/any:go_default_library"],
-)
-
-go_library(
- name = "go_default_library",
- embed = [":internal_go_proto"],
- importpath = "github.com/grpc-ecosystem/grpc-gateway/runtime/internal",
-)
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/stream_chunk.pb.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/stream_chunk.pb.go
deleted file mode 100644
index f4af074808..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/stream_chunk.pb.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: runtime/internal/stream_chunk.proto
-
-package internal
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import any "github.com/golang/protobuf/ptypes/any"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-// StreamError is a response type which is returned when
-// streaming rpc returns an error.
-type StreamError struct {
- GrpcCode int32 `protobuf:"varint,1,opt,name=grpc_code,json=grpcCode,proto3" json:"grpc_code,omitempty"`
- HttpCode int32 `protobuf:"varint,2,opt,name=http_code,json=httpCode,proto3" json:"http_code,omitempty"`
- Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
- HttpStatus string `protobuf:"bytes,4,opt,name=http_status,json=httpStatus,proto3" json:"http_status,omitempty"`
- Details []*any.Any `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *StreamError) Reset() { *m = StreamError{} }
-func (m *StreamError) String() string { return proto.CompactTextString(m) }
-func (*StreamError) ProtoMessage() {}
-func (*StreamError) Descriptor() ([]byte, []int) {
- return fileDescriptor_stream_chunk_6adb10b40700458b, []int{0}
-}
-func (m *StreamError) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_StreamError.Unmarshal(m, b)
-}
-func (m *StreamError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_StreamError.Marshal(b, m, deterministic)
-}
-func (dst *StreamError) XXX_Merge(src proto.Message) {
- xxx_messageInfo_StreamError.Merge(dst, src)
-}
-func (m *StreamError) XXX_Size() int {
- return xxx_messageInfo_StreamError.Size(m)
-}
-func (m *StreamError) XXX_DiscardUnknown() {
- xxx_messageInfo_StreamError.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_StreamError proto.InternalMessageInfo
-
-func (m *StreamError) GetGrpcCode() int32 {
- if m != nil {
- return m.GrpcCode
- }
- return 0
-}
-
-func (m *StreamError) GetHttpCode() int32 {
- if m != nil {
- return m.HttpCode
- }
- return 0
-}
-
-func (m *StreamError) GetMessage() string {
- if m != nil {
- return m.Message
- }
- return ""
-}
-
-func (m *StreamError) GetHttpStatus() string {
- if m != nil {
- return m.HttpStatus
- }
- return ""
-}
-
-func (m *StreamError) GetDetails() []*any.Any {
- if m != nil {
- return m.Details
- }
- return nil
-}
-
-func init() {
- proto.RegisterType((*StreamError)(nil), "grpc.gateway.runtime.StreamError")
-}
-
-func init() {
- proto.RegisterFile("runtime/internal/stream_chunk.proto", fileDescriptor_stream_chunk_6adb10b40700458b)
-}
-
-var fileDescriptor_stream_chunk_6adb10b40700458b = []byte{
- // 226 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x34, 0x90, 0xc1, 0x4e, 0x84, 0x30,
- 0x10, 0x86, 0x83, 0xeb, 0xba, 0xbb, 0xc3, 0x8d, 0xec, 0xa1, 0xea, 0x41, 0xa2, 0x17, 0x4e, 0x25,
- 0xd1, 0x27, 0x50, 0xe3, 0x0b, 0xb0, 0x37, 0x2f, 0x9b, 0x59, 0x18, 0x0b, 0x11, 0x5a, 0x32, 0x1d,
- 0x62, 0x78, 0x2d, 0x9f, 0xd0, 0xb4, 0xc8, 0xb1, 0xdf, 0xf7, 0xff, 0x93, 0x3f, 0x85, 0x27, 0x9e,
- 0xac, 0x74, 0x03, 0x95, 0x9d, 0x15, 0x62, 0x8b, 0x7d, 0xe9, 0x85, 0x09, 0x87, 0x73, 0xdd, 0x4e,
- 0xf6, 0x5b, 0x8f, 0xec, 0xc4, 0x65, 0x47, 0xc3, 0x63, 0xad, 0x0d, 0x0a, 0xfd, 0xe0, 0xac, 0xff,
- 0x1b, 0x77, 0xb7, 0xc6, 0x39, 0xd3, 0x53, 0x19, 0x33, 0x97, 0xe9, 0xab, 0x44, 0x3b, 0x2f, 0x85,
- 0xc7, 0xdf, 0x04, 0xd2, 0x53, 0xbc, 0xf3, 0xc1, 0xec, 0x38, 0xbb, 0x87, 0x43, 0x38, 0x71, 0xae,
- 0x5d, 0x43, 0x2a, 0xc9, 0x93, 0x62, 0x5b, 0xed, 0x03, 0x78, 0x77, 0x0d, 0x05, 0xd9, 0x8a, 0x8c,
- 0x8b, 0xbc, 0x5a, 0x64, 0x00, 0x51, 0x2a, 0xd8, 0x0d, 0xe4, 0x3d, 0x1a, 0x52, 0x9b, 0x3c, 0x29,
- 0x0e, 0xd5, 0xfa, 0xcc, 0x1e, 0x20, 0x8d, 0x35, 0x2f, 0x28, 0x93, 0x57, 0xd7, 0xd1, 0x42, 0x40,
- 0xa7, 0x48, 0x32, 0x0d, 0xbb, 0x86, 0x04, 0xbb, 0xde, 0xab, 0x6d, 0xbe, 0x29, 0xd2, 0xe7, 0xa3,
- 0x5e, 0x16, 0xeb, 0x75, 0xb1, 0x7e, 0xb5, 0x73, 0xb5, 0x86, 0xde, 0xe0, 0x73, 0xbf, 0x7e, 0xc2,
- 0xe5, 0x26, 0x46, 0x5e, 0xfe, 0x02, 0x00, 0x00, 0xff, 0xff, 0x16, 0x75, 0x92, 0x08, 0x1f, 0x01,
- 0x00, 0x00,
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/stream_chunk.proto b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/stream_chunk.proto
deleted file mode 100644
index 55f42ce63e..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/stream_chunk.proto
+++ /dev/null
@@ -1,15 +0,0 @@
-syntax = "proto3";
-package grpc.gateway.runtime;
-option go_package = "internal";
-
-import "google/protobuf/any.proto";
-
-// StreamError is a response type which is returned when
-// streaming rpc returns an error.
-message StreamError {
- int32 grpc_code = 1;
- int32 http_code = 2;
- string message = 3;
- string http_status = 4;
- repeated google.protobuf.Any details = 5;
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_json.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_json.go
deleted file mode 100644
index f9d3a585a4..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_json.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package runtime
-
-import (
- "encoding/json"
- "io"
-)
-
-// JSONBuiltin is a Marshaler which marshals/unmarshals into/from JSON
-// with the standard "encoding/json" package of Golang.
-// Although it is generally faster for simple proto messages than JSONPb,
-// it does not support advanced features of protobuf, e.g. map, oneof, ....
-//
-// The NewEncoder and NewDecoder types return *json.Encoder and
-// *json.Decoder respectively.
-type JSONBuiltin struct{}
-
-// ContentType always Returns "application/json".
-func (*JSONBuiltin) ContentType() string {
- return "application/json"
-}
-
-// Marshal marshals "v" into JSON
-func (j *JSONBuiltin) Marshal(v interface{}) ([]byte, error) {
- return json.Marshal(v)
-}
-
-// Unmarshal unmarshals JSON data into "v".
-func (j *JSONBuiltin) Unmarshal(data []byte, v interface{}) error {
- return json.Unmarshal(data, v)
-}
-
-// NewDecoder returns a Decoder which reads JSON stream from "r".
-func (j *JSONBuiltin) NewDecoder(r io.Reader) Decoder {
- return json.NewDecoder(r)
-}
-
-// NewEncoder returns an Encoder which writes JSON stream into "w".
-func (j *JSONBuiltin) NewEncoder(w io.Writer) Encoder {
- return json.NewEncoder(w)
-}
-
-// Delimiter for newline encoded JSON streams.
-func (j *JSONBuiltin) Delimiter() []byte {
- return []byte("\n")
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_jsonpb.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_jsonpb.go
deleted file mode 100644
index f56072a6f1..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_jsonpb.go
+++ /dev/null
@@ -1,203 +0,0 @@
-package runtime
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "io"
- "reflect"
-
- "github.com/golang/protobuf/jsonpb"
- "github.com/golang/protobuf/proto"
-)
-
-// JSONPb is a Marshaler which marshals/unmarshals into/from JSON
-// with the "github.com/golang/protobuf/jsonpb".
-// It supports fully functionality of protobuf unlike JSONBuiltin.
-//
-// The NewDecoder method returns a DecoderWrapper, so the underlying
-// *json.Decoder methods can be used.
-type JSONPb jsonpb.Marshaler
-
-// ContentType always returns "application/json".
-func (*JSONPb) ContentType() string {
- return "application/json"
-}
-
-// Marshal marshals "v" into JSON.
-func (j *JSONPb) Marshal(v interface{}) ([]byte, error) {
- if _, ok := v.(proto.Message); !ok {
- return j.marshalNonProtoField(v)
- }
-
- var buf bytes.Buffer
- if err := j.marshalTo(&buf, v); err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-
-func (j *JSONPb) marshalTo(w io.Writer, v interface{}) error {
- p, ok := v.(proto.Message)
- if !ok {
- buf, err := j.marshalNonProtoField(v)
- if err != nil {
- return err
- }
- _, err = w.Write(buf)
- return err
- }
- return (*jsonpb.Marshaler)(j).Marshal(w, p)
-}
-
-// marshalNonProto marshals a non-message field of a protobuf message.
-// This function does not correctly marshals arbitrary data structure into JSON,
-// but it is only capable of marshaling non-message field values of protobuf,
-// i.e. primitive types, enums; pointers to primitives or enums; maps from
-// integer/string types to primitives/enums/pointers to messages.
-func (j *JSONPb) marshalNonProtoField(v interface{}) ([]byte, error) {
- if v == nil {
- return []byte("null"), nil
- }
- rv := reflect.ValueOf(v)
- for rv.Kind() == reflect.Ptr {
- if rv.IsNil() {
- return []byte("null"), nil
- }
- rv = rv.Elem()
- }
-
- if rv.Kind() == reflect.Map {
- m := make(map[string]*json.RawMessage)
- for _, k := range rv.MapKeys() {
- buf, err := j.Marshal(rv.MapIndex(k).Interface())
- if err != nil {
- return nil, err
- }
- m[fmt.Sprintf("%v", k.Interface())] = (*json.RawMessage)(&buf)
- }
- if j.Indent != "" {
- return json.MarshalIndent(m, "", j.Indent)
- }
- return json.Marshal(m)
- }
- if enum, ok := rv.Interface().(protoEnum); ok && !j.EnumsAsInts {
- return json.Marshal(enum.String())
- }
- return json.Marshal(rv.Interface())
-}
-
-// Unmarshal unmarshals JSON "data" into "v"
-func (j *JSONPb) Unmarshal(data []byte, v interface{}) error {
- return unmarshalJSONPb(data, v)
-}
-
-// NewDecoder returns a Decoder which reads JSON stream from "r".
-func (j *JSONPb) NewDecoder(r io.Reader) Decoder {
- d := json.NewDecoder(r)
- return DecoderWrapper{Decoder: d}
-}
-
-// DecoderWrapper is a wrapper around a *json.Decoder that adds
-// support for protos to the Decode method.
-type DecoderWrapper struct {
- *json.Decoder
-}
-
-// Decode wraps the embedded decoder's Decode method to support
-// protos using a jsonpb.Unmarshaler.
-func (d DecoderWrapper) Decode(v interface{}) error {
- return decodeJSONPb(d.Decoder, v)
-}
-
-// NewEncoder returns an Encoder which writes JSON stream into "w".
-func (j *JSONPb) NewEncoder(w io.Writer) Encoder {
- return EncoderFunc(func(v interface{}) error { return j.marshalTo(w, v) })
-}
-
-func unmarshalJSONPb(data []byte, v interface{}) error {
- d := json.NewDecoder(bytes.NewReader(data))
- return decodeJSONPb(d, v)
-}
-
-func decodeJSONPb(d *json.Decoder, v interface{}) error {
- p, ok := v.(proto.Message)
- if !ok {
- return decodeNonProtoField(d, v)
- }
- unmarshaler := &jsonpb.Unmarshaler{AllowUnknownFields: true}
- return unmarshaler.UnmarshalNext(d, p)
-}
-
-func decodeNonProtoField(d *json.Decoder, v interface{}) error {
- rv := reflect.ValueOf(v)
- if rv.Kind() != reflect.Ptr {
- return fmt.Errorf("%T is not a pointer", v)
- }
- for rv.Kind() == reflect.Ptr {
- if rv.IsNil() {
- rv.Set(reflect.New(rv.Type().Elem()))
- }
- if rv.Type().ConvertibleTo(typeProtoMessage) {
- unmarshaler := &jsonpb.Unmarshaler{AllowUnknownFields: true}
- return unmarshaler.UnmarshalNext(d, rv.Interface().(proto.Message))
- }
- rv = rv.Elem()
- }
- if rv.Kind() == reflect.Map {
- if rv.IsNil() {
- rv.Set(reflect.MakeMap(rv.Type()))
- }
- conv, ok := convFromType[rv.Type().Key().Kind()]
- if !ok {
- return fmt.Errorf("unsupported type of map field key: %v", rv.Type().Key())
- }
-
- m := make(map[string]*json.RawMessage)
- if err := d.Decode(&m); err != nil {
- return err
- }
- for k, v := range m {
- result := conv.Call([]reflect.Value{reflect.ValueOf(k)})
- if err := result[1].Interface(); err != nil {
- return err.(error)
- }
- bk := result[0]
- bv := reflect.New(rv.Type().Elem())
- if err := unmarshalJSONPb([]byte(*v), bv.Interface()); err != nil {
- return err
- }
- rv.SetMapIndex(bk, bv.Elem())
- }
- return nil
- }
- if _, ok := rv.Interface().(protoEnum); ok {
- var repr interface{}
- if err := d.Decode(&repr); err != nil {
- return err
- }
- switch repr.(type) {
- case string:
- // TODO(yugui) Should use proto.StructProperties?
- return fmt.Errorf("unmarshaling of symbolic enum %q not supported: %T", repr, rv.Interface())
- case float64:
- rv.Set(reflect.ValueOf(int32(repr.(float64))).Convert(rv.Type()))
- return nil
- default:
- return fmt.Errorf("cannot assign %#v into Go type %T", repr, rv.Interface())
- }
- }
- return d.Decode(v)
-}
-
-type protoEnum interface {
- fmt.Stringer
- EnumDescriptor() ([]byte, []int)
-}
-
-var typeProtoMessage = reflect.TypeOf((*proto.Message)(nil)).Elem()
-
-// Delimiter for newline encoded JSON streams.
-func (j *JSONPb) Delimiter() []byte {
- return []byte("\n")
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_proto.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_proto.go
deleted file mode 100644
index f65d1a2676..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_proto.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package runtime
-
-import (
- "io"
-
- "errors"
- "github.com/golang/protobuf/proto"
- "io/ioutil"
-)
-
-// ProtoMarshaller is a Marshaller which marshals/unmarshals into/from serialize proto bytes
-type ProtoMarshaller struct{}
-
-// ContentType always returns "application/octet-stream".
-func (*ProtoMarshaller) ContentType() string {
- return "application/octet-stream"
-}
-
-// Marshal marshals "value" into Proto
-func (*ProtoMarshaller) Marshal(value interface{}) ([]byte, error) {
- message, ok := value.(proto.Message)
- if !ok {
- return nil, errors.New("unable to marshal non proto field")
- }
- return proto.Marshal(message)
-}
-
-// Unmarshal unmarshals proto "data" into "value"
-func (*ProtoMarshaller) Unmarshal(data []byte, value interface{}) error {
- message, ok := value.(proto.Message)
- if !ok {
- return errors.New("unable to unmarshal non proto field")
- }
- return proto.Unmarshal(data, message)
-}
-
-// NewDecoder returns a Decoder which reads proto stream from "reader".
-func (marshaller *ProtoMarshaller) NewDecoder(reader io.Reader) Decoder {
- return DecoderFunc(func(value interface{}) error {
- buffer, err := ioutil.ReadAll(reader)
- if err != nil {
- return err
- }
- return marshaller.Unmarshal(buffer, value)
- })
-}
-
-// NewEncoder returns an Encoder which writes proto stream into "writer".
-func (marshaller *ProtoMarshaller) NewEncoder(writer io.Writer) Encoder {
- return EncoderFunc(func(value interface{}) error {
- buffer, err := marshaller.Marshal(value)
- if err != nil {
- return err
- }
- _, err = writer.Write(buffer)
- if err != nil {
- return err
- }
-
- return nil
- })
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/marshaler.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/marshaler.go
deleted file mode 100644
index 98fe6e88ac..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/marshaler.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package runtime
-
-import (
- "io"
-)
-
-// Marshaler defines a conversion between byte sequence and gRPC payloads / fields.
-type Marshaler interface {
- // Marshal marshals "v" into byte sequence.
- Marshal(v interface{}) ([]byte, error)
- // Unmarshal unmarshals "data" into "v".
- // "v" must be a pointer value.
- Unmarshal(data []byte, v interface{}) error
- // NewDecoder returns a Decoder which reads byte sequence from "r".
- NewDecoder(r io.Reader) Decoder
- // NewEncoder returns an Encoder which writes bytes sequence into "w".
- NewEncoder(w io.Writer) Encoder
- // ContentType returns the Content-Type which this marshaler is responsible for.
- ContentType() string
-}
-
-// Decoder decodes a byte sequence
-type Decoder interface {
- Decode(v interface{}) error
-}
-
-// Encoder encodes gRPC payloads / fields into byte sequence.
-type Encoder interface {
- Encode(v interface{}) error
-}
-
-// DecoderFunc adapts an decoder function into Decoder.
-type DecoderFunc func(v interface{}) error
-
-// Decode delegates invocations to the underlying function itself.
-func (f DecoderFunc) Decode(v interface{}) error { return f(v) }
-
-// EncoderFunc adapts an encoder function into Encoder
-type EncoderFunc func(v interface{}) error
-
-// Encode delegates invocations to the underlying function itself.
-func (f EncoderFunc) Encode(v interface{}) error { return f(v) }
-
-// Delimited defines the streaming delimiter.
-type Delimited interface {
- // Delimiter returns the record seperator for the stream.
- Delimiter() []byte
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/marshaler_registry.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/marshaler_registry.go
deleted file mode 100644
index 5cc53ae4f6..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/marshaler_registry.go
+++ /dev/null
@@ -1,91 +0,0 @@
-package runtime
-
-import (
- "errors"
- "net/http"
-)
-
-// MIMEWildcard is the fallback MIME type used for requests which do not match
-// a registered MIME type.
-const MIMEWildcard = "*"
-
-var (
- acceptHeader = http.CanonicalHeaderKey("Accept")
- contentTypeHeader = http.CanonicalHeaderKey("Content-Type")
-
- defaultMarshaler = &JSONPb{OrigName: true}
-)
-
-// MarshalerForRequest returns the inbound/outbound marshalers for this request.
-// It checks the registry on the ServeMux for the MIME type set by the Content-Type header.
-// If it isn't set (or the request Content-Type is empty), checks for "*".
-// If there are multiple Content-Type headers set, choose the first one that it can
-// exactly match in the registry.
-// Otherwise, it follows the above logic for "*"/InboundMarshaler/OutboundMarshaler.
-func MarshalerForRequest(mux *ServeMux, r *http.Request) (inbound Marshaler, outbound Marshaler) {
- for _, acceptVal := range r.Header[acceptHeader] {
- if m, ok := mux.marshalers.mimeMap[acceptVal]; ok {
- outbound = m
- break
- }
- }
-
- for _, contentTypeVal := range r.Header[contentTypeHeader] {
- if m, ok := mux.marshalers.mimeMap[contentTypeVal]; ok {
- inbound = m
- break
- }
- }
-
- if inbound == nil {
- inbound = mux.marshalers.mimeMap[MIMEWildcard]
- }
- if outbound == nil {
- outbound = inbound
- }
-
- return inbound, outbound
-}
-
-// marshalerRegistry is a mapping from MIME types to Marshalers.
-type marshalerRegistry struct {
- mimeMap map[string]Marshaler
-}
-
-// add adds a marshaler for a case-sensitive MIME type string ("*" to match any
-// MIME type).
-func (m marshalerRegistry) add(mime string, marshaler Marshaler) error {
- if len(mime) == 0 {
- return errors.New("empty MIME type")
- }
-
- m.mimeMap[mime] = marshaler
-
- return nil
-}
-
-// makeMarshalerMIMERegistry returns a new registry of marshalers.
-// It allows for a mapping of case-sensitive Content-Type MIME type string to runtime.Marshaler interfaces.
-//
-// For example, you could allow the client to specify the use of the runtime.JSONPb marshaler
-// with a "application/jsonpb" Content-Type and the use of the runtime.JSONBuiltin marshaler
-// with a "application/json" Content-Type.
-// "*" can be used to match any Content-Type.
-// This can be attached to a ServerMux with the marshaler option.
-func makeMarshalerMIMERegistry() marshalerRegistry {
- return marshalerRegistry{
- mimeMap: map[string]Marshaler{
- MIMEWildcard: defaultMarshaler,
- },
- }
-}
-
-// WithMarshalerOption returns a ServeMuxOption which associates inbound and outbound
-// Marshalers to a MIME type in mux.
-func WithMarshalerOption(mime string, marshaler Marshaler) ServeMuxOption {
- return func(mux *ServeMux) {
- if err := mux.marshalers.add(mime, marshaler); err != nil {
- panic(err)
- }
- }
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/mux.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/mux.go
deleted file mode 100644
index 463084a702..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/mux.go
+++ /dev/null
@@ -1,258 +0,0 @@
-package runtime
-
-import (
- "context"
- "fmt"
- "net/http"
- "strings"
-
- "github.com/golang/protobuf/proto"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/metadata"
- "google.golang.org/grpc/status"
-)
-
-// A HandlerFunc handles a specific pair of path pattern and HTTP method.
-type HandlerFunc func(w http.ResponseWriter, r *http.Request, pathParams map[string]string)
-
-// ServeMux is a request multiplexer for grpc-gateway.
-// It matches http requests to patterns and invokes the corresponding handler.
-type ServeMux struct {
- // handlers maps HTTP method to a list of handlers.
- handlers map[string][]handler
- forwardResponseOptions []func(context.Context, http.ResponseWriter, proto.Message) error
- marshalers marshalerRegistry
- incomingHeaderMatcher HeaderMatcherFunc
- outgoingHeaderMatcher HeaderMatcherFunc
- metadataAnnotators []func(context.Context, *http.Request) metadata.MD
- protoErrorHandler ProtoErrorHandlerFunc
-}
-
-// ServeMuxOption is an option that can be given to a ServeMux on construction.
-type ServeMuxOption func(*ServeMux)
-
-// WithForwardResponseOption returns a ServeMuxOption representing the forwardResponseOption.
-//
-// forwardResponseOption is an option that will be called on the relevant context.Context,
-// http.ResponseWriter, and proto.Message before every forwarded response.
-//
-// The message may be nil in the case where just a header is being sent.
-func WithForwardResponseOption(forwardResponseOption func(context.Context, http.ResponseWriter, proto.Message) error) ServeMuxOption {
- return func(serveMux *ServeMux) {
- serveMux.forwardResponseOptions = append(serveMux.forwardResponseOptions, forwardResponseOption)
- }
-}
-
-// HeaderMatcherFunc checks whether a header key should be forwarded to/from gRPC context.
-type HeaderMatcherFunc func(string) (string, bool)
-
-// DefaultHeaderMatcher is used to pass http request headers to/from gRPC context. This adds permanent HTTP header
-// keys (as specified by the IANA) to gRPC context with grpcgateway- prefix. HTTP headers that start with
-// 'Grpc-Metadata-' are mapped to gRPC metadata after removing prefix 'Grpc-Metadata-'.
-func DefaultHeaderMatcher(key string) (string, bool) {
- if isPermanentHTTPHeader(key) {
- return MetadataPrefix + key, true
- } else if strings.HasPrefix(key, MetadataHeaderPrefix) {
- return key[len(MetadataHeaderPrefix):], true
- }
- return "", false
-}
-
-// WithIncomingHeaderMatcher returns a ServeMuxOption representing a headerMatcher for incoming request to gateway.
-//
-// This matcher will be called with each header in http.Request. If matcher returns true, that header will be
-// passed to gRPC context. To transform the header before passing to gRPC context, matcher should return modified header.
-func WithIncomingHeaderMatcher(fn HeaderMatcherFunc) ServeMuxOption {
- return func(mux *ServeMux) {
- mux.incomingHeaderMatcher = fn
- }
-}
-
-// WithOutgoingHeaderMatcher returns a ServeMuxOption representing a headerMatcher for outgoing response from gateway.
-//
-// This matcher will be called with each header in response header metadata. If matcher returns true, that header will be
-// passed to http response returned from gateway. To transform the header before passing to response,
-// matcher should return modified header.
-func WithOutgoingHeaderMatcher(fn HeaderMatcherFunc) ServeMuxOption {
- return func(mux *ServeMux) {
- mux.outgoingHeaderMatcher = fn
- }
-}
-
-// WithMetadata returns a ServeMuxOption for passing metadata to a gRPC context.
-//
-// This can be used by services that need to read from http.Request and modify gRPC context. A common use case
-// is reading token from cookie and adding it in gRPC context.
-func WithMetadata(annotator func(context.Context, *http.Request) metadata.MD) ServeMuxOption {
- return func(serveMux *ServeMux) {
- serveMux.metadataAnnotators = append(serveMux.metadataAnnotators, annotator)
- }
-}
-
-// WithProtoErrorHandler returns a ServeMuxOption for passing metadata to a gRPC context.
-//
-// This can be used to handle an error as general proto message defined by gRPC.
-// The response including body and status is not backward compatible with the default error handler.
-// When this option is used, HTTPError and OtherErrorHandler are overwritten on initialization.
-func WithProtoErrorHandler(fn ProtoErrorHandlerFunc) ServeMuxOption {
- return func(serveMux *ServeMux) {
- serveMux.protoErrorHandler = fn
- }
-}
-
-// NewServeMux returns a new ServeMux whose internal mapping is empty.
-func NewServeMux(opts ...ServeMuxOption) *ServeMux {
- serveMux := &ServeMux{
- handlers: make(map[string][]handler),
- forwardResponseOptions: make([]func(context.Context, http.ResponseWriter, proto.Message) error, 0),
- marshalers: makeMarshalerMIMERegistry(),
- }
-
- for _, opt := range opts {
- opt(serveMux)
- }
-
- if serveMux.protoErrorHandler != nil {
- HTTPError = serveMux.protoErrorHandler
- // OtherErrorHandler is no longer used when protoErrorHandler is set.
- // Overwritten by a special error handler to return Unknown.
- OtherErrorHandler = func(w http.ResponseWriter, r *http.Request, _ string, _ int) {
- ctx := context.Background()
- _, outboundMarshaler := MarshalerForRequest(serveMux, r)
- sterr := status.Error(codes.Unknown, "unexpected use of OtherErrorHandler")
- serveMux.protoErrorHandler(ctx, serveMux, outboundMarshaler, w, r, sterr)
- }
- }
-
- if serveMux.incomingHeaderMatcher == nil {
- serveMux.incomingHeaderMatcher = DefaultHeaderMatcher
- }
-
- if serveMux.outgoingHeaderMatcher == nil {
- serveMux.outgoingHeaderMatcher = func(key string) (string, bool) {
- return fmt.Sprintf("%s%s", MetadataHeaderPrefix, key), true
- }
- }
-
- return serveMux
-}
-
-// Handle associates "h" to the pair of HTTP method and path pattern.
-func (s *ServeMux) Handle(meth string, pat Pattern, h HandlerFunc) {
- s.handlers[meth] = append(s.handlers[meth], handler{pat: pat, h: h})
-}
-
-// ServeHTTP dispatches the request to the first handler whose pattern matches to r.Method and r.Path.
-func (s *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- ctx := r.Context()
-
- path := r.URL.Path
- if !strings.HasPrefix(path, "/") {
- if s.protoErrorHandler != nil {
- _, outboundMarshaler := MarshalerForRequest(s, r)
- sterr := status.Error(codes.InvalidArgument, http.StatusText(http.StatusBadRequest))
- s.protoErrorHandler(ctx, s, outboundMarshaler, w, r, sterr)
- } else {
- OtherErrorHandler(w, r, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
- }
- return
- }
-
- components := strings.Split(path[1:], "/")
- l := len(components)
- var verb string
- if idx := strings.LastIndex(components[l-1], ":"); idx == 0 {
- if s.protoErrorHandler != nil {
- _, outboundMarshaler := MarshalerForRequest(s, r)
- sterr := status.Error(codes.Unimplemented, http.StatusText(http.StatusNotImplemented))
- s.protoErrorHandler(ctx, s, outboundMarshaler, w, r, sterr)
- } else {
- OtherErrorHandler(w, r, http.StatusText(http.StatusNotFound), http.StatusNotFound)
- }
- return
- } else if idx > 0 {
- c := components[l-1]
- components[l-1], verb = c[:idx], c[idx+1:]
- }
-
- if override := r.Header.Get("X-HTTP-Method-Override"); override != "" && isPathLengthFallback(r) {
- r.Method = strings.ToUpper(override)
- if err := r.ParseForm(); err != nil {
- if s.protoErrorHandler != nil {
- _, outboundMarshaler := MarshalerForRequest(s, r)
- sterr := status.Error(codes.InvalidArgument, err.Error())
- s.protoErrorHandler(ctx, s, outboundMarshaler, w, r, sterr)
- } else {
- OtherErrorHandler(w, r, err.Error(), http.StatusBadRequest)
- }
- return
- }
- }
- for _, h := range s.handlers[r.Method] {
- pathParams, err := h.pat.Match(components, verb)
- if err != nil {
- continue
- }
- h.h(w, r, pathParams)
- return
- }
-
- // lookup other methods to handle fallback from GET to POST and
- // to determine if it is MethodNotAllowed or NotFound.
- for m, handlers := range s.handlers {
- if m == r.Method {
- continue
- }
- for _, h := range handlers {
- pathParams, err := h.pat.Match(components, verb)
- if err != nil {
- continue
- }
- // X-HTTP-Method-Override is optional. Always allow fallback to POST.
- if isPathLengthFallback(r) {
- if err := r.ParseForm(); err != nil {
- if s.protoErrorHandler != nil {
- _, outboundMarshaler := MarshalerForRequest(s, r)
- sterr := status.Error(codes.InvalidArgument, err.Error())
- s.protoErrorHandler(ctx, s, outboundMarshaler, w, r, sterr)
- } else {
- OtherErrorHandler(w, r, err.Error(), http.StatusBadRequest)
- }
- return
- }
- h.h(w, r, pathParams)
- return
- }
- if s.protoErrorHandler != nil {
- _, outboundMarshaler := MarshalerForRequest(s, r)
- sterr := status.Error(codes.Unimplemented, http.StatusText(http.StatusMethodNotAllowed))
- s.protoErrorHandler(ctx, s, outboundMarshaler, w, r, sterr)
- } else {
- OtherErrorHandler(w, r, http.StatusText(http.StatusMethodNotAllowed), http.StatusMethodNotAllowed)
- }
- return
- }
- }
-
- if s.protoErrorHandler != nil {
- _, outboundMarshaler := MarshalerForRequest(s, r)
- sterr := status.Error(codes.Unimplemented, http.StatusText(http.StatusNotImplemented))
- s.protoErrorHandler(ctx, s, outboundMarshaler, w, r, sterr)
- } else {
- OtherErrorHandler(w, r, http.StatusText(http.StatusNotFound), http.StatusNotFound)
- }
-}
-
-// GetForwardResponseOptions returns the ForwardResponseOptions associated with this ServeMux.
-func (s *ServeMux) GetForwardResponseOptions() []func(context.Context, http.ResponseWriter, proto.Message) error {
- return s.forwardResponseOptions
-}
-
-func isPathLengthFallback(r *http.Request) bool {
- return r.Method == "POST" && r.Header.Get("Content-Type") == "application/x-www-form-urlencoded"
-}
-
-type handler struct {
- pat Pattern
- h HandlerFunc
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/pattern.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/pattern.go
deleted file mode 100644
index f16a84ad38..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/pattern.go
+++ /dev/null
@@ -1,227 +0,0 @@
-package runtime
-
-import (
- "errors"
- "fmt"
- "strings"
-
- "github.com/grpc-ecosystem/grpc-gateway/utilities"
- "google.golang.org/grpc/grpclog"
-)
-
-var (
- // ErrNotMatch indicates that the given HTTP request path does not match to the pattern.
- ErrNotMatch = errors.New("not match to the path pattern")
- // ErrInvalidPattern indicates that the given definition of Pattern is not valid.
- ErrInvalidPattern = errors.New("invalid pattern")
-)
-
-type op struct {
- code utilities.OpCode
- operand int
-}
-
-// Pattern is a template pattern of http request paths defined in github.com/googleapis/googleapis/google/api/http.proto.
-type Pattern struct {
- // ops is a list of operations
- ops []op
- // pool is a constant pool indexed by the operands or vars.
- pool []string
- // vars is a list of variables names to be bound by this pattern
- vars []string
- // stacksize is the max depth of the stack
- stacksize int
- // tailLen is the length of the fixed-size segments after a deep wildcard
- tailLen int
- // verb is the VERB part of the path pattern. It is empty if the pattern does not have VERB part.
- verb string
-}
-
-// NewPattern returns a new Pattern from the given definition values.
-// "ops" is a sequence of op codes. "pool" is a constant pool.
-// "verb" is the verb part of the pattern. It is empty if the pattern does not have the part.
-// "version" must be 1 for now.
-// It returns an error if the given definition is invalid.
-func NewPattern(version int, ops []int, pool []string, verb string) (Pattern, error) {
- if version != 1 {
- grpclog.Infof("unsupported version: %d", version)
- return Pattern{}, ErrInvalidPattern
- }
-
- l := len(ops)
- if l%2 != 0 {
- grpclog.Infof("odd number of ops codes: %d", l)
- return Pattern{}, ErrInvalidPattern
- }
-
- var (
- typedOps []op
- stack, maxstack int
- tailLen int
- pushMSeen bool
- vars []string
- )
- for i := 0; i < l; i += 2 {
- op := op{code: utilities.OpCode(ops[i]), operand: ops[i+1]}
- switch op.code {
- case utilities.OpNop:
- continue
- case utilities.OpPush:
- if pushMSeen {
- tailLen++
- }
- stack++
- case utilities.OpPushM:
- if pushMSeen {
- grpclog.Infof("pushM appears twice")
- return Pattern{}, ErrInvalidPattern
- }
- pushMSeen = true
- stack++
- case utilities.OpLitPush:
- if op.operand < 0 || len(pool) <= op.operand {
- grpclog.Infof("negative literal index: %d", op.operand)
- return Pattern{}, ErrInvalidPattern
- }
- if pushMSeen {
- tailLen++
- }
- stack++
- case utilities.OpConcatN:
- if op.operand <= 0 {
- grpclog.Infof("negative concat size: %d", op.operand)
- return Pattern{}, ErrInvalidPattern
- }
- stack -= op.operand
- if stack < 0 {
- grpclog.Print("stack underflow")
- return Pattern{}, ErrInvalidPattern
- }
- stack++
- case utilities.OpCapture:
- if op.operand < 0 || len(pool) <= op.operand {
- grpclog.Infof("variable name index out of bound: %d", op.operand)
- return Pattern{}, ErrInvalidPattern
- }
- v := pool[op.operand]
- op.operand = len(vars)
- vars = append(vars, v)
- stack--
- if stack < 0 {
- grpclog.Infof("stack underflow")
- return Pattern{}, ErrInvalidPattern
- }
- default:
- grpclog.Infof("invalid opcode: %d", op.code)
- return Pattern{}, ErrInvalidPattern
- }
-
- if maxstack < stack {
- maxstack = stack
- }
- typedOps = append(typedOps, op)
- }
- return Pattern{
- ops: typedOps,
- pool: pool,
- vars: vars,
- stacksize: maxstack,
- tailLen: tailLen,
- verb: verb,
- }, nil
-}
-
-// MustPattern is a helper function which makes it easier to call NewPattern in variable initialization.
-func MustPattern(p Pattern, err error) Pattern {
- if err != nil {
- grpclog.Fatalf("Pattern initialization failed: %v", err)
- }
- return p
-}
-
-// Match examines components if it matches to the Pattern.
-// If it matches, the function returns a mapping from field paths to their captured values.
-// If otherwise, the function returns an error.
-func (p Pattern) Match(components []string, verb string) (map[string]string, error) {
- if p.verb != verb {
- return nil, ErrNotMatch
- }
-
- var pos int
- stack := make([]string, 0, p.stacksize)
- captured := make([]string, len(p.vars))
- l := len(components)
- for _, op := range p.ops {
- switch op.code {
- case utilities.OpNop:
- continue
- case utilities.OpPush, utilities.OpLitPush:
- if pos >= l {
- return nil, ErrNotMatch
- }
- c := components[pos]
- if op.code == utilities.OpLitPush {
- if lit := p.pool[op.operand]; c != lit {
- return nil, ErrNotMatch
- }
- }
- stack = append(stack, c)
- pos++
- case utilities.OpPushM:
- end := len(components)
- if end < pos+p.tailLen {
- return nil, ErrNotMatch
- }
- end -= p.tailLen
- stack = append(stack, strings.Join(components[pos:end], "/"))
- pos = end
- case utilities.OpConcatN:
- n := op.operand
- l := len(stack) - n
- stack = append(stack[:l], strings.Join(stack[l:], "/"))
- case utilities.OpCapture:
- n := len(stack) - 1
- captured[op.operand] = stack[n]
- stack = stack[:n]
- }
- }
- if pos < l {
- return nil, ErrNotMatch
- }
- bindings := make(map[string]string)
- for i, val := range captured {
- bindings[p.vars[i]] = val
- }
- return bindings, nil
-}
-
-// Verb returns the verb part of the Pattern.
-func (p Pattern) Verb() string { return p.verb }
-
-func (p Pattern) String() string {
- var stack []string
- for _, op := range p.ops {
- switch op.code {
- case utilities.OpNop:
- continue
- case utilities.OpPush:
- stack = append(stack, "*")
- case utilities.OpLitPush:
- stack = append(stack, p.pool[op.operand])
- case utilities.OpPushM:
- stack = append(stack, "**")
- case utilities.OpConcatN:
- n := op.operand
- l := len(stack) - n
- stack = append(stack[:l], strings.Join(stack[l:], "/"))
- case utilities.OpCapture:
- n := len(stack) - 1
- stack[n] = fmt.Sprintf("{%s=%s}", p.vars[op.operand], stack[n])
- }
- }
- segs := strings.Join(stack, "/")
- if p.verb != "" {
- return fmt.Sprintf("/%s:%s", segs, p.verb)
- }
- return "/" + segs
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/proto2_convert.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/proto2_convert.go
deleted file mode 100644
index a3151e2a55..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/proto2_convert.go
+++ /dev/null
@@ -1,80 +0,0 @@
-package runtime
-
-import (
- "github.com/golang/protobuf/proto"
-)
-
-// StringP returns a pointer to a string whose pointee is same as the given string value.
-func StringP(val string) (*string, error) {
- return proto.String(val), nil
-}
-
-// BoolP parses the given string representation of a boolean value,
-// and returns a pointer to a bool whose value is same as the parsed value.
-func BoolP(val string) (*bool, error) {
- b, err := Bool(val)
- if err != nil {
- return nil, err
- }
- return proto.Bool(b), nil
-}
-
-// Float64P parses the given string representation of a floating point number,
-// and returns a pointer to a float64 whose value is same as the parsed number.
-func Float64P(val string) (*float64, error) {
- f, err := Float64(val)
- if err != nil {
- return nil, err
- }
- return proto.Float64(f), nil
-}
-
-// Float32P parses the given string representation of a floating point number,
-// and returns a pointer to a float32 whose value is same as the parsed number.
-func Float32P(val string) (*float32, error) {
- f, err := Float32(val)
- if err != nil {
- return nil, err
- }
- return proto.Float32(f), nil
-}
-
-// Int64P parses the given string representation of an integer
-// and returns a pointer to a int64 whose value is same as the parsed integer.
-func Int64P(val string) (*int64, error) {
- i, err := Int64(val)
- if err != nil {
- return nil, err
- }
- return proto.Int64(i), nil
-}
-
-// Int32P parses the given string representation of an integer
-// and returns a pointer to a int32 whose value is same as the parsed integer.
-func Int32P(val string) (*int32, error) {
- i, err := Int32(val)
- if err != nil {
- return nil, err
- }
- return proto.Int32(i), err
-}
-
-// Uint64P parses the given string representation of an integer
-// and returns a pointer to a uint64 whose value is same as the parsed integer.
-func Uint64P(val string) (*uint64, error) {
- i, err := Uint64(val)
- if err != nil {
- return nil, err
- }
- return proto.Uint64(i), err
-}
-
-// Uint32P parses the given string representation of an integer
-// and returns a pointer to a uint32 whose value is same as the parsed integer.
-func Uint32P(val string) (*uint32, error) {
- i, err := Uint32(val)
- if err != nil {
- return nil, err
- }
- return proto.Uint32(i), err
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/proto_errors.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/proto_errors.go
deleted file mode 100644
index 43fafca7c2..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/proto_errors.go
+++ /dev/null
@@ -1,61 +0,0 @@
-package runtime
-
-import (
- "io"
- "net/http"
-
- "context"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/grpclog"
- "google.golang.org/grpc/status"
-)
-
-// ProtoErrorHandlerFunc handles the error as a gRPC error generated via status package and replies to the request.
-type ProtoErrorHandlerFunc func(context.Context, *ServeMux, Marshaler, http.ResponseWriter, *http.Request, error)
-
-var _ ProtoErrorHandlerFunc = DefaultHTTPProtoErrorHandler
-
-// DefaultHTTPProtoErrorHandler is an implementation of HTTPError.
-// If "err" is an error from gRPC system, the function replies with the status code mapped by HTTPStatusFromCode.
-// If otherwise, it replies with http.StatusInternalServerError.
-//
-// The response body returned by this function is a Status message marshaled by a Marshaler.
-//
-// Do not set this function to HTTPError variable directly, use WithProtoErrorHandler option instead.
-func DefaultHTTPProtoErrorHandler(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, _ *http.Request, err error) {
- // return Internal when Marshal failed
- const fallback = `{"code": 13, "message": "failed to marshal error message"}`
-
- w.Header().Del("Trailer")
- w.Header().Set("Content-Type", marshaler.ContentType())
-
- s, ok := status.FromError(err)
- if !ok {
- s = status.New(codes.Unknown, err.Error())
- }
-
- buf, merr := marshaler.Marshal(s.Proto())
- if merr != nil {
- grpclog.Infof("Failed to marshal error message %q: %v", s.Proto(), merr)
- w.WriteHeader(http.StatusInternalServerError)
- if _, err := io.WriteString(w, fallback); err != nil {
- grpclog.Infof("Failed to write response: %v", err)
- }
- return
- }
-
- md, ok := ServerMetadataFromContext(ctx)
- if !ok {
- grpclog.Infof("Failed to extract ServerMetadata from context")
- }
-
- handleForwardResponseServerMetadata(w, mux, md)
- handleForwardResponseTrailerHeader(w, md)
- st := HTTPStatusFromCode(s.Code())
- w.WriteHeader(st)
- if _, err := w.Write(buf); err != nil {
- grpclog.Infof("Failed to write response: %v", err)
- }
-
- handleForwardResponseTrailer(w, md)
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/query.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/query.go
deleted file mode 100644
index bb9359f17c..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/query.go
+++ /dev/null
@@ -1,392 +0,0 @@
-package runtime
-
-import (
- "encoding/base64"
- "fmt"
- "net/url"
- "reflect"
- "regexp"
- "strconv"
- "strings"
- "time"
-
- "github.com/golang/protobuf/proto"
- "github.com/grpc-ecosystem/grpc-gateway/utilities"
- "google.golang.org/grpc/grpclog"
-)
-
-// PopulateQueryParameters populates "values" into "msg".
-// A value is ignored if its key starts with one of the elements in "filter".
-func PopulateQueryParameters(msg proto.Message, values url.Values, filter *utilities.DoubleArray) error {
- for key, values := range values {
- re, err := regexp.Compile("^(.*)\\[(.*)\\]$")
- if err != nil {
- return err
- }
- match := re.FindStringSubmatch(key)
- if len(match) == 3 {
- key = match[1]
- values = append([]string{match[2]}, values...)
- }
- fieldPath := strings.Split(key, ".")
- if filter.HasCommonPrefix(fieldPath) {
- continue
- }
- if err := populateFieldValueFromPath(msg, fieldPath, values); err != nil {
- return err
- }
- }
- return nil
-}
-
-// PopulateFieldFromPath sets a value in a nested Protobuf structure.
-// It instantiates missing protobuf fields as it goes.
-func PopulateFieldFromPath(msg proto.Message, fieldPathString string, value string) error {
- fieldPath := strings.Split(fieldPathString, ".")
- return populateFieldValueFromPath(msg, fieldPath, []string{value})
-}
-
-func populateFieldValueFromPath(msg proto.Message, fieldPath []string, values []string) error {
- m := reflect.ValueOf(msg)
- if m.Kind() != reflect.Ptr {
- return fmt.Errorf("unexpected type %T: %v", msg, msg)
- }
- var props *proto.Properties
- m = m.Elem()
- for i, fieldName := range fieldPath {
- isLast := i == len(fieldPath)-1
- if !isLast && m.Kind() != reflect.Struct {
- return fmt.Errorf("non-aggregate type in the mid of path: %s", strings.Join(fieldPath, "."))
- }
- var f reflect.Value
- var err error
- f, props, err = fieldByProtoName(m, fieldName)
- if err != nil {
- return err
- } else if !f.IsValid() {
- grpclog.Infof("field not found in %T: %s", msg, strings.Join(fieldPath, "."))
- return nil
- }
-
- switch f.Kind() {
- case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, reflect.String, reflect.Uint32, reflect.Uint64:
- if !isLast {
- return fmt.Errorf("unexpected nested field %s in %s", fieldPath[i+1], strings.Join(fieldPath[:i+1], "."))
- }
- m = f
- case reflect.Slice:
- if !isLast {
- return fmt.Errorf("unexpected repeated field in %s", strings.Join(fieldPath, "."))
- }
- // Handle []byte
- if f.Type().Elem().Kind() == reflect.Uint8 {
- m = f
- break
- }
- return populateRepeatedField(f, values, props)
- case reflect.Ptr:
- if f.IsNil() {
- m = reflect.New(f.Type().Elem())
- f.Set(m.Convert(f.Type()))
- }
- m = f.Elem()
- continue
- case reflect.Struct:
- m = f
- continue
- case reflect.Map:
- if !isLast {
- return fmt.Errorf("unexpected nested field %s in %s", fieldPath[i+1], strings.Join(fieldPath[:i+1], "."))
- }
- return populateMapField(f, values, props)
- default:
- return fmt.Errorf("unexpected type %s in %T", f.Type(), msg)
- }
- }
- switch len(values) {
- case 0:
- return fmt.Errorf("no value of field: %s", strings.Join(fieldPath, "."))
- case 1:
- default:
- grpclog.Infof("too many field values: %s", strings.Join(fieldPath, "."))
- }
- return populateField(m, values[0], props)
-}
-
-// fieldByProtoName looks up a field whose corresponding protobuf field name is "name".
-// "m" must be a struct value. It returns zero reflect.Value if no such field found.
-func fieldByProtoName(m reflect.Value, name string) (reflect.Value, *proto.Properties, error) {
- props := proto.GetProperties(m.Type())
-
- // look up field name in oneof map
- if op, ok := props.OneofTypes[name]; ok {
- v := reflect.New(op.Type.Elem())
- field := m.Field(op.Field)
- if !field.IsNil() {
- return reflect.Value{}, nil, fmt.Errorf("field already set for %s oneof", props.Prop[op.Field].OrigName)
- }
- field.Set(v)
- return v.Elem().Field(0), op.Prop, nil
- }
-
- for _, p := range props.Prop {
- if p.OrigName == name {
- return m.FieldByName(p.Name), p, nil
- }
- if p.JSONName == name {
- return m.FieldByName(p.Name), p, nil
- }
- }
- return reflect.Value{}, nil, nil
-}
-
-func populateMapField(f reflect.Value, values []string, props *proto.Properties) error {
- if len(values) != 2 {
- return fmt.Errorf("more than one value provided for key %s in map %s", values[0], props.Name)
- }
-
- key, value := values[0], values[1]
- keyType := f.Type().Key()
- valueType := f.Type().Elem()
- if f.IsNil() {
- f.Set(reflect.MakeMap(f.Type()))
- }
-
- keyConv, ok := convFromType[keyType.Kind()]
- if !ok {
- return fmt.Errorf("unsupported key type %s in map %s", keyType, props.Name)
- }
- valueConv, ok := convFromType[valueType.Kind()]
- if !ok {
- return fmt.Errorf("unsupported value type %s in map %s", valueType, props.Name)
- }
-
- keyV := keyConv.Call([]reflect.Value{reflect.ValueOf(key)})
- if err := keyV[1].Interface(); err != nil {
- return err.(error)
- }
- valueV := valueConv.Call([]reflect.Value{reflect.ValueOf(value)})
- if err := valueV[1].Interface(); err != nil {
- return err.(error)
- }
-
- f.SetMapIndex(keyV[0].Convert(keyType), valueV[0].Convert(valueType))
-
- return nil
-}
-
-func populateRepeatedField(f reflect.Value, values []string, props *proto.Properties) error {
- elemType := f.Type().Elem()
-
- // is the destination field a slice of an enumeration type?
- if enumValMap := proto.EnumValueMap(props.Enum); enumValMap != nil {
- return populateFieldEnumRepeated(f, values, enumValMap)
- }
-
- conv, ok := convFromType[elemType.Kind()]
- if !ok {
- return fmt.Errorf("unsupported field type %s", elemType)
- }
- f.Set(reflect.MakeSlice(f.Type(), len(values), len(values)).Convert(f.Type()))
- for i, v := range values {
- result := conv.Call([]reflect.Value{reflect.ValueOf(v)})
- if err := result[1].Interface(); err != nil {
- return err.(error)
- }
- f.Index(i).Set(result[0].Convert(f.Index(i).Type()))
- }
- return nil
-}
-
-func populateField(f reflect.Value, value string, props *proto.Properties) error {
- i := f.Addr().Interface()
-
- // Handle protobuf well known types
- type wkt interface {
- XXX_WellKnownType() string
- }
- if wkt, ok := i.(wkt); ok {
- switch wkt.XXX_WellKnownType() {
- case "Timestamp":
- if value == "null" {
- f.Field(0).SetInt(0)
- f.Field(1).SetInt(0)
- return nil
- }
-
- t, err := time.Parse(time.RFC3339Nano, value)
- if err != nil {
- return fmt.Errorf("bad Timestamp: %v", err)
- }
- f.Field(0).SetInt(int64(t.Unix()))
- f.Field(1).SetInt(int64(t.Nanosecond()))
- return nil
- case "Duration":
- if value == "null" {
- f.Field(0).SetInt(0)
- f.Field(1).SetInt(0)
- return nil
- }
- d, err := time.ParseDuration(value)
- if err != nil {
- return fmt.Errorf("bad Duration: %v", err)
- }
-
- ns := d.Nanoseconds()
- s := ns / 1e9
- ns %= 1e9
- f.Field(0).SetInt(s)
- f.Field(1).SetInt(ns)
- return nil
- case "DoubleValue":
- fallthrough
- case "FloatValue":
- float64Val, err := strconv.ParseFloat(value, 64)
- if err != nil {
- return fmt.Errorf("bad DoubleValue: %s", value)
- }
- f.Field(0).SetFloat(float64Val)
- return nil
- case "Int64Value":
- fallthrough
- case "Int32Value":
- int64Val, err := strconv.ParseInt(value, 10, 64)
- if err != nil {
- return fmt.Errorf("bad DoubleValue: %s", value)
- }
- f.Field(0).SetInt(int64Val)
- return nil
- case "UInt64Value":
- fallthrough
- case "UInt32Value":
- uint64Val, err := strconv.ParseUint(value, 10, 64)
- if err != nil {
- return fmt.Errorf("bad DoubleValue: %s", value)
- }
- f.Field(0).SetUint(uint64Val)
- return nil
- case "BoolValue":
- if value == "true" {
- f.Field(0).SetBool(true)
- } else if value == "false" {
- f.Field(0).SetBool(false)
- } else {
- return fmt.Errorf("bad BoolValue: %s", value)
- }
- return nil
- case "StringValue":
- f.Field(0).SetString(value)
- return nil
- case "BytesValue":
- bytesVal, err := base64.StdEncoding.DecodeString(value)
- if err != nil {
- return fmt.Errorf("bad BytesValue: %s", value)
- }
- f.Field(0).SetBytes(bytesVal)
- return nil
- }
- }
-
- // Handle google well known types
- if gwkt, ok := i.(proto.Message); ok {
- switch proto.MessageName(gwkt) {
- case "google.protobuf.FieldMask":
- p := f.Field(0)
- for _, v := range strings.Split(value, ",") {
- if v != "" {
- p.Set(reflect.Append(p, reflect.ValueOf(v)))
- }
- }
- return nil
- }
- }
-
- // Handle Time and Duration stdlib types
- switch t := i.(type) {
- case *time.Time:
- pt, err := time.Parse(time.RFC3339Nano, value)
- if err != nil {
- return fmt.Errorf("bad Timestamp: %v", err)
- }
- *t = pt
- return nil
- case *time.Duration:
- d, err := time.ParseDuration(value)
- if err != nil {
- return fmt.Errorf("bad Duration: %v", err)
- }
- *t = d
- return nil
- }
-
- // is the destination field an enumeration type?
- if enumValMap := proto.EnumValueMap(props.Enum); enumValMap != nil {
- return populateFieldEnum(f, value, enumValMap)
- }
-
- conv, ok := convFromType[f.Kind()]
- if !ok {
- return fmt.Errorf("field type %T is not supported in query parameters", i)
- }
- result := conv.Call([]reflect.Value{reflect.ValueOf(value)})
- if err := result[1].Interface(); err != nil {
- return err.(error)
- }
- f.Set(result[0].Convert(f.Type()))
- return nil
-}
-
-func convertEnum(value string, t reflect.Type, enumValMap map[string]int32) (reflect.Value, error) {
- // see if it's an enumeration string
- if enumVal, ok := enumValMap[value]; ok {
- return reflect.ValueOf(enumVal).Convert(t), nil
- }
-
- // check for an integer that matches an enumeration value
- eVal, err := strconv.Atoi(value)
- if err != nil {
- return reflect.Value{}, fmt.Errorf("%s is not a valid %s", value, t)
- }
- for _, v := range enumValMap {
- if v == int32(eVal) {
- return reflect.ValueOf(eVal).Convert(t), nil
- }
- }
- return reflect.Value{}, fmt.Errorf("%s is not a valid %s", value, t)
-}
-
-func populateFieldEnum(f reflect.Value, value string, enumValMap map[string]int32) error {
- cval, err := convertEnum(value, f.Type(), enumValMap)
- if err != nil {
- return err
- }
- f.Set(cval)
- return nil
-}
-
-func populateFieldEnumRepeated(f reflect.Value, values []string, enumValMap map[string]int32) error {
- elemType := f.Type().Elem()
- f.Set(reflect.MakeSlice(f.Type(), len(values), len(values)).Convert(f.Type()))
- for i, v := range values {
- result, err := convertEnum(v, elemType, enumValMap)
- if err != nil {
- return err
- }
- f.Index(i).Set(result)
- }
- return nil
-}
-
-var (
- convFromType = map[reflect.Kind]reflect.Value{
- reflect.String: reflect.ValueOf(String),
- reflect.Bool: reflect.ValueOf(Bool),
- reflect.Float64: reflect.ValueOf(Float64),
- reflect.Float32: reflect.ValueOf(Float32),
- reflect.Int64: reflect.ValueOf(Int64),
- reflect.Int32: reflect.ValueOf(Int32),
- reflect.Uint64: reflect.ValueOf(Uint64),
- reflect.Uint32: reflect.ValueOf(Uint32),
- reflect.Slice: reflect.ValueOf(Bytes),
- }
-)
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/utilities/BUILD.bazel b/vendor/github.com/grpc-ecosystem/grpc-gateway/utilities/BUILD.bazel
deleted file mode 100644
index 58d291c373..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/utilities/BUILD.bazel
+++ /dev/null
@@ -1,20 +0,0 @@
-load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
-
-package(default_visibility = ["//visibility:public"])
-
-go_library(
- name = "go_default_library",
- srcs = [
- "doc.go",
- "pattern.go",
- "trie.go",
- ],
- importpath = "github.com/grpc-ecosystem/grpc-gateway/utilities",
-)
-
-go_test(
- name = "go_default_xtest",
- size = "small",
- srcs = ["trie_test.go"],
- deps = [":go_default_library"],
-)
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/utilities/doc.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/utilities/doc.go
deleted file mode 100644
index cf79a4d588..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/utilities/doc.go
+++ /dev/null
@@ -1,2 +0,0 @@
-// Package utilities provides members for internal use in grpc-gateway.
-package utilities
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/utilities/pattern.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/utilities/pattern.go
deleted file mode 100644
index dfe7de4864..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/utilities/pattern.go
+++ /dev/null
@@ -1,22 +0,0 @@
-package utilities
-
-// An OpCode is a opcode of compiled path patterns.
-type OpCode int
-
-// These constants are the valid values of OpCode.
-const (
- // OpNop does nothing
- OpNop = OpCode(iota)
- // OpPush pushes a component to stack
- OpPush
- // OpLitPush pushes a component to stack if it matches to the literal
- OpLitPush
- // OpPushM concatenates the remaining components and pushes it to stack
- OpPushM
- // OpConcatN pops N items from stack, concatenates them and pushes it back to stack
- OpConcatN
- // OpCapture pops an item and binds it to the variable
- OpCapture
- // OpEnd is the least positive invalid opcode.
- OpEnd
-)
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/utilities/trie.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/utilities/trie.go
deleted file mode 100644
index c2b7b30dd9..0000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/utilities/trie.go
+++ /dev/null
@@ -1,177 +0,0 @@
-package utilities
-
-import (
- "sort"
-)
-
-// DoubleArray is a Double Array implementation of trie on sequences of strings.
-type DoubleArray struct {
- // Encoding keeps an encoding from string to int
- Encoding map[string]int
- // Base is the base array of Double Array
- Base []int
- // Check is the check array of Double Array
- Check []int
-}
-
-// NewDoubleArray builds a DoubleArray from a set of sequences of strings.
-func NewDoubleArray(seqs [][]string) *DoubleArray {
- da := &DoubleArray{Encoding: make(map[string]int)}
- if len(seqs) == 0 {
- return da
- }
-
- encoded := registerTokens(da, seqs)
- sort.Sort(byLex(encoded))
-
- root := node{row: -1, col: -1, left: 0, right: len(encoded)}
- addSeqs(da, encoded, 0, root)
-
- for i := len(da.Base); i > 0; i-- {
- if da.Check[i-1] != 0 {
- da.Base = da.Base[:i]
- da.Check = da.Check[:i]
- break
- }
- }
- return da
-}
-
-func registerTokens(da *DoubleArray, seqs [][]string) [][]int {
- var result [][]int
- for _, seq := range seqs {
- var encoded []int
- for _, token := range seq {
- if _, ok := da.Encoding[token]; !ok {
- da.Encoding[token] = len(da.Encoding)
- }
- encoded = append(encoded, da.Encoding[token])
- }
- result = append(result, encoded)
- }
- for i := range result {
- result[i] = append(result[i], len(da.Encoding))
- }
- return result
-}
-
-type node struct {
- row, col int
- left, right int
-}
-
-func (n node) value(seqs [][]int) int {
- return seqs[n.row][n.col]
-}
-
-func (n node) children(seqs [][]int) []*node {
- var result []*node
- lastVal := int(-1)
- last := new(node)
- for i := n.left; i < n.right; i++ {
- if lastVal == seqs[i][n.col+1] {
- continue
- }
- last.right = i
- last = &node{
- row: i,
- col: n.col + 1,
- left: i,
- }
- result = append(result, last)
- }
- last.right = n.right
- return result
-}
-
-func addSeqs(da *DoubleArray, seqs [][]int, pos int, n node) {
- ensureSize(da, pos)
-
- children := n.children(seqs)
- var i int
- for i = 1; ; i++ {
- ok := func() bool {
- for _, child := range children {
- code := child.value(seqs)
- j := i + code
- ensureSize(da, j)
- if da.Check[j] != 0 {
- return false
- }
- }
- return true
- }()
- if ok {
- break
- }
- }
- da.Base[pos] = i
- for _, child := range children {
- code := child.value(seqs)
- j := i + code
- da.Check[j] = pos + 1
- }
- terminator := len(da.Encoding)
- for _, child := range children {
- code := child.value(seqs)
- if code == terminator {
- continue
- }
- j := i + code
- addSeqs(da, seqs, j, *child)
- }
-}
-
-func ensureSize(da *DoubleArray, i int) {
- for i >= len(da.Base) {
- da.Base = append(da.Base, make([]int, len(da.Base)+1)...)
- da.Check = append(da.Check, make([]int, len(da.Check)+1)...)
- }
-}
-
-type byLex [][]int
-
-func (l byLex) Len() int { return len(l) }
-func (l byLex) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
-func (l byLex) Less(i, j int) bool {
- si := l[i]
- sj := l[j]
- var k int
- for k = 0; k < len(si) && k < len(sj); k++ {
- if si[k] < sj[k] {
- return true
- }
- if si[k] > sj[k] {
- return false
- }
- }
- if k < len(sj) {
- return true
- }
- return false
-}
-
-// HasCommonPrefix determines if any sequence in the DoubleArray is a prefix of the given sequence.
-func (da *DoubleArray) HasCommonPrefix(seq []string) bool {
- if len(da.Base) == 0 {
- return false
- }
-
- var i int
- for _, t := range seq {
- code, ok := da.Encoding[t]
- if !ok {
- break
- }
- j := da.Base[i] + code
- if len(da.Check) <= j || da.Check[j] != i+1 {
- break
- }
- i = j
- }
- j := da.Base[i] + len(da.Encoding)
- if len(da.Check) <= j || da.Check[j] != i+1 {
- return false
- }
- return true
-}
diff --git a/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method.go b/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method.go
index cbc73d562e..d011ec53eb 100644
--- a/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method.go
+++ b/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method.go
@@ -2,7 +2,6 @@ package authentication
import (
"github.com/Azure/go-autorest/autorest"
- "github.com/Azure/go-autorest/autorest/adal"
)
type authMethod interface {
@@ -10,7 +9,7 @@ type authMethod interface {
isApplicable(b Builder) bool
- getAuthorizationToken(sender autorest.Sender, oauthConfig *adal.OAuthConfig, endpoint string) (*autorest.BearerAuthorizer, error)
+ getAuthorizationToken(sender autorest.Sender, oauthConfig *OAuthConfig, endpoint string) (autorest.Authorizer, error)
name() string
diff --git a/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_azure_cli_token.go b/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_azure_cli_token.go
index 6f854d5ea0..279c42f74e 100644
--- a/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_azure_cli_token.go
+++ b/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_azure_cli_token.go
@@ -14,7 +14,8 @@ import (
)
type azureCliTokenAuth struct {
- profile *azureCLIProfile
+ profile *azureCLIProfile
+ servicePrincipalAuthDocsLink string
}
func (a azureCliTokenAuth) build(b Builder) (authMethod, error) {
@@ -25,6 +26,7 @@ func (a azureCliTokenAuth) build(b Builder) (authMethod, error) {
subscriptionId: b.SubscriptionID,
tenantId: b.TenantID,
},
+ servicePrincipalAuthDocsLink: b.ClientSecretDocsLink,
}
profilePath, err := cli.ProfilePath()
if err != nil {
@@ -38,6 +40,17 @@ func (a azureCliTokenAuth) build(b Builder) (authMethod, error) {
auth.profile.profile = profile
+ // Authenticating as a Service Principal doesn't return all of the information we need for authentication purposes
+ // as such Service Principal authentication is supported using the specific auth method
+ if authenticatedAsAUser := auth.profile.verifyAuthenticatedAsAUser(); !authenticatedAsAUser {
+ return nil, fmt.Errorf(`Authenticating using the Azure CLI is only supported as a User (not a Service Principal).
+
+To authenticate to Azure using a Service Principal, you can use the separate 'Authenticate using a Service Principal'
+auth method - instructions for which can be found here: %s
+
+Alternatively you can authenticate using the Azure CLI by using a User Account.`, auth.servicePrincipalAuthDocsLink)
+ }
+
err = auth.profile.populateFields()
if err != nil {
return nil, fmt.Errorf("Error retrieving the Profile from the Azure CLI: %s Please re-authenticate using `az login`.", err)
@@ -55,7 +68,11 @@ func (a azureCliTokenAuth) isApplicable(b Builder) bool {
return b.SupportsAzureCliToken
}
-func (a azureCliTokenAuth) getAuthorizationToken(sender autorest.Sender, oauthConfig *adal.OAuthConfig, endpoint string) (*autorest.BearerAuthorizer, error) {
+func (a azureCliTokenAuth) getAuthorizationToken(sender autorest.Sender, oauth *OAuthConfig, endpoint string) (autorest.Authorizer, error) {
+ if oauth.OAuth == nil {
+ return nil, fmt.Errorf("Error getting Authorization Token for cli auth: an OAuth token wasn't configured correctly; please file a bug with more details")
+ }
+
// the Azure CLI appears to cache these, so to maintain compatibility with the interface this method is intentionally not on the pointer
token, err := obtainAuthorizationToken(endpoint, a.profile.subscriptionId)
if err != nil {
@@ -67,7 +84,7 @@ func (a azureCliTokenAuth) getAuthorizationToken(sender autorest.Sender, oauthCo
return nil, fmt.Errorf("Error converting Authorization Token to an ADAL Token: %s", err)
}
- spt, err := adal.NewServicePrincipalTokenFromManualToken(*oauthConfig, a.profile.clientId, endpoint, adalToken)
+ spt, err := adal.NewServicePrincipalTokenFromManualToken(*oauth.OAuth, a.profile.clientId, endpoint, adalToken)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_client_cert.go b/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_client_cert.go
index f6dd9b77e6..6abc9461e7 100644
--- a/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_client_cert.go
+++ b/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_client_cert.go
@@ -41,7 +41,11 @@ func (a servicePrincipalClientCertificateAuth) name() string {
return "Service Principal / Client Certificate"
}
-func (a servicePrincipalClientCertificateAuth) getAuthorizationToken(sender autorest.Sender, oauthConfig *adal.OAuthConfig, endpoint string) (*autorest.BearerAuthorizer, error) {
+func (a servicePrincipalClientCertificateAuth) getAuthorizationToken(sender autorest.Sender, oauth *OAuthConfig, endpoint string) (autorest.Authorizer, error) {
+ if oauth.OAuth == nil {
+ return nil, fmt.Errorf("Error getting Authorization Token for client cert: an OAuth token wasn't configured correctly; please file a bug with more details")
+ }
+
certificateData, err := ioutil.ReadFile(a.clientCertPath)
if err != nil {
return nil, fmt.Errorf("Error reading Client Certificate %q: %v", a.clientCertPath, err)
@@ -53,7 +57,7 @@ func (a servicePrincipalClientCertificateAuth) getAuthorizationToken(sender auto
return nil, fmt.Errorf("Error decoding pkcs12 certificate: %v", err)
}
- spt, err := adal.NewServicePrincipalTokenFromCertificate(*oauthConfig, a.clientId, certificate, rsaPrivateKey, endpoint)
+ spt, err := adal.NewServicePrincipalTokenFromCertificate(*oauth.OAuth, a.clientId, certificate, rsaPrivateKey, endpoint)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_client_secret.go b/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_client_secret.go
index f31bc20e8d..11ab2716d5 100644
--- a/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_client_secret.go
+++ b/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_client_secret.go
@@ -33,15 +33,18 @@ func (a servicePrincipalClientSecretAuth) name() string {
return "Service Principal / Client Secret"
}
-func (a servicePrincipalClientSecretAuth) getAuthorizationToken(sender autorest.Sender, oauthConfig *adal.OAuthConfig, endpoint string) (*autorest.BearerAuthorizer, error) {
- spt, err := adal.NewServicePrincipalToken(*oauthConfig, a.clientId, a.clientSecret, endpoint)
+func (a servicePrincipalClientSecretAuth) getAuthorizationToken(sender autorest.Sender, oauth *OAuthConfig, endpoint string) (autorest.Authorizer, error) {
+ if oauth.OAuth == nil {
+ return nil, fmt.Errorf("Error getting Authorization Token for client secret auth: an OAuth token wasn't configured correctly; please file a bug with more details")
+ }
+
+ spt, err := adal.NewServicePrincipalToken(*oauth.OAuth, a.clientId, a.clientSecret, endpoint)
if err != nil {
return nil, err
}
spt.SetSender(sender)
- auth := autorest.NewBearerAuthorizer(spt)
- return auth, nil
+ return autorest.NewBearerAuthorizer(spt), nil
}
func (a servicePrincipalClientSecretAuth) populateConfig(c *Config) error {
diff --git a/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_client_secret_multi_tenant.go b/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_client_secret_multi_tenant.go
new file mode 100644
index 0000000000..85de353b0c
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_client_secret_multi_tenant.go
@@ -0,0 +1,83 @@
+package authentication
+
+import (
+ "fmt"
+
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/adal"
+ "github.com/hashicorp/go-multierror"
+)
+
+type servicePrincipalClientSecretMultiTenantAuth struct {
+ clientId string
+ clientSecret string
+ subscriptionId string
+ tenantId string
+ auxiliaryTenantIDs []string
+}
+
+func (a servicePrincipalClientSecretMultiTenantAuth) build(b Builder) (authMethod, error) {
+ method := servicePrincipalClientSecretMultiTenantAuth{
+ clientId: b.ClientID,
+ clientSecret: b.ClientSecret,
+ subscriptionId: b.SubscriptionID,
+ tenantId: b.TenantID,
+ auxiliaryTenantIDs: b.AuxiliaryTenantIDs,
+ }
+ return method, nil
+}
+
+func (a servicePrincipalClientSecretMultiTenantAuth) isApplicable(b Builder) bool {
+ return b.SupportsClientSecretAuth && b.ClientSecret != "" && b.SupportsAuxiliaryTenants && (len(b.AuxiliaryTenantIDs) > 0)
+}
+
+func (a servicePrincipalClientSecretMultiTenantAuth) name() string {
+ return "Multi Tenant Service Principal / Client Secret"
+}
+
+func (a servicePrincipalClientSecretMultiTenantAuth) getAuthorizationToken(sender autorest.Sender, oauth *OAuthConfig, endpoint string) (autorest.Authorizer, error) {
+ if oauth.MultiTenantOauth == nil {
+ return nil, fmt.Errorf("Error getting Authorization Token for client cert: an MultiTenantOauth token wasn't configured correctly; please file a bug with more details")
+ }
+
+ spt, err := adal.NewMultiTenantServicePrincipalToken(*oauth.MultiTenantOauth, a.clientId, a.clientSecret, endpoint)
+ if err != nil {
+ return nil, err
+ }
+
+ spt.PrimaryToken.SetSender(sender)
+ for _, t := range spt.AuxiliaryTokens {
+ t.SetSender(sender)
+ }
+
+ auth := autorest.NewMultiTenantServicePrincipalTokenAuthorizer(spt)
+ return auth, nil
+}
+
+func (a servicePrincipalClientSecretMultiTenantAuth) populateConfig(c *Config) error {
+ c.AuthenticatedAsAServicePrincipal = true
+ return nil
+}
+
+func (a servicePrincipalClientSecretMultiTenantAuth) validate() error {
+ var err *multierror.Error
+
+ fmtErrorMessage := "A %s must be configured when authenticating as a Service Principal using a Multi Tenant Client Secret."
+
+ if a.subscriptionId == "" {
+ err = multierror.Append(err, fmt.Errorf(fmtErrorMessage, "Subscription ID"))
+ }
+ if a.clientId == "" {
+ err = multierror.Append(err, fmt.Errorf(fmtErrorMessage, "Client ID"))
+ }
+ if a.clientSecret == "" {
+ err = multierror.Append(err, fmt.Errorf(fmtErrorMessage, "Client Secret"))
+ }
+ if a.tenantId == "" {
+ err = multierror.Append(err, fmt.Errorf(fmtErrorMessage, "Tenant ID"))
+ }
+ if len(a.auxiliaryTenantIDs) == 0 {
+ err = multierror.Append(err, fmt.Errorf(fmtErrorMessage, "Auxiliary Tenant IDs"))
+ }
+ return err.ErrorOrNil()
+}
diff --git a/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_msi.go b/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_msi.go
index 883df2607b..0e33924f5b 100644
--- a/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_msi.go
+++ b/vendor/github.com/hashicorp/go-azure-helpers/authentication/auth_method_msi.go
@@ -39,7 +39,11 @@ func (a managedServiceIdentityAuth) name() string {
return "Managed Service Identity"
}
-func (a managedServiceIdentityAuth) getAuthorizationToken(sender autorest.Sender, oauthConfig *adal.OAuthConfig, endpoint string) (*autorest.BearerAuthorizer, error) {
+func (a managedServiceIdentityAuth) getAuthorizationToken(sender autorest.Sender, oauth *OAuthConfig, endpoint string) (autorest.Authorizer, error) {
+ if oauth.OAuth == nil {
+ return nil, fmt.Errorf("Error getting Authorization Token for MSI auth: an OAuth token wasn't configured correctly; please file a bug with more details")
+ }
+
spt, err := adal.NewServicePrincipalTokenFromMSI(a.endpoint, endpoint)
if err != nil {
return nil, err
diff --git a/vendor/github.com/hashicorp/go-azure-helpers/authentication/azure_cli_access_token.go b/vendor/github.com/hashicorp/go-azure-helpers/authentication/azure_cli_access_token.go
index 822fb2d771..bc826d5578 100644
--- a/vendor/github.com/hashicorp/go-azure-helpers/authentication/azure_cli_access_token.go
+++ b/vendor/github.com/hashicorp/go-azure-helpers/authentication/azure_cli_access_token.go
@@ -10,8 +10,8 @@ import (
)
type azureCliAccessToken struct {
- ClientID string
- AccessToken *adal.Token
+ ClientID string
+ AccessToken *adal.Token
}
func findValidAccessTokenForTenant(tokens []cli.Token, tenantId string) (*azureCliAccessToken, error) {
@@ -32,8 +32,8 @@ func findValidAccessTokenForTenant(tokens []cli.Token, tenantId string) (*azureC
}
validAccessToken := azureCliAccessToken{
- ClientID: accessToken.ClientID,
- AccessToken: &token,
+ ClientID: accessToken.ClientID,
+ AccessToken: &token,
}
return &validAccessToken, nil
}
diff --git a/vendor/github.com/hashicorp/go-azure-helpers/authentication/azure_cli_profile.go b/vendor/github.com/hashicorp/go-azure-helpers/authentication/azure_cli_profile.go
index 39fb30ddd5..1f6a0b6af5 100644
--- a/vendor/github.com/hashicorp/go-azure-helpers/authentication/azure_cli_profile.go
+++ b/vendor/github.com/hashicorp/go-azure-helpers/authentication/azure_cli_profile.go
@@ -1,16 +1,18 @@
package authentication
import (
+ "strings"
+
"github.com/Azure/go-autorest/autorest/azure/cli"
)
type azureCLIProfile struct {
profile cli.Profile
- clientId string
- environment string
- subscriptionId string
- tenantId string
+ clientId string
+ environment string
+ subscriptionId string
+ tenantId string
}
func (a *azureCLIProfile) populateFields() error {
@@ -33,3 +35,18 @@ func (a *azureCLIProfile) populateFields() error {
// always pull the environment from the Azure CLI, since the Access Token's associated with it
return a.populateEnvironment()
}
+
+func (a *azureCLIProfile) verifyAuthenticatedAsAUser() bool {
+ for _, subscription := range a.profile.Subscriptions {
+ if subscription.User == nil {
+ continue
+ }
+
+ authenticatedAsAUser := strings.EqualFold(subscription.User.Type, "user")
+ if authenticatedAsAUser {
+ return true
+ }
+ }
+
+ return false
+}
diff --git a/vendor/github.com/hashicorp/go-azure-helpers/authentication/builder.go b/vendor/github.com/hashicorp/go-azure-helpers/authentication/builder.go
index e37e8b137b..71400ea14e 100644
--- a/vendor/github.com/hashicorp/go-azure-helpers/authentication/builder.go
+++ b/vendor/github.com/hashicorp/go-azure-helpers/authentication/builder.go
@@ -14,6 +14,10 @@ type Builder struct {
TenantID string
Environment string
+ // Auxiliary tenant IDs used for multi tenant auth
+ SupportsAuxiliaryTenants bool
+ AuxiliaryTenantIDs []string
+
// The custom Resource Manager Endpoint which should be used
// only applicable for Azure Stack at this time.
CustomResourceManagerEndpoint string
@@ -33,6 +37,7 @@ type Builder struct {
// Service Principal (Client Secret) Auth
SupportsClientSecretAuth bool
ClientSecret string
+ ClientSecretDocsLink string
}
// Build takes the configuration from the Builder and builds up a validated Config
@@ -42,6 +47,7 @@ func (b Builder) Build() (*Config, error) {
ClientID: b.ClientID,
SubscriptionID: b.SubscriptionID,
TenantID: b.TenantID,
+ AuxiliaryTenantIDs: b.AuxiliaryTenantIDs,
Environment: b.Environment,
CustomResourceManagerEndpoint: b.CustomResourceManagerEndpoint,
}
@@ -50,6 +56,7 @@ func (b Builder) Build() (*Config, error) {
// since the Azure CLI Parsing should always be the last thing checked
supportedAuthenticationMethods := []authMethod{
servicePrincipalClientCertificateAuth{},
+ servicePrincipalClientSecretMultiTenantAuth{},
servicePrincipalClientSecretAuth{},
managedServiceIdentityAuth{},
azureCliTokenAuth{},
@@ -58,23 +65,28 @@ func (b Builder) Build() (*Config, error) {
for _, method := range supportedAuthenticationMethods {
name := method.name()
log.Printf("Testing if %s is applicable for Authentication..", name)
- if method.isApplicable(b) {
- log.Printf("Using %s for Authentication", name)
- auth, err := method.build(b)
- if err != nil {
- return nil, err
- }
-
- // populate authentication specific fields on the Config
- // (e.g. is service principal, fields parsed from the azure cli)
- err = auth.populateConfig(&config)
- if err != nil {
- return nil, err
- }
- config.authMethod = auth
- return config.validate()
+ // does not support it via validate?
+ if !method.isApplicable(b) {
+ continue
+ }
+
+ log.Printf("Using %s for Authentication", name)
+ auth, err := method.build(b)
+ if err != nil {
+ return nil, err
+ }
+
+ // populate authentication specific fields on the Config
+ // (e.g. is service principal, fields parsed from the azure cli)
+ err = auth.populateConfig(&config)
+ if err != nil {
+ return nil, err
}
+
+ config.authMethod = auth
+ return &config, config.authMethod.validate()
+
}
return nil, fmt.Errorf("No supported authentication methods were found!")
diff --git a/vendor/github.com/hashicorp/go-azure-helpers/authentication/config.go b/vendor/github.com/hashicorp/go-azure-helpers/authentication/config.go
index 90b78fce02..93843c3b7e 100644
--- a/vendor/github.com/hashicorp/go-azure-helpers/authentication/config.go
+++ b/vendor/github.com/hashicorp/go-azure-helpers/authentication/config.go
@@ -1,6 +1,9 @@
package authentication
import (
+ `fmt`
+ "log"
+
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/adal"
)
@@ -11,6 +14,7 @@ type Config struct {
ClientID string
SubscriptionID string
TenantID string
+ AuxiliaryTenantIDs []string
Environment string
AuthenticatedAsAServicePrincipal bool
@@ -21,16 +25,87 @@ type Config struct {
authMethod authMethod
}
+type OAuthConfig struct {
+ OAuth *adal.OAuthConfig
+ MultiTenantOauth *adal.MultiTenantOAuthConfig
+}
+
// GetAuthorizationToken returns an authorization token for the authentication method defined in the Config
-func (c Config) GetAuthorizationToken(sender autorest.Sender, oauthConfig *adal.OAuthConfig, endpoint string) (*autorest.BearerAuthorizer, error) {
- return c.authMethod.getAuthorizationToken(sender, oauthConfig, endpoint)
+func (c Config) GetOAuthConfig(activeDirectoryEndpoint string) (*adal.OAuthConfig, error) {
+ log.Printf("Getting OAuth config for endpoint %s with tenant %s", activeDirectoryEndpoint, c.TenantID)
+ oauth, err := adal.NewOAuthConfig(activeDirectoryEndpoint, c.TenantID)
+ if err != nil {
+ return nil, err
+ }
+
+ // OAuthConfigForTenant returns a pointer, which can be nil.
+ if oauth == nil {
+ return nil, fmt.Errorf("Unable to configure OAuthConfig for tenant %s", c.TenantID)
+ }
+
+ return oauth, nil
+}
+
+// GetMultiTenantOAuthConfig returns a multi-tenant authorization token for the authentication method defined in the Config
+func (c Config) GetMultiTenantOAuthConfig(activeDirectoryEndpoint string) (*adal.MultiTenantOAuthConfig, error) {
+ log.Printf("Getting multi OAuth config for endpoint %s with tenant %s (aux tenants: %v)", activeDirectoryEndpoint, c.TenantID, c.AuxiliaryTenantIDs)
+ oauth, err := adal.NewMultiTenantOAuthConfig(activeDirectoryEndpoint, c.TenantID, c.AuxiliaryTenantIDs, adal.OAuthOptions{})
+ if err != nil {
+ return nil, err
+ }
+
+ // OAuthConfigForTenant returns a pointer, which can be nil.
+ if oauth == nil {
+ return nil, fmt.Errorf("Unable to configure OAuthConfig for tenant %s (auxiliary tenants %v)", c.TenantID, c.AuxiliaryTenantIDs)
+ }
+
+ return &oauth, nil
}
-func (c Config) validate() (*Config, error) {
- err := c.authMethod.validate()
+// BuildOAuthConfig builds the authorization configuration for the specified Active Directory Endpoint
+func (c Config) BuildOAuthConfig(activeDirectoryEndpoint string) (*OAuthConfig, error) {
+ multiAuth := OAuthConfig{}
+ var err error
+
+ multiAuth.OAuth, err = c.GetOAuthConfig(activeDirectoryEndpoint)
if err != nil {
return nil, err
}
- return &c, nil
+ if len(c.AuxiliaryTenantIDs) > 0 {
+ multiAuth.MultiTenantOauth, err = c.GetMultiTenantOAuthConfig(activeDirectoryEndpoint)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ return &multiAuth, nil
+}
+
+// BearerAuthorizerCallback returns a BearerAuthorizer valid only for the Primary Tenant
+// this signs a request using the AccessToken returned from the primary Resource Manager authorizer
+func (c Config) BearerAuthorizerCallback(sender autorest.Sender, oauthConfig *OAuthConfig) *autorest.BearerAuthorizerCallback {
+ return autorest.NewBearerAuthorizerCallback(sender, func(tenantID, resource string) (*autorest.BearerAuthorizer, error) {
+ // a BearerAuthorizer is only valid for the primary tenant
+ newAuthConfig := &OAuthConfig{
+ OAuth: oauthConfig.OAuth,
+ }
+
+ storageSpt, err := c.GetAuthorizationToken(sender, newAuthConfig, resource)
+ if err != nil {
+ return nil, err
+ }
+
+ cast, ok := storageSpt.(*autorest.BearerAuthorizer)
+ if !ok {
+ return nil, fmt.Errorf("Error converting %+v to a BearerAuthorizer", storageSpt)
+ }
+
+ return cast, nil
+ })
+}
+
+// GetAuthorizationToken returns an authorization token for the authentication method defined in the Config
+func (c Config) GetAuthorizationToken(sender autorest.Sender, oauth *OAuthConfig, endpoint string) (autorest.Authorizer, error) {
+ return c.authMethod.getAuthorizationToken(sender, oauth, endpoint)
}
diff --git a/vendor/github.com/mitchellh/go-homedir/homedir.go b/vendor/github.com/mitchellh/go-homedir/homedir.go
index fb87bef94f..25378537ea 100644
--- a/vendor/github.com/mitchellh/go-homedir/homedir.go
+++ b/vendor/github.com/mitchellh/go-homedir/homedir.go
@@ -76,6 +76,16 @@ func Expand(path string) (string, error) {
return filepath.Join(dir, path[1:]), nil
}
+// Reset clears the cache, forcing the next call to Dir to re-detect
+// the home directory. This generally never has to be called, but can be
+// useful in tests if you're modifying the home directory via the HOME
+// env var or something.
+func Reset() {
+ cacheLock.Lock()
+ defer cacheLock.Unlock()
+ homedirCache = ""
+}
+
func dirUnix() (string, error) {
homeEnv := "HOME"
if runtime.GOOS == "plan9" {
diff --git a/vendor/go.opencensus.io/plugin/ochttp/propagation/tracecontext/propagation.go b/vendor/go.opencensus.io/plugin/ochttp/propagation/tracecontext/propagation.go
deleted file mode 100644
index 65ab1e9966..0000000000
--- a/vendor/go.opencensus.io/plugin/ochttp/propagation/tracecontext/propagation.go
+++ /dev/null
@@ -1,187 +0,0 @@
-// Copyright 2018, OpenCensus Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Package tracecontext contains HTTP propagator for TraceContext standard.
-// See https://github.com/w3c/distributed-tracing for more information.
-package tracecontext // import "go.opencensus.io/plugin/ochttp/propagation/tracecontext"
-
-import (
- "encoding/hex"
- "fmt"
- "net/http"
- "net/textproto"
- "regexp"
- "strings"
-
- "go.opencensus.io/trace"
- "go.opencensus.io/trace/propagation"
- "go.opencensus.io/trace/tracestate"
-)
-
-const (
- supportedVersion = 0
- maxVersion = 254
- maxTracestateLen = 512
- traceparentHeader = "traceparent"
- tracestateHeader = "tracestate"
- trimOWSRegexFmt = `^[\x09\x20]*(.*[^\x20\x09])[\x09\x20]*$`
-)
-
-var trimOWSRegExp = regexp.MustCompile(trimOWSRegexFmt)
-
-var _ propagation.HTTPFormat = (*HTTPFormat)(nil)
-
-// HTTPFormat implements the TraceContext trace propagation format.
-type HTTPFormat struct{}
-
-// SpanContextFromRequest extracts a span context from incoming requests.
-func (f *HTTPFormat) SpanContextFromRequest(req *http.Request) (sc trace.SpanContext, ok bool) {
- h, ok := getRequestHeader(req, traceparentHeader, false)
- if !ok {
- return trace.SpanContext{}, false
- }
- sections := strings.Split(h, "-")
- if len(sections) < 4 {
- return trace.SpanContext{}, false
- }
-
- if len(sections[0]) != 2 {
- return trace.SpanContext{}, false
- }
- ver, err := hex.DecodeString(sections[0])
- if err != nil {
- return trace.SpanContext{}, false
- }
- version := int(ver[0])
- if version > maxVersion {
- return trace.SpanContext{}, false
- }
-
- if version == 0 && len(sections) != 4 {
- return trace.SpanContext{}, false
- }
-
- if len(sections[1]) != 32 {
- return trace.SpanContext{}, false
- }
- tid, err := hex.DecodeString(sections[1])
- if err != nil {
- return trace.SpanContext{}, false
- }
- copy(sc.TraceID[:], tid)
-
- if len(sections[2]) != 16 {
- return trace.SpanContext{}, false
- }
- sid, err := hex.DecodeString(sections[2])
- if err != nil {
- return trace.SpanContext{}, false
- }
- copy(sc.SpanID[:], sid)
-
- opts, err := hex.DecodeString(sections[3])
- if err != nil || len(opts) < 1 {
- return trace.SpanContext{}, false
- }
- sc.TraceOptions = trace.TraceOptions(opts[0])
-
- // Don't allow all zero trace or span ID.
- if sc.TraceID == [16]byte{} || sc.SpanID == [8]byte{} {
- return trace.SpanContext{}, false
- }
-
- sc.Tracestate = tracestateFromRequest(req)
- return sc, true
-}
-
-// getRequestHeader returns a combined header field according to RFC7230 section 3.2.2.
-// If commaSeparated is true, multiple header fields with the same field name using be
-// combined using ",".
-// If no header was found using the given name, "ok" would be false.
-// If more than one headers was found using the given name, while commaSeparated is false,
-// "ok" would be false.
-func getRequestHeader(req *http.Request, name string, commaSeparated bool) (hdr string, ok bool) {
- v := req.Header[textproto.CanonicalMIMEHeaderKey(name)]
- switch len(v) {
- case 0:
- return "", false
- case 1:
- return v[0], true
- default:
- return strings.Join(v, ","), commaSeparated
- }
-}
-
-// TODO(rghetia): return an empty Tracestate when parsing tracestate header encounters an error.
-// Revisit to return additional boolean value to indicate parsing error when following issues
-// are resolved.
-// https://github.com/w3c/distributed-tracing/issues/172
-// https://github.com/w3c/distributed-tracing/issues/175
-func tracestateFromRequest(req *http.Request) *tracestate.Tracestate {
- h, _ := getRequestHeader(req, tracestateHeader, true)
- if h == "" {
- return nil
- }
-
- var entries []tracestate.Entry
- pairs := strings.Split(h, ",")
- hdrLenWithoutOWS := len(pairs) - 1 // Number of commas
- for _, pair := range pairs {
- matches := trimOWSRegExp.FindStringSubmatch(pair)
- if matches == nil {
- return nil
- }
- pair = matches[1]
- hdrLenWithoutOWS += len(pair)
- if hdrLenWithoutOWS > maxTracestateLen {
- return nil
- }
- kv := strings.Split(pair, "=")
- if len(kv) != 2 {
- return nil
- }
- entries = append(entries, tracestate.Entry{Key: kv[0], Value: kv[1]})
- }
- ts, err := tracestate.New(nil, entries...)
- if err != nil {
- return nil
- }
-
- return ts
-}
-
-func tracestateToRequest(sc trace.SpanContext, req *http.Request) {
- var pairs = make([]string, 0, len(sc.Tracestate.Entries()))
- if sc.Tracestate != nil {
- for _, entry := range sc.Tracestate.Entries() {
- pairs = append(pairs, strings.Join([]string{entry.Key, entry.Value}, "="))
- }
- h := strings.Join(pairs, ",")
-
- if h != "" && len(h) <= maxTracestateLen {
- req.Header.Set(tracestateHeader, h)
- }
- }
-}
-
-// SpanContextToRequest modifies the given request to include traceparent and tracestate headers.
-func (f *HTTPFormat) SpanContextToRequest(sc trace.SpanContext, req *http.Request) {
- h := fmt.Sprintf("%x-%x-%x-%x",
- []byte{supportedVersion},
- sc.TraceID[:],
- sc.SpanID[:],
- []byte{byte(sc.TraceOptions)})
- req.Header.Set(traceparentHeader, h)
- tracestateToRequest(sc, req)
-}
diff --git a/vendor/go.opencensus.io/resource/resource.go b/vendor/go.opencensus.io/resource/resource.go
deleted file mode 100644
index ec89b216ca..0000000000
--- a/vendor/go.opencensus.io/resource/resource.go
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright 2018, OpenCensus Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Package resource provides functionality for resource, which capture
-// identifying information about the entities for which signals are exported.
-package resource
-
-import (
- "context"
- "fmt"
- "os"
- "regexp"
- "sort"
- "strconv"
- "strings"
-)
-
-const (
- EnvVarType = "OC_RESOURCE_TYPE"
- EnvVarLabels = "OC_RESOURCE_LABELS"
-)
-
-// Resource describes an entity about which identifying information and metadata is exposed.
-// For example, a type "k8s.io/container" may hold labels describing the pod name and namespace.
-type Resource struct {
- Type string
- Labels map[string]string
-}
-
-// EncodeLabels encodes a labels map to a string as provided via the OC_RESOURCE_LABELS environment variable.
-func EncodeLabels(labels map[string]string) string {
- sortedKeys := make([]string, 0, len(labels))
- for k := range labels {
- sortedKeys = append(sortedKeys, k)
- }
- sort.Strings(sortedKeys)
-
- s := ""
- for i, k := range sortedKeys {
- if i > 0 {
- s += ","
- }
- s += k + "=" + strconv.Quote(labels[k])
- }
- return s
-}
-
-var labelRegex = regexp.MustCompile(`^\s*([[:ascii:]]{1,256}?)=("[[:ascii:]]{0,256}?")\s*,`)
-
-// DecodeLabels decodes a serialized label map as used in the OC_RESOURCE_LABELS variable.
-// A list of labels of the form `="",="",...` is accepted.
-// Domain names and paths are accepted as label keys.
-// Most users will want to use FromEnv instead.
-func DecodeLabels(s string) (map[string]string, error) {
- m := map[string]string{}
- // Ensure a trailing comma, which allows us to keep the regex simpler
- s = strings.TrimRight(strings.TrimSpace(s), ",") + ","
-
- for len(s) > 0 {
- match := labelRegex.FindStringSubmatch(s)
- if len(match) == 0 {
- return nil, fmt.Errorf("invalid label formatting, remainder: %s", s)
- }
- v := match[2]
- if v == "" {
- v = match[3]
- } else {
- var err error
- if v, err = strconv.Unquote(v); err != nil {
- return nil, fmt.Errorf("invalid label formatting, remainder: %s, err: %s", s, err)
- }
- }
- m[match[1]] = v
-
- s = s[len(match[0]):]
- }
- return m, nil
-}
-
-// FromEnv is a detector that loads resource information from the OC_RESOURCE_TYPE
-// and OC_RESOURCE_labelS environment variables.
-func FromEnv(context.Context) (*Resource, error) {
- res := &Resource{
- Type: strings.TrimSpace(os.Getenv(EnvVarType)),
- }
- labels := strings.TrimSpace(os.Getenv(EnvVarLabels))
- if labels == "" {
- return res, nil
- }
- var err error
- if res.Labels, err = DecodeLabels(labels); err != nil {
- return nil, err
- }
- return res, nil
-}
-
-var _ Detector = FromEnv
-
-// merge resource information from b into a. In case of a collision, a takes precedence.
-func merge(a, b *Resource) *Resource {
- if a == nil {
- return b
- }
- if b == nil {
- return a
- }
- res := &Resource{
- Type: a.Type,
- Labels: map[string]string{},
- }
- if res.Type == "" {
- res.Type = b.Type
- }
- for k, v := range b.Labels {
- res.Labels[k] = v
- }
- // Labels from resource a overwrite labels from resource b.
- for k, v := range a.Labels {
- res.Labels[k] = v
- }
- return res
-}
-
-// Detector attempts to detect resource information.
-// If the detector cannot find resource information, the returned resource is nil but no
-// error is returned.
-// An error is only returned on unexpected failures.
-type Detector func(context.Context) (*Resource, error)
-
-// MultiDetector returns a Detector that calls all input detectors in order and
-// merges each result with the previous one. In case a type of label key is already set,
-// the first set value is takes precedence.
-// It returns on the first error that a sub-detector encounters.
-func MultiDetector(detectors ...Detector) Detector {
- return func(ctx context.Context) (*Resource, error) {
- return detectAll(ctx, detectors...)
- }
-}
-
-// detectall calls all input detectors sequentially an merges each result with the previous one.
-// It returns on the first error that a sub-detector encounters.
-func detectAll(ctx context.Context, detectors ...Detector) (*Resource, error) {
- var res *Resource
- for _, d := range detectors {
- r, err := d(ctx)
- if err != nil {
- return nil, err
- }
- res = merge(res, r)
- }
- return res, nil
-}
diff --git a/vendor/golang.org/x/sync/AUTHORS b/vendor/golang.org/x/sync/AUTHORS
deleted file mode 100644
index 15167cd746..0000000000
--- a/vendor/golang.org/x/sync/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/golang.org/x/sync/CONTRIBUTORS b/vendor/golang.org/x/sync/CONTRIBUTORS
deleted file mode 100644
index 1c4577e968..0000000000
--- a/vendor/golang.org/x/sync/CONTRIBUTORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/golang.org/x/sync/LICENSE b/vendor/golang.org/x/sync/LICENSE
deleted file mode 100644
index 6a66aea5ea..0000000000
--- a/vendor/golang.org/x/sync/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2009 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/golang.org/x/sync/PATENTS b/vendor/golang.org/x/sync/PATENTS
deleted file mode 100644
index 733099041f..0000000000
--- a/vendor/golang.org/x/sync/PATENTS
+++ /dev/null
@@ -1,22 +0,0 @@
-Additional IP Rights Grant (Patents)
-
-"This implementation" means the copyrightable works distributed by
-Google as part of the Go project.
-
-Google hereby grants to You a perpetual, worldwide, non-exclusive,
-no-charge, royalty-free, irrevocable (except as stated in this section)
-patent license to make, have made, use, offer to sell, sell, import,
-transfer and otherwise run, modify and propagate the contents of this
-implementation of Go, where such license applies only to those patent
-claims, both currently owned or controlled by Google and acquired in
-the future, licensable by Google that are necessarily infringed by this
-implementation of Go. This grant does not include claims that would be
-infringed only as a consequence of further modification of this
-implementation. If you or your agent or exclusive licensee institute or
-order or agree to the institution of patent litigation against any
-entity (including a cross-claim or counterclaim in a lawsuit) alleging
-that this implementation of Go or any code incorporated within this
-implementation of Go constitutes direct or contributory patent
-infringement, or inducement of patent infringement, then any patent
-rights granted to you under this License for this implementation of Go
-shall terminate as of the date such litigation is filed.
diff --git a/vendor/golang.org/x/sync/semaphore/semaphore.go b/vendor/golang.org/x/sync/semaphore/semaphore.go
deleted file mode 100644
index 7f096fef07..0000000000
--- a/vendor/golang.org/x/sync/semaphore/semaphore.go
+++ /dev/null
@@ -1,127 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package semaphore provides a weighted semaphore implementation.
-package semaphore // import "golang.org/x/sync/semaphore"
-
-import (
- "container/list"
- "context"
- "sync"
-)
-
-type waiter struct {
- n int64
- ready chan<- struct{} // Closed when semaphore acquired.
-}
-
-// NewWeighted creates a new weighted semaphore with the given
-// maximum combined weight for concurrent access.
-func NewWeighted(n int64) *Weighted {
- w := &Weighted{size: n}
- return w
-}
-
-// Weighted provides a way to bound concurrent access to a resource.
-// The callers can request access with a given weight.
-type Weighted struct {
- size int64
- cur int64
- mu sync.Mutex
- waiters list.List
-}
-
-// Acquire acquires the semaphore with a weight of n, blocking until resources
-// are available or ctx is done. On success, returns nil. On failure, returns
-// ctx.Err() and leaves the semaphore unchanged.
-//
-// If ctx is already done, Acquire may still succeed without blocking.
-func (s *Weighted) Acquire(ctx context.Context, n int64) error {
- s.mu.Lock()
- if s.size-s.cur >= n && s.waiters.Len() == 0 {
- s.cur += n
- s.mu.Unlock()
- return nil
- }
-
- if n > s.size {
- // Don't make other Acquire calls block on one that's doomed to fail.
- s.mu.Unlock()
- <-ctx.Done()
- return ctx.Err()
- }
-
- ready := make(chan struct{})
- w := waiter{n: n, ready: ready}
- elem := s.waiters.PushBack(w)
- s.mu.Unlock()
-
- select {
- case <-ctx.Done():
- err := ctx.Err()
- s.mu.Lock()
- select {
- case <-ready:
- // Acquired the semaphore after we were canceled. Rather than trying to
- // fix up the queue, just pretend we didn't notice the cancelation.
- err = nil
- default:
- s.waiters.Remove(elem)
- }
- s.mu.Unlock()
- return err
-
- case <-ready:
- return nil
- }
-}
-
-// TryAcquire acquires the semaphore with a weight of n without blocking.
-// On success, returns true. On failure, returns false and leaves the semaphore unchanged.
-func (s *Weighted) TryAcquire(n int64) bool {
- s.mu.Lock()
- success := s.size-s.cur >= n && s.waiters.Len() == 0
- if success {
- s.cur += n
- }
- s.mu.Unlock()
- return success
-}
-
-// Release releases the semaphore with a weight of n.
-func (s *Weighted) Release(n int64) {
- s.mu.Lock()
- s.cur -= n
- if s.cur < 0 {
- s.mu.Unlock()
- panic("semaphore: released more than held")
- }
- for {
- next := s.waiters.Front()
- if next == nil {
- break // No more waiters blocked.
- }
-
- w := next.Value.(waiter)
- if s.size-s.cur < w.n {
- // Not enough tokens for the next waiter. We could keep going (to try to
- // find a waiter with a smaller request), but under load that could cause
- // starvation for large requests; instead, we leave all remaining waiters
- // blocked.
- //
- // Consider a semaphore used as a read-write lock, with N tokens, N
- // readers, and one writer. Each reader can Acquire(1) to obtain a read
- // lock. The writer can Acquire(N) to obtain a write lock, excluding all
- // of the readers. If we allow the readers to jump ahead in the queue,
- // the writer will starve — there is always one token available for every
- // reader.
- break
- }
-
- s.cur += w.n
- s.waiters.Remove(next)
- close(w.ready)
- }
- s.mu.Unlock()
-}
diff --git a/vendor/google.golang.org/api/support/bundler/bundler.go b/vendor/google.golang.org/api/support/bundler/bundler.go
deleted file mode 100644
index c553271190..0000000000
--- a/vendor/google.golang.org/api/support/bundler/bundler.go
+++ /dev/null
@@ -1,349 +0,0 @@
-// Copyright 2016 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Package bundler supports bundling (batching) of items. Bundling amortizes an
-// action with fixed costs over multiple items. For example, if an API provides
-// an RPC that accepts a list of items as input, but clients would prefer
-// adding items one at a time, then a Bundler can accept individual items from
-// the client and bundle many of them into a single RPC.
-//
-// This package is experimental and subject to change without notice.
-package bundler
-
-import (
- "context"
- "errors"
- "math"
- "reflect"
- "sync"
- "time"
-
- "golang.org/x/sync/semaphore"
-)
-
-const (
- DefaultDelayThreshold = time.Second
- DefaultBundleCountThreshold = 10
- DefaultBundleByteThreshold = 1e6 // 1M
- DefaultBufferedByteLimit = 1e9 // 1G
-)
-
-var (
- // ErrOverflow indicates that Bundler's stored bytes exceeds its BufferedByteLimit.
- ErrOverflow = errors.New("bundler reached buffered byte limit")
-
- // ErrOversizedItem indicates that an item's size exceeds the maximum bundle size.
- ErrOversizedItem = errors.New("item size exceeds bundle byte limit")
-)
-
-// A Bundler collects items added to it into a bundle until the bundle
-// exceeds a given size, then calls a user-provided function to handle the bundle.
-type Bundler struct {
- // Starting from the time that the first message is added to a bundle, once
- // this delay has passed, handle the bundle. The default is DefaultDelayThreshold.
- DelayThreshold time.Duration
-
- // Once a bundle has this many items, handle the bundle. Since only one
- // item at a time is added to a bundle, no bundle will exceed this
- // threshold, so it also serves as a limit. The default is
- // DefaultBundleCountThreshold.
- BundleCountThreshold int
-
- // Once the number of bytes in current bundle reaches this threshold, handle
- // the bundle. The default is DefaultBundleByteThreshold. This triggers handling,
- // but does not cap the total size of a bundle.
- BundleByteThreshold int
-
- // The maximum size of a bundle, in bytes. Zero means unlimited.
- BundleByteLimit int
-
- // The maximum number of bytes that the Bundler will keep in memory before
- // returning ErrOverflow. The default is DefaultBufferedByteLimit.
- BufferedByteLimit int
-
- // The maximum number of handler invocations that can be running at once.
- // The default is 1.
- HandlerLimit int
-
- handler func(interface{}) // called to handle a bundle
- itemSliceZero reflect.Value // nil (zero value) for slice of items
- flushTimer *time.Timer // implements DelayThreshold
-
- mu sync.Mutex
- sem *semaphore.Weighted // enforces BufferedByteLimit
- semOnce sync.Once
- curBundle bundle // incoming items added to this bundle
-
- // Each bundle is assigned a unique ticket that determines the order in which the
- // handler is called. The ticket is assigned with mu locked, but waiting for tickets
- // to be handled is done via mu2 and cond, below.
- nextTicket uint64 // next ticket to be assigned
-
- mu2 sync.Mutex
- cond *sync.Cond
- nextHandled uint64 // next ticket to be handled
-
- // In this implementation, active uses space proportional to HandlerLimit, and
- // waitUntilAllHandled takes time proportional to HandlerLimit each time an acquire
- // or release occurs, so large values of HandlerLimit max may cause performance
- // issues.
- active map[uint64]bool // tickets of bundles actively being handled
-}
-
-type bundle struct {
- items reflect.Value // slice of item type
- size int // size in bytes of all items
-}
-
-// NewBundler creates a new Bundler.
-//
-// itemExample is a value of the type that will be bundled. For example, if you
-// want to create bundles of *Entry, you could pass &Entry{} for itemExample.
-//
-// handler is a function that will be called on each bundle. If itemExample is
-// of type T, the argument to handler is of type []T. handler is always called
-// sequentially for each bundle, and never in parallel.
-//
-// Configure the Bundler by setting its thresholds and limits before calling
-// any of its methods.
-func NewBundler(itemExample interface{}, handler func(interface{})) *Bundler {
- b := &Bundler{
- DelayThreshold: DefaultDelayThreshold,
- BundleCountThreshold: DefaultBundleCountThreshold,
- BundleByteThreshold: DefaultBundleByteThreshold,
- BufferedByteLimit: DefaultBufferedByteLimit,
- HandlerLimit: 1,
-
- handler: handler,
- itemSliceZero: reflect.Zero(reflect.SliceOf(reflect.TypeOf(itemExample))),
- active: map[uint64]bool{},
- }
- b.curBundle.items = b.itemSliceZero
- b.cond = sync.NewCond(&b.mu2)
- return b
-}
-
-func (b *Bundler) initSemaphores() {
- // Create the semaphores lazily, because the user may set limits
- // after NewBundler.
- b.semOnce.Do(func() {
- b.sem = semaphore.NewWeighted(int64(b.BufferedByteLimit))
- })
-}
-
-// Add adds item to the current bundle. It marks the bundle for handling and
-// starts a new one if any of the thresholds or limits are exceeded.
-//
-// If the item's size exceeds the maximum bundle size (Bundler.BundleByteLimit), then
-// the item can never be handled. Add returns ErrOversizedItem in this case.
-//
-// If adding the item would exceed the maximum memory allowed
-// (Bundler.BufferedByteLimit) or an AddWait call is blocked waiting for
-// memory, Add returns ErrOverflow.
-//
-// Add never blocks.
-func (b *Bundler) Add(item interface{}, size int) error {
- // If this item exceeds the maximum size of a bundle,
- // we can never send it.
- if b.BundleByteLimit > 0 && size > b.BundleByteLimit {
- return ErrOversizedItem
- }
- // If adding this item would exceed our allotted memory
- // footprint, we can't accept it.
- // (TryAcquire also returns false if anything is waiting on the semaphore,
- // so calls to Add and AddWait shouldn't be mixed.)
- b.initSemaphores()
- if !b.sem.TryAcquire(int64(size)) {
- return ErrOverflow
- }
- b.add(item, size)
- return nil
-}
-
-// add adds item to the current bundle. It marks the bundle for handling and
-// starts a new one if any of the thresholds or limits are exceeded.
-func (b *Bundler) add(item interface{}, size int) {
- b.mu.Lock()
- defer b.mu.Unlock()
-
- // If adding this item to the current bundle would cause it to exceed the
- // maximum bundle size, close the current bundle and start a new one.
- if b.BundleByteLimit > 0 && b.curBundle.size+size > b.BundleByteLimit {
- b.startFlushLocked()
- }
- // Add the item.
- b.curBundle.items = reflect.Append(b.curBundle.items, reflect.ValueOf(item))
- b.curBundle.size += size
-
- // Start a timer to flush the item if one isn't already running.
- // startFlushLocked clears the timer and closes the bundle at the same time,
- // so we only allocate a new timer for the first item in each bundle.
- // (We could try to call Reset on the timer instead, but that would add a lot
- // of complexity to the code just to save one small allocation.)
- if b.flushTimer == nil {
- b.flushTimer = time.AfterFunc(b.DelayThreshold, b.Flush)
- }
-
- // If the current bundle equals the count threshold, close it.
- if b.curBundle.items.Len() == b.BundleCountThreshold {
- b.startFlushLocked()
- }
- // If the current bundle equals or exceeds the byte threshold, close it.
- if b.curBundle.size >= b.BundleByteThreshold {
- b.startFlushLocked()
- }
-}
-
-// AddWait adds item to the current bundle. It marks the bundle for handling and
-// starts a new one if any of the thresholds or limits are exceeded.
-//
-// If the item's size exceeds the maximum bundle size (Bundler.BundleByteLimit), then
-// the item can never be handled. AddWait returns ErrOversizedItem in this case.
-//
-// If adding the item would exceed the maximum memory allowed (Bundler.BufferedByteLimit),
-// AddWait blocks until space is available or ctx is done.
-//
-// Calls to Add and AddWait should not be mixed on the same Bundler.
-func (b *Bundler) AddWait(ctx context.Context, item interface{}, size int) error {
- // If this item exceeds the maximum size of a bundle,
- // we can never send it.
- if b.BundleByteLimit > 0 && size > b.BundleByteLimit {
- return ErrOversizedItem
- }
- // If adding this item would exceed our allotted memory footprint, block
- // until space is available. The semaphore is FIFO, so there will be no
- // starvation.
- b.initSemaphores()
- if err := b.sem.Acquire(ctx, int64(size)); err != nil {
- return err
- }
- // Here, we've reserved space for item. Other goroutines can call AddWait
- // and even acquire space, but no one can take away our reservation
- // (assuming sem.Release is used correctly). So there is no race condition
- // resulting from locking the mutex after sem.Acquire returns.
- b.add(item, size)
- return nil
-}
-
-// Flush invokes the handler for all remaining items in the Bundler and waits
-// for it to return.
-func (b *Bundler) Flush() {
- b.mu.Lock()
- b.startFlushLocked()
- // Here, all bundles with tickets < b.nextTicket are
- // either finished or active. Those are the ones
- // we want to wait for.
- t := b.nextTicket
- b.mu.Unlock()
- b.initSemaphores()
- b.waitUntilAllHandled(t)
-}
-
-func (b *Bundler) startFlushLocked() {
- if b.flushTimer != nil {
- b.flushTimer.Stop()
- b.flushTimer = nil
- }
- if b.curBundle.items.Len() == 0 {
- return
- }
- // Here, both semaphores must have been initialized.
- bun := b.curBundle
- b.curBundle = bundle{items: b.itemSliceZero}
- ticket := b.nextTicket
- b.nextTicket++
- go func() {
- defer func() {
- b.sem.Release(int64(bun.size))
- b.release(ticket)
- }()
- b.acquire(ticket)
- b.handler(bun.items.Interface())
- }()
-}
-
-// acquire blocks until ticket is the next to be served, then returns. In order for N
-// acquire calls to return, the tickets must be in the range [0, N). A ticket must
-// not be presented to acquire more than once.
-func (b *Bundler) acquire(ticket uint64) {
- b.mu2.Lock()
- defer b.mu2.Unlock()
- if ticket < b.nextHandled {
- panic("bundler: acquire: arg too small")
- }
- for !(ticket == b.nextHandled && len(b.active) < b.HandlerLimit) {
- b.cond.Wait()
- }
- // Here,
- // ticket == b.nextHandled: the caller is the next one to be handled;
- // and len(b.active) < b.HandlerLimit: there is space available.
- b.active[ticket] = true
- b.nextHandled++
- // Broadcast, not Signal: although at most one acquire waiter can make progress,
- // there might be waiters in waitUntilAllHandled.
- b.cond.Broadcast()
-}
-
-// If a ticket is used for a call to acquire, it must later be passed to release. A
-// ticket must not be presented to release more than once.
-func (b *Bundler) release(ticket uint64) {
- b.mu2.Lock()
- defer b.mu2.Unlock()
- if !b.active[ticket] {
- panic("bundler: release: not an active ticket")
- }
- delete(b.active, ticket)
- b.cond.Broadcast()
-}
-
-// waitUntilAllHandled blocks until all tickets < n have called release, meaning
-// all bundles with tickets < n have been handled.
-func (b *Bundler) waitUntilAllHandled(n uint64) {
- // Proof of correctness of this function.
- // "N is acquired" means acquire(N) has returned.
- // "N is released" means release(N) has returned.
- // 1. If N is acquired, N-1 is acquired.
- // Follows from the loop test in acquire, and the fact
- // that nextHandled is incremented by 1.
- // 2. If nextHandled >= N, then N-1 is acquired.
- // Because we only increment nextHandled to N after N-1 is acquired.
- // 3. If nextHandled >= N, then all n < N is acquired.
- // Follows from #1 and #2.
- // 4. If N is acquired and N is not in active, then N is released.
- // Because we put N in active before acquire returns, and only
- // remove it when it is released.
- // Let min(active) be the smallest member of active, or infinity if active is empty.
- // 5. If nextHandled >= N and N <= min(active), then all n < N is released.
- // From nextHandled >= N and #3, all n < N is acquired.
- // N <= min(active) implies n < min(active) for all n < N. So all n < N is not in active.
- // So from #4, all n < N is released.
- // The loop test below is the antecedent of #5.
- b.mu2.Lock()
- defer b.mu2.Unlock()
- for !(b.nextHandled >= n && n <= min(b.active)) {
- b.cond.Wait()
- }
-}
-
-// min returns the minimum value of the set s, or the largest uint64 if
-// s is empty.
-func min(s map[uint64]bool) uint64 {
- var m uint64 = math.MaxUint64
- for n := range s {
- if n < m {
- m = n
- }
- }
- return m
-}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index d4df107d71..79423c1a6b 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -6,21 +6,26 @@ cloud.google.com/go/internal/optional
cloud.google.com/go/internal/trace
cloud.google.com/go/internal/version
cloud.google.com/go/compute/metadata
-# contrib.go.opencensus.io/exporter/ocagent v0.4.2
-contrib.go.opencensus.io/exporter/ocagent
-# github.com/Azure/azure-sdk-for-go v29.0.0+incompatible
+# github.com/Azure/azure-sdk-for-go v32.5.0+incompatible
github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac
github.com/Azure/azure-sdk-for-go/version
-# github.com/Azure/go-autorest v11.7.0+incompatible
+# github.com/Azure/go-autorest/autorest v0.9.0
github.com/Azure/go-autorest/autorest
-github.com/Azure/go-autorest/autorest/adal
github.com/Azure/go-autorest/autorest/azure
+# github.com/Azure/go-autorest/autorest/adal v0.6.0
+github.com/Azure/go-autorest/autorest/adal
+# github.com/Azure/go-autorest/autorest/azure/cli v0.2.0
+github.com/Azure/go-autorest/autorest/azure/cli
+# github.com/Azure/go-autorest/autorest/date v0.2.0
github.com/Azure/go-autorest/autorest/date
+# github.com/Azure/go-autorest/autorest/to v0.3.0
github.com/Azure/go-autorest/autorest/to
+# github.com/Azure/go-autorest/autorest/validation v0.2.0
github.com/Azure/go-autorest/autorest/validation
-github.com/Azure/go-autorest/tracing
+# github.com/Azure/go-autorest/logger v0.1.0
github.com/Azure/go-autorest/logger
-github.com/Azure/go-autorest/autorest/azure/cli
+# github.com/Azure/go-autorest/tracing v0.5.0
+github.com/Azure/go-autorest/tracing
# github.com/agext/levenshtein v1.2.2
github.com/agext/levenshtein
# github.com/apparentlymart/go-cidr v1.0.0
@@ -72,31 +77,21 @@ github.com/bgentry/go-netrc/netrc
github.com/bgentry/speakeasy
# github.com/blang/semver v3.5.1+incompatible
github.com/blang/semver
-# github.com/census-instrumentation/opencensus-proto v0.1.0-0.20181214143942-ba49f56771b8
-github.com/census-instrumentation/opencensus-proto/gen-go/agent/common/v1
-github.com/census-instrumentation/opencensus-proto/gen-go/agent/metrics/v1
-github.com/census-instrumentation/opencensus-proto/gen-go/agent/trace/v1
-github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1
-github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1
-github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1
# github.com/davecgh/go-spew v1.1.1
github.com/davecgh/go-spew/spew
# github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/dgrijalva/jwt-go
-# github.com/dimchansky/utfbom v1.0.0
+# github.com/dimchansky/utfbom v1.1.0
github.com/dimchansky/utfbom
# github.com/fatih/color v1.7.0
github.com/fatih/color
# github.com/golang/protobuf v1.3.0
github.com/golang/protobuf/proto
github.com/golang/protobuf/ptypes
-github.com/golang/protobuf/ptypes/timestamp
github.com/golang/protobuf/ptypes/any
github.com/golang/protobuf/ptypes/duration
-github.com/golang/protobuf/ptypes/wrappers
-github.com/golang/protobuf/jsonpb
+github.com/golang/protobuf/ptypes/timestamp
github.com/golang/protobuf/protoc-gen-go/descriptor
-github.com/golang/protobuf/ptypes/struct
# github.com/google/go-cmp v0.3.0
github.com/google/go-cmp/cmp
github.com/google/go-cmp/cmp/internal/diff
@@ -107,13 +102,9 @@ github.com/google/go-cmp/cmp/internal/value
github.com/google/uuid
# github.com/googleapis/gax-go/v2 v2.0.3
github.com/googleapis/gax-go/v2
-# github.com/grpc-ecosystem/grpc-gateway v1.5.1
-github.com/grpc-ecosystem/grpc-gateway/runtime
-github.com/grpc-ecosystem/grpc-gateway/utilities
-github.com/grpc-ecosystem/grpc-gateway/runtime/internal
# github.com/hashicorp/errwrap v1.0.0
github.com/hashicorp/errwrap
-# github.com/hashicorp/go-azure-helpers v0.4.1
+# github.com/hashicorp/go-azure-helpers v0.7.0
github.com/hashicorp/go-azure-helpers/authentication
github.com/hashicorp/go-azure-helpers/response
github.com/hashicorp/go-azure-helpers/sender
@@ -229,7 +220,7 @@ github.com/mitchellh/cli
github.com/mitchellh/colorstring
# github.com/mitchellh/copystructure v1.0.0
github.com/mitchellh/copystructure
-# github.com/mitchellh/go-homedir v1.0.0
+# github.com/mitchellh/go-homedir v1.1.0
github.com/mitchellh/go-homedir
# github.com/mitchellh/go-testing-interface v1.0.0
github.com/mitchellh/go-testing-interface
@@ -273,22 +264,20 @@ github.com/zclconf/go-cty/cty/function/stdlib
# github.com/zclconf/go-cty-yaml v1.0.1
github.com/zclconf/go-cty-yaml
# go.opencensus.io v0.18.1-0.20181204023538-aab39bd6a98b
-go.opencensus.io/plugin/ochttp
-go.opencensus.io/plugin/ochttp/propagation/tracecontext
-go.opencensus.io/stats/view
go.opencensus.io/trace
-go.opencensus.io
+go.opencensus.io/plugin/ochttp
go.opencensus.io/exemplar
-go.opencensus.io/resource
-go.opencensus.io/stats
-go.opencensus.io/tag
+go.opencensus.io/internal
+go.opencensus.io/trace/internal
go.opencensus.io/trace/tracestate
go.opencensus.io/plugin/ochttp/propagation/b3
+go.opencensus.io/stats
+go.opencensus.io/stats/view
+go.opencensus.io/tag
go.opencensus.io/trace/propagation
-go.opencensus.io/internal/tagencoding
+go.opencensus.io
go.opencensus.io/stats/internal
-go.opencensus.io/internal
-go.opencensus.io/trace/internal
+go.opencensus.io/internal/tagencoding
# golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4
golang.org/x/crypto/pkcs12
golang.org/x/crypto/ssh
@@ -323,8 +312,6 @@ golang.org/x/oauth2/google
golang.org/x/oauth2/internal
golang.org/x/oauth2/jws
golang.org/x/oauth2/jwt
-# golang.org/x/sync v0.0.0-20190423024810-112230192c58
-golang.org/x/sync/semaphore
# golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82
golang.org/x/sys/unix
golang.org/x/sys/cpu
@@ -335,7 +322,6 @@ golang.org/x/text/secure/bidirule
golang.org/x/text/unicode/bidi
# google.golang.org/api v0.1.0
google.golang.org/api/iterator
-google.golang.org/api/support/bundler
google.golang.org/api/googleapi
google.golang.org/api/option
google.golang.org/api/storage/v1